PHP 설치하기

PHP 설치하기

0. 이전 설치 옵션 확인및 관련된 모듈 설치

1. 다운로드후 configure
소스 다운로드 http://www.php.net

 ‘./configure’ ‘–with-mysql=/usr/local/mysql’ ‘–with-apxs2=/usr/local/apache_2.2.14/bin/apxs’ ‘–enable-track-vars’ ‘–with-gd’ ‘–with-jpeg-dir’ ‘–with-freetype-dir’ ‘–with-png-dir’ ‘–with-zlib-dir=/usr/local/lib’ ‘–with-zlib’ ‘–enable-gd-native-ttf’ ‘–with-gif-dir=/usr/local/lib’ ‘–enable-memory-limit’ ‘–enable-freetype-4bit-antialias-hack’ ‘–with-gdbm’ ‘–enable-exif’ ‘–with-iconv’ ‘–with-db’ ‘–enable-mbstring=all’ ‘–enable-bcmath’ ‘–enable-ftp’ ‘–with-gettext’ ‘–with-openssl’ ‘–with-mcrypt’ ‘–with-curl’

옵션2
./configure –with-apache-install=/usr/local/apache2 –with-apxs2=/usr/local/apache2/bin/apxs –with-config-file-path=/usr/local/apache2/conf –with-mysql=/usr/local/mysql –with-gd –with-jpeg-dir=/usr/lib –with-png-dir=/usr/lib –with-gif-dir=/usr/lib –with-tiff-dir=/usr/lib –with-freetype-dir=/usr/include/freetype2 –with-zlib-dir=/usr/lib –with-libxml-dir=/usr/local/lib –enable-gd-native-ttf –enable-freetype-4bit-antialias-hack –with-language=korean –with-charset=euc_kr –enable-modules=so –enable-sigchild –disable-debug

2. make
make;

make test;

make install;

3. Apache 의 httpd.conf 확인 및 설정
/usr/local/apache2/conf/vi httpd.conf 에서
LoadModule php5_module modules/libphp5.so 이 추가 되었는지 확인 하고
AddType application/x-httpd-php .php .php3 .inc .ph .htm .html
AddType application/x-httpd-source .phps 추가

4. php.ini-recommended 복사
/usr/local/php-5.2.8/php.ini-recommended /usr/local/apache2/conf/php.ini


5. Zend Optimizer 설치
압축 해제 후
./install.sh
이후 php.ini 경로 설정 및 apache 설치 디렉토리 경로 확인을 해주게 됨

6. php.ini 조정
php.ini 일반적인 위치
/usr/local/lib/php.ini
/usr/local/Zend/etc/php.ini

short_open_tag =
register_globals =
post_max_size =
upload_max_filesize =

Leave a Reply

Your email address will not be published. Required fields are marked *