웹마스터 팁

아직 마니 허접하고 모자르지만
여기엔 소스 설치하는 법은 잘 못찾겠네요.
나름대로 삽질한 삽질기를 한번 올려봅니다.

첨부 파일은 제 홈에 설치 이야기 게시판에서 받아가세요
질문은 홈의 질답 이야기 게시판에서 해주세요.
메일로 질문은 받지 않습니다.
비츠로 홈 - http://vitro.pe.kr

php-4.2.2를 아래 사이트에서 다운 받는다.
http://www.php.net/downloads.php

소스 압축 해제.
tar xfz php-4.2.2.tar.gz -C /var/tmp

소스 디렉토리로 이동
cd /var/tmp/php-4.2.2

php를 설치할때 메일과 연동을 하게 되고, 어떤 메일을 쓰든 옵션은
별 차이가 없으나 센드메일일경우는 그냥 아래처럼 컴파일하면 되고,
큐메일을 사용할경우는 courier-imap을 보통 마니 사용한다.
courier-imap을 사용할 경우 uw-imap을 데몬은 안띄우고 설치만 해준다.
이렇게 할경우 courier-imap이 uw-imap의 c-client를 사용하게 된다.

만약 그냥 php를 컴파일 하면 c-client를 못찾는다는 에러가 난다.

uw-imap설치법은 홈의 설치 이야기 게시판을 검색하면 나온다.

우선 첫째 경우 오라클과 mysql, postgresql을 모두 연동하는 경우를 기준으로
설치 하였으나 보통 mysql하고만 연동하는 경우가 대부분 일것이다.
혹은 두개 디비 정도 연동이 전부일것인데.
그럴땐 몇개의 옵션만 넣고 빼고 하면 된다. 아래에 옵션 설명을 보라.

echo "###################################################"
echo "### apache + php + mysql + oracle + postgresql  ###"
echo "###################################################"

CFLAGS="-O3 -march=i686 -funroll-loops -fomit-frame-pointer -I/usr/include/openssl"
./configure
--prefix=/usr
--with-exec-dir=/usr/bin
--with-apache=../apache_1.3.26
--with-config-file-path=/etc/httpd
--with-oci8=/home/oracle/8i
--with-java=/usr/java/jdk
--with-png-dir=/usr/lib
--with-freetype-dir=/usr/include/freetype2
--with-mod_charset
--with-charset=euc_kr
--with-xml
--with-language=korean
--with-gd
--with-ttf
--with-jpeg
--with-png
--with-mm
--with-mysql=/usr
--with-pgsql
--with-imap-ssl
--with-imap
--with-gettext
--with-zlib
--with-pspell
--enable-mailparse
--enable-calender
--enable-sockets
--enable-sysvsem=yes
--enable-sysvshm=yes
--enable-ftp
--enable-magic-quotes
--enable-gd-native-ttf
--enable-versioning
--enable-url-includes
--enable-trans-id
--enable-inline-optimization
--enable-bcmath
--disable-debug

------------------  옵션 설명  ---------------------

아래는 위의 옵션들 중 주의할 연동 옵션들이다.
#--with-imap-ssl                   <--- 이 옵션이 imap 서버와 연동(ssl지원)
#--with-imap                       <--- 이 옵션이 imap 서버와 연동
위의 두 옵션때문에 큐메일의 courier-imap연동시 에러가 발생한다.
아까도 말했듯이 uw-imap2002를 설치만 하고 컨피그 하면 에러가 안난다.

#--with-apache=../apache_1.3.26    <-- 요 부분을 주의 자신의 아파치 소스 버전으로 고친다.
#--with-oci8=/home/oracle/8i       <--- 오라클을 사용하지 않는다면 이부분을 제거한다.
#--with-pgsql                      <--- postgresql을 사용하지 않을경우는 이부분을 제거한다.
#--with-ldap                       <--- ldap을 보통 안쓰므로 뺏으나 ldap과 함께 연동하려면 이옵션을 추가

---------------------------------------------------


