본문 바로가기
System Engineering/Linux

3. PHP 설치

by 린지v 2010. 8. 8.

# tar -zxvf php-5.2.14.tar.gz
# cd php-5.2.14
# ./configure \--prefix=/usr/local/server/php \--with-apxs2=/usr/local/server/apache/bin/apxs \--with-mysql=/usr/local/server/mysql \ --with-config-file-path=/usr/local/server/apache/conf \--disable-debug \--enable-safe-mode \--enable-track-vars \--enable-sockets \--with-mod_charset \--with-charset=utf8 \--with-xml \--with-language=korean \--enable-mailparse \--enable-calender \--enable-sysvsem=yes \--enable-sysvshm=yes \--enable-ftp \--enable-magic-quotes \--enable-gd-native-ttf \--enable-url-includes \--enable-trans-id \--enable-inline-optimization \--enable-bcmath \--with-jpeg \--with-png \--with-zlib \--with-jpeg-dir=/usr \--with-png-dir=/usr/lib \--with-freetype-dir=/usr \--with-libxml-dir=/usr \--enable-exif \--with-gd \--with-ttf \--with-gettext \--enable-sigchild \--enable-mbstring
# make && make install

# cp php.ini-dist /usr/local/server/apache/conf/php.ini

# vi /usr/local/server/apache/conf/httpd.conf
<IfModule dir_module>
  DirectoryIndex index.html index.htm index.php
</IfModule>

<IfModule mine_module>
  AddType application/x-httpd-php .php
  AddType application/x-httpd-php-source .phps
</IfModule>


# /etc/init.d/httpd restart

# vi /usr/local/server/apache/htdocs/phpinfo.php
에 테스트 페이지를 작성한다.
<?php phpinfo(); ?>
저장하고 종료후 http://도메인/phpinfo.php에 접속하면 php 환경설정 페이지가 나타난다.

'System Engineering > Linux' 카테고리의 다른 글

시스템 종료와 재부팅  (0) 2010.08.08
4. phpMyAdmin & 텍스트큐브 설치  (0) 2010.08.08
2. Apache 설치  (0) 2010.08.08
1. MySQL 설치  (0) 2010.08.08
APM 설치전에 해야할 일  (0) 2010.08.08