Redhat 5.1 Install PHP 5.3.6

Source: Internet
Author: User
Tags fpm sapi


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 ....


    1. Yum install gcc libxml2-devel bzip2-devel zlib-devel \

    2. Curl-devel Libmcrypt-devel libjpeg-devel \

    3. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.