Since version 5, Centos is not including php4 packet in their distribution. So i have 2 choice:
- keeping the current OS version and update the kernel
- use the latest OS version and install php4 manually
My friend suggest option #2. I tried that and well done!!
Here's the steps:
- Download php-4.4.9 and apache-1.3.42
- Install apache, this should be easy.
- Install php, this is the main challenge. the detail is next..
- i'd use these modules: mysql, pgsql, gd. Then i installs devel packet of each modules.
- It looks like gd requires zlib, jpeg, and png.. si i installed those packets with the devel parts.
- Then i configure php
- ./configure --with-mysql --with-apxs=/opt/apache/bin/apxs --with-pgsql=/usr/lib/pgsql/ --with-gd --with-jpeg-dir --with-zlib-dir --with-png-dir
- make
- make install
- set "LoadModule php4_module libexec/libphp4.so" on httpd.conf
- start apache
- Done
[root@vmware php-4.4.9]# make install
Installing PHP SAPI module: apache
[activating module `php4' in /opt/apache/conf/httpd.conf]
cp libs/libphp4.so /opt/apache/libexec/libphp4.so
chmod 755 /opt/apache/libexec/libphp4.so
cp /opt/apache/conf/httpd.conf /opt/apache/conf/httpd.conf.bak
cp /opt/apache/conf/httpd.conf.new /opt/apache/conf/httpd.conf
rm /opt/apache/conf/httpd.conf.new
Installing PHP CLI binary: /usr/local/bin/
Installing PHP CLI man page: /usr/local/man/man1/
Installing PEAR environment: /usr/local/lib/php/
[PEAR] Archive_Tar - installed: 1.3.2
[PEAR] Console_Getopt - installed: 1.2.1
[PEAR] HTML_Template_IT- installed: 1.1
[PEAR] Net_UserAgent_Detect- installed: 2.0.1
warning: pear/PEAR requires package "pear/Structures_Graph" (recommended version 1.0.2)
pear/PEAR can optionally use package "pear/XML_RPC" (version >= 1.4.0)
[PEAR] PEAR - installed: 1.5.0
Wrote PEAR system config file at: /usr/local/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
[PEAR] Structures_Graph- installed: 1.0.2
Installing build environment: /usr/local/lib/php/build/
Installing header files: /usr/local/include/php/
Installing helper programs: /usr/local/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/man/man1/
page: phpize.1
page: php-config.1
No comments:
Post a Comment