CENTOS5下安装php4

rpm -e
squirrelmail-1.4.8-5.el5.centos.10.noarch
piranha-0.8.4-16.el5.i386

利用红帽Piranha方案实现WEB负载均衡
http://www.chinaunix.net/jh/4/1057613.html

清理现有的php
rpm -qa |grep php
rpm -e php-5.1.6-27.el5
rpm -e php-mbstring-5.1.6-27.el5.i386
rpm -e php-cli-5.1.6-27.el5.i386
rpm -e php-common-5.1.6-27.el5

准备yum
可以先copy其它机器上的CentOS-Base.repo
yum源  yum.repos.d
yum update

rpm –import http://www.labcoding.com/yum/centos/RPM-GPG-KEY-Labcoding

如果不可以
cd /etc/pki/rpm-gpg/
wget http://www.labcoding.com/yum/centos/RPM-GPG-KEY-Labcoding

vi /etc/yum.repos.d/labcoding.repo
######################################
[Labcoding]
name=Labcoding Repository for CentOS $releasever $basearch
failovermethod=priority
baseurl=http://www.labcoding.com/yum/centos/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Labcoding
###########################################

yum update http*
yum install http*

yum install my*
yum install MySQL-python.i386

yum list php4
yum install php4*

在X64bit下 装php4版本
http://repo.conforge.com/conforge/CentOS/5/x86_64/RPMS/
手工下载 php4相关rpm
一个个自己装
以上网站只能想办法翻墙出去找
php4_x64wget ftp://rpmfind.net/linux/epel/5/x … -1.el5.1.x86_64.rpm
rpm -ivh libyaz-2.1.54-1.el5.1.x86_64.rpm
rpm -ivh php4-4.4.8-4.cf.centos5.x86_64.rpm –nodeps
rpm -ivh php4-pear-4.4.8-4.cf.centos5.x86_64.rpm

rpm -ivh php4-domxml-4.4.8-4.cf.centos5.x86_64.rpm
rpm -ivh php4-gd-4.4.8-4.cf.centos5.x86_64.rpm

yum install libc-client.x86_64
rpm -ivh php4-imap-4.4.8-4.cf.centos5.x86_64.rpm

rpm -ivh php4-ldap-4.4.8-4.cf.centos5.x86_64.rpm
rpm -ivh php4-mbstring-4.4.8-4.cf.centos5.x86_64.rpm
rpm -ivh php4-mysql-4.4.8-4.cf.centos5.x86_64.rpm
rpm -ivh php4-ncurses-4.4.8-4.cf.centos5.x86_64.rpm
rpm -ivh php4-odbc-4.4.8-4.cf.centos5.x86_64.rpm
rpm -ivh php4-pgsql-4.4.8-4.cf.centos5.x86_64.rpm
rpm -ivh php4-snmp-4.4.8-4.cf.centos5.x86_64.rpm
rpm -ivh php4-xmlrpc-4.4.8-4.cf.centos5.x86_64.rpm

wget ftp://ftp.pbone.net/mirror/cento … 2.el5.kb.x86_64.rpm
rpm -ivh js-1.70-2.el5.kb.x86_64.rpm
wget ftp://ftp.univie.ac.at/systems/l … 1.el5.rf.x86_64.rpm
rpm -ivh sablotron-1.0.3-1.el5.rf.x86_64.rpm

rpm -ivh php4-xslt-4.4.8-4.cf.centos5.x86_64.rpm
rpm -ivh php4-devel-4.4.8-4.cf.centos5.x86_64.rpm

ln -s /opt/php4/lib/php4/domxml.so /usr/lib/php4/domxml.so
ln -s /opt/php4/lib/php4/gd.so /usr/lib/php4/gd.so
ln -s /opt/php4/lib/php4/imap.so /usr/lib/php4/imap.so
ln -s /opt/php4/lib/php4/ldap.so /usr/lib/php4/ldap.so
ln -s /opt/php4/lib/php4/mbstring.so /usr/lib/php4/mbstring.so
ln -s /opt/php4/lib/php4/mysql.so /usr/lib/php4/mysql.so
ln -s /opt/php4/lib/php4/ncurses.so /usr/lib/php4/ncurses.so
ln -s /opt/php4/lib/php4/odbc.so /usr/lib/php4/odbc.so
ln -s /opt/php4/lib/php4/pgsql.so /usr/lib/php4/pgsql.so
ln -s /opt/php4/lib/php4/snmp.so /usr/lib/php4/snmp.so
ln -s /opt/php4/lib/php4/xmlrpc.so /usr/lib/php4/xmlrpc.so
ln -s /opt/php4/lib/php4/xslt.so /usr/lib/php4/xslt.so

ln -s /opt/php4/bin/php4 /usr/bin/php4

vi /etc/httpd/conf.d/php4.conf
#################################
LoadModule php4_module modules/libphp4.so
AddType application/x-httpd-php .php
DirectoryIndex index.php
#################################

service httpd restart

另外 看到的,不知道是不是可以 没有试过

http://www.opensubscriber.com/me … s.org/10249550.html
HI,

I’m building php4.4.9 on centos 5.2 x64, and I need it to use the
systems mysql libs, not the bundled ones….

./configure –with-libdir=lib64 –with-dbx –with-openssl –with-pcre
–with-pgsql –with-posix \
–with-xml –with-zlib –with-gd=/usr –enable-gd-native-ttf
–enable-bcmath –enable-fastcgi \
–disable-ipv6 –enable-force-cgi-redirect –with-bz2 –enable-ftp
–with-apxs2 –with-iconv \
–with-freetype-dir=/usr –with-ttf –with-jpeg-dir=/usr
–with-xpm-dir=/usr –with-png \
–with-mysql=/usr –prefix=/usr/local

and all i’m getting is this:
checking for mysql_close in -lmysqlclient… no
checking for mysql_error in -lmysqlclient… no
configure: error: mysql configure failed. Please check config.log for
more information.

this is what is going on in config.log:
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so
when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a
when searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient

I’ve tried sooo many config combinations. config finishes if using
bundled mysql libs, but thats not enough… =(…

Any hope on this? Has anybody solved this before?

Thanks in advance!

# rpm -qa | grep mysql
mysql-5.0.45-7.el5
mysql-devel-5.0.45-7.el5
mysql-devel-5.0.45-7.el5
mysql-5.0.45-7.el5


留下评论