php5.2.13をCentOSにソースからインストールします。
$ su -
>password
ダウンロード先URL
http://www.php.net/downloads.php
# cd /usr/local/src/
# wget http://jp2.php.net/get/php-5.2.13.tar.gz/from/jp.php.net/mirror
# tar zxvf php-5.2.13.tar.gz
# cd php-5.2.13
# yum -y install libxml2-devel gd-devel
# CFLAGS=’-O3′ \
‘./configure’ \
‘–with-apxs2=/usr/local/apache2/bin/apxs’ \
‘–with-libxml-dir’ \
‘–with-openssl’ \
‘–with-zlib’ \
‘–with-gd’ \
‘–with-jpeg-dir=/usr/lib/’ \
‘–with-png-dir=/usr/lib/’ \
‘–with-freetype-dir=/usr/lib’ \
‘–with-pear’ \
‘–with-xmlrpc’ \
‘–with-mysql=/usr/local/mysql’ \
‘–with-mysqli=/usr/local/mysql/bin/mysql_config’ \
‘–enable-gd-native-ttf’ \
‘–enable-gd-jis-conv’ \
‘–enable-calendar’ \
‘–enable-exif’ \
‘–enable-mbstring’ \
‘–enable-mbregex’ \
‘–enable-zend-multibyte’
※configureオプション詳細
http://www.php.net/manual/ja/configure.about.php
# make
#make install
# cp /usr/local/src/php-5.2.13/php.ini-dist /usr/local/lib/php.ini
# vi /usr/local/apache2/conf/httpd.conf
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
# service httpd restart
以上。
make; make install は必要ないんでしょうか
type:コメント [ ]