두번째 경우 mysql만 연동시 컨피그 옵션.
만약 오라클과 postgresql을 사용하지 않고 mysql만 연동시 옵션 설정이다.
위의 컨피그를 하고 또 아래의 컨피그를 또다시 하는 황당한 일은 없기를 바란다.

echo "############################"
echo "### apache + php + mysql ###"
echo "############################"
CFLAGS="-O3 -march=i686 -funroll-loops -fomit-frame-pointer -I/usr/include/openssl"
./configure
--prefix=/usr
--with-exec-dir=/usr/bin
--with-apache=../apache_$ApacheVer
--with-config-file-path=/etc/httpd
--with-png-dir=/usr/lib
--with-freetype-dir=/usr/include/freetype2
--with-mod_charset
--with-charset=euc_kr
--with-xml
--with-language=korean
--with-gd
--with-ttf
--with-jpeg
--with-png
--with-mm
--with-mysql=/usr
--with-imap-ssl
--with-imap
--with-gettext
--with-zlib
--with-pspell
--enable-mailparse
--enable-calender
--enable-sockets
--enable-sysvsem=yes
--enable-sysvshm=yes
--enable-ftp
--enable-magic-quotes
--enable-gd-native-ttf
--enable-versioning
--enable-url-includes
--enable-trans-id
--enable-inline-optimization
--enable-bcmath
--disable-debug

컴파일
make

find /* > /root/php1
설치될 서버의 파일 목록을 작성하기 위해
설친전의 시스템에 존재하는 파일과
디렉토리 목록을 작성해두는 것이다.

php 모듈을 아파치 소스 디렉토리에 설치
make install

find /* > /root/php2
설치하고 난뒤에 생긴 파일들 리스트 조사

diff /root/php1 /root/php2 > /root/php-install
프로그램 설치전에 시스템에 존재하는 파일목록과
프로그램 설치후에 시스템에 존재하는 파일 목록을
비교하여 새로 시스템에 설치된 파일들을 추출한다.
이렇게 하면 새로 설치한 프로그램의 목록을 만들수 있다.
나중에 해당 프로그램을 삭제할때 아주 유용하다
제목 글쓴이 날짜
qmail-1.03설치⑤ (courier-imap연동) 비츠로 2003.02.28
qmail-1.03설치⑥ (qmail-scanner 스팸필터링) 비츠로 2003.02.28
qmail-1.03설치⑦ (qmailadmin 큐메일 웹관리툴) 비츠로 2003.02.28
qmail-1.03설치⑧ (squirrel웹메일과 연동) 비츠로 2003.02.28
apache-1.3.x설치① (필수조건과 pre configure) 비츠로 2003.03.02
apache-1.3.x설치② (mm, mod_ssl, mod_perl모듈) 비츠로 2003.03.02
apache-1.3.x설치③ (resin, jdk, jdbc연동) 비츠로 2003.03.02
apache-1.3.x설치③ (tomcat4, jdk, jdbc연동) 비츠로 2003.03.02
apache-1.3.x설치④ (php4 + db + mail연동) 비츠로 2003.03.02
apache-1.3.x설치⑤ (apahce설치, php가속기 추가) 비츠로 2003.03.02
apache-1.3.x설치⑥ (apahce, tomcat, resin가상호스팅설정) 비츠로 2003.03.02
리눅스에서 한통 ADSL 설정해 주기.. [5] 이희덕 2003.03.02
Sendmail 취약점 발표 [3] 조수권 2003.03.04
안녕하세요, php 보안 취약점인데 한번 보시길.. [28] Dopesoul 2003.03.08
php 의 보안 관련.. [7] Dopesoul 2003.03.08
apache server의 log file 관리 [3] 겨울늑대 2003.03.09
트래픽관리 Throttle-status 사용자 인증시키기 [1] Cksoft 2003.03.18
Apache1.3.27 + PHP4.3.1 + MySQL4.0.12 + ZendOptimizer2.1.0 [6] FriZeX 2003.03.19
mysql에서 사용자 권한을 잘못 부여하여 root로 접속불가, 사용권한 제한등 문제 해결방법 [3] 정종화 2003.03.20
커널 2.4 local ptrace-related vulnerability 패치하세요~ [8] 김도한 2003.03.20