본문 바로가기

리눅스

php 설치하기 (CentOS 5.2)

728x90
반응형
php 는 다음 URL에서 다운로드 받을 수 있다.
http://php.net/

다운로드 받은 php-5.2.9.tar.gz 파일의 압축을 푼다.
tar xvfz php-5.2.9.tar.gz

압축이 풀린 php-5.2.9 디렉토리로 이동하여 컴파일하기 위한 Makefile 을 만든다.
./configure \
--prefix=/usr/local/php \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-zlib-dir \
--with-bz2 \
--with-libxml-dir \
--with-gd \
--with-freetype-dir \
--with-jpeg-dir \
--with-png-dir \
--with-ttf \
--enable-mbstring \
--with-mysql=/usr/share/mysql \
--with-mysqli=/usr/lib/mysql/mysql_config \
--with-config-file-path=/etc \
--with-iconv \
--disable-ipv6 \
--enable-static \
--enable-maintainer-zts \
--enable-zend-multibyte \
--enable-inline-optimization \
--enable-sockets \
--enable-soap \
--with-openssl

위 명령어는 여러 줄로 표시된 하나의 명령어이다.

컴파일하고 설치한다.
make && make install

첨부한 파일은 charset 이 UTF-8 로 설정되도록 변경한 파일이다.
위 첨부파일을 /etc/ 디렉토리로 복사한다.

다음 명령어를 입력한다.
chcon -c -v -R -u system_u -r object_r -t textrel_shlib_t /usr/local/apache2/modules/libphp5.so

아파치 서비스를 재시작한다.
service apachectl restart


반응형

'리눅스' 카테고리의 다른 글

tomcat 설치하기 (CentOS 5.2)  (0) 2009.03.20
apache 설치하기 (CentOS 5.2)  (0) 2009.03.20
mysql 설치하기 (CentOS 5.2)  (0) 2009.03.20
리눅스 CentOS 5.2 설치하기  (8) 2009.03.20