<p><span style="color: #404040; font-family: 굴림;">1. ubuntu 설치 (10.04LTS)&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">2. apache2 + mysql + php + java(jre + jdk) 설치 : 이건 그냥 웹접속을 위한 조치&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">* php 설정&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">/etc/apache2/mods-available/mime.conf&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">AddType application/x-httpd-php .php .html .htm&nbsp; &nbsp; //php확장자의 연동을 위한명시&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">* cgi 방식의 웹브라우저 뷰어를 위해서는 cgi-bin 설정&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">$sudo a2enmod cgi&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">$gedit /etc/apache2/sites-enabled/ooo-default&nbsp; (ooo-default 파일을 편집)&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">▶ /usr/lib/cgi-bin을 /var/www 로 변경&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">▶ 밑라인에 AddHandler cgi-script cgi pi 추가&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;ScriptAlias /cgi-bin/ /var/www/cgi-bin/&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; &lt;Directory "/var/www/cgi-bin"&gt;&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">3. webcam / webcam-server 설치 : apt 이용&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">4. webcam 설정&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;&nbsp;</span><a href="http://www.lug.or.kr/docs/LINUX/others/01-06-1.htm" target="_new" style="text-decoration-line: none; color: #3a4e40; font-family: 굴림;">http://www.lug.or.kr/docs/LINUX/others/01-06-1.htm</a><span style="color: #404040; font-family: 굴림;">&nbsp;참조&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; (1) .webcamrc 파일 작성 : 중간에 norm, input 은 막는다(#)&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; (2) 디렉토리 램 디스크 마운트 설정&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; &nbsp; &nbsp; &nbsp; mke2fs /dev/ram0&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; &nbsp; &nbsp; &nbsp; mount /dev/ram0 /var/www/cam_images (이 디렉토리는 미리 생성함)&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; &nbsp; (3) cgi-bin 디렉토리에 cgi 파일작성&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; &nbsp; &nbsp; &nbsp; 또는, 일반 자바스크립트 html파일 작성&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; &nbsp; &nbsp; &lt;img src="cam_images/webcam.jpeg" onload="this.src='cam_images/webcam.jpeg?random=' + Math.random()" width="320" height="240"&gt;&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">* 참고로 rc.local에 순서는&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; 1. 램디스크&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; 2. webcam (/.webcamrc가 위치)&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; 3. 아파치&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; 순서로 실행되어야 한단다...&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">* 또하나 참고로 php 아파치2에서 파일설정은&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; /etc/apache2/mods-available/mime.conf에&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;AddType application/x-httpd-php .php .phtml .html .htm .appnurisoft&nbsp; 를 추가&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">=================================================================================&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">*relay 제어방법&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">1. 프로그램 컴파일&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; gcc -o serial serial.c -pthread&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">2. /etc/relay 생성 및 하위에 relay.txt / serial.ini&nbsp; 파일 생성 (777)&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">3. rc.local 에 등록 : /user/bin/serial &amp;</span></p>