brunch

You can make anything
by writing

C.S.Lewis

by Master Seo Apr 03. 2019

33.HTML5로  2시간만에 만드는 모바일 홈페이지




<1> 구축

2시간만에  만들어 보자.

HTML5와 Bootstrap으로 모바일 홈페이지를 간단히 만들어보자.



<2> 구축 절차

1.  기존 구축된 웹 사이트 소스를 복사해 사용한다.


1) Apache 소스 http://toy1.serverchk.com/ 를 복사한다.

# cd /usr/local/apache2/htdocs/

 htdocs # cp -R toy1.serverchk.com/ arduino.serverchk.com



2) 아파치 설정은 Apache 가상호스트로 추가해 구축한다.

htdocs# cd /usr/local/apache2/conf/extra/
extra# vi httpd-vhosts.conf


<VirtualHost *:80>
DocumentRoot /usr/local/apache2/htdocs/arduino.serverchk.com
ServerName arduino.serverchk.com
ErrorLog logs/arduion.serverchk.com-error_log
</VirtualHost>



extra# ../../bin/apachectl restart
extra# ps -ef |grep httpd
root 25307 1 0 2018 ? 00:00:11 /usr/local/apache2/bin/httpd -k start
daemon 30550 25307 0 06:39 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
daemon 30551 25307 0 06:39 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
daemon 30552 25307 0 06:39 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
daemon 30553 25307 0 06:39 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
daemon 30554 25307 0 06:39 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
root 30556 30512 0 06:39 pts/14 00:00:00 grep httpd



3) DNS설정을 추가한다.

DNS서버에서 IP를 추가한다.                                          

arduino.serverchk.com.  A     210.116.123.25


참고 :  최초 웹서버 구축 방법은 아래 참고하기 바란다.

https://brunch.co.kr/@topasvga/315


부트스트랩 샘플파일을 가져와 일부 수정해 사용하면 된다.

https://www.w3schools.com/bootstrap/bootstrap_theme_me.asp



4. 사이트 확인한다.  스마트폰과 PC로 접속해보자.

http://arduino.serverchk.com/



5. 서버에 접속해 아두이노에 맞게 사이트를 수정한다.

이미지를 올린다.





기타

Apache 설치


1) Yum으로 설치하기

yum install httpd -y
/usr/sbin/httpd
ps -ef |grep httpd


vi /etc/httpd/conf/httpd.conf
cd /var/www/html
vi index.html


ps -ef |grep httpd
/usr/sbin/httpd stop
/usr/sbin/httpd -k restart




감사합니다.

매거진의 이전글 19.맛집 사이트 하루만에 만들기1

작품 선택

키워드 선택 0 / 3 0

댓글여부

afliean
브런치는 최신 브라우저에 최적화 되어있습니다. IE chrome safari