Redhat 5.1 Install PHP 5.3.6
Now various versions of the pit. resulting in no lower version of PHP
The problem may be caused by the use. No package is available because the system version is not promoted ....
Yum install gcc libxml2-devel bzip2-devel zlib-devel \
Curl-devel Libmcrypt-devel libjpeg-devel \
Libpng-devel Gd-devel Mysql-devel Php-pecl-zip
Download package
wget Http://cn.php.net/get/php-5.3.6.tar.bz2/from/this/mirror
TAR-XJF php-5.3.6.tar.bz2
CD php-5.3.6
./configure--prefix=/usr/local/php53 \
--WITH-CONFIG-FILE-PATH=/ETC/PHP53 \
--WITH-CONFIG-FILE-SCAN-DIR=/ETC/PHP53/PHP.D \
--ENABLE-FPM \
--with-fpm-user=apache \
--with-fpm-group=apache \
--WITH-LIBDIR=LIB64 \
--with-mysql \
--WITH-MYSQLI \
--enable-mbstring \
--disable-debug \
--disable-rpath \
--WITH-BZ2 \
--with-curl \
--with-gettext \
--with-iconv \
--WITH-OPENSSL \
--WITH-GD \
--with-mcrypt \
--with-pcre-regex \
--with-zlib
Make-j4 && sudo make install
The following content appears in the #make, which can be ignored: The installation can be
Warned TEST SUMMARY
---------------------------------------------------------------------
via [EXT/PDO_SQLITE/TESTS/COMMON.PHPT]
SQLite PDO common:bug #34630 (inserting streams as lobs) [EXT/PDO_SQLITE/TESTS/BUG_34630.PHPT] (warn:xfail section but T EST passes)
via [EXT/SQLITE/TESTS/PDO/COMMON.PHPT]
SQLite2 PDO common:bug #34630 (inserting streams as lobs) [EXT/SQLITE/TESTS/PDO/BUG_34630.PHPT] (warn:xfail sections but Test passes)
Bug #39863 (file_exists () silently truncates after a null byte) [EXT/STANDARD/TESTS/FILE/BUG39863.PHPT] (Warn:xfail secti On but test passes)
sudo mkdir/etc/php53
sudo cp Php.ini-production/etc/php53/php.ini
Sed-i-E ' s#php_fpm_conf=\${prefix}/etc/php-fpm.conf#php_fpm_conf=/etc/php53/php-fpm.conf# ' sapi/fpm/ init.d.php-fpm
CP SAPI/FPM/INIT.D.PHP-FPM/ETC/INIT.D/PHP-FPM
chmod a+x/etc/init.d/php-fpm
/sbin/chkconfig--add PHP-FPM
/sbin/chkconfig PHP-FPM on
sudo cp sapi/fpm/php-fpm.conf/etc/php53/
Edit File/etc/php53/php-fpm.conf
PID = Run/php-fpm.pid
Listen = 127.0.0.1:9000
Pm.start_servers = 10
Pm.min_spare_servers = 5
Pm.max_spare_servers = 20
Start up and see ...
/ETC/INIT.D/PHP-FPM start
NETSTAT-ANTPU | grep:9000
Netstat-anpo|grep PHP-FPM |wc-l
Ps-ef | grep php-fpm
This article is from the "Yu Hogeng" blog, make sure to keep this source http://yhgcenter.blog.51cto.com/2623981/1912426
Redhat 5.1 Install PHP 5.3.6