RedhatES4.0 + PHP5.1.6のインストール手順
またまた
ひょんなことで、RedhatES4.0に、PHPをインストールすることになりました。
せっかくなので、インストール手順を覚書します。
詳しい方、ご指摘お願いしますね・・
#は、コメントで、%は、コマンドプロンプトです。
ちなみに、こちらも、データベースはpostgreSQLです。
あ、文字コードはUTF-8です。
1.”PHP5.1.6″ is installed.
#”libxml” is needed wheny installing “PHP5″ in “RedhatES4.0.”
#Existence is checked.
%rpm -qa | grep libxml2
%cd /usr/local/src
%tar zxvf php-5.1.6.tar
%cd pho-5.1.6
%./configure –with-apxs2=/usr/local/httpd/bin/apxs –enable-mbstring
–enable-mbstr-enc-trans –enable-mbregex –enable-trans-sid –enable-zend-multibyte
–enable-track-vars –enable-exif –enable-ftp –enable-sockets
–with-pgsql=/usr/local/pgsql –without-mysql –enable-sqlite-utf8
%make
%make install
“php.ini” is edit
# sample file is copied.
%cp /usr/local/src/php-5.1.6/php.ini-dist /usr/local/lib/php.ini
%vi /usr/local/lib/php.ini
#”mbstring” is edit as follows.
——————————————
mbstring.language = Japanese
mbstring.internal_encoding = UTF-8
mbstring.http_input = pass
mbstring.http_output = pass
mbstring.encoding_translation = off
mbstring.detect_order = auto
mbstring.substitute_character = none
mbstring.func_overload = 0
——————————————
#”httpd.conf” is corrected.
——————————————
%vi /usr/local/httpd/conf/httpd.conf
AddType application/x-httpd-php .php
DirectoryIndex index.php index.html #Arbitrary
LoadModule php5_module module/libphp5.so
——————————————
#Apache is rebooted.
%/usr/local/httpd/bin/apachectl restart
2.PHP is tested.
#The next file is created.
<?php phpinfo(); ?>
/usr/local/httpd/httpdoc/ <-copy here.
↑
#Please change “Web contener” into a suitable place later.
以上です。