centos6.5安裝php5.6.0

技術小胖子發表於2017-11-08

安裝支援軟體包

 yum install -y openssl* libxml2* bzip* libcurl* 

安裝過程:

./configure

–prefix=/usr/local/php

–with-openssl

–enable-fpm

–enable-sockets

–enable-sysvshm

–enable-mbstring

–with-freetype-dir

–with-jpeg-dir

–with-png-dir

–with-zlib-dir

–with-libxml-dir=/usr

–enable-xml

–with-config-file-path=/etc

–with-config-file-scan-dir=/etc/php.d

–with-bz2

–with-curl

其它選項:

–with-mhash

–with-mcrypt

–with-mysqli=/usr/bin/mysql_config

–with-mysql=/usr/include/mysql

make

make install

cp init.d.php-fpm /etc/init.d/php-fpm

chmod +x /etc/init.d/php-fpm 

chkconfig –add php-fpm

chkconfig php-fpm on

cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf

service php-fpm start

vim /usr/local/php/etc/php-fpm.conf

    listen.allowed_clients = 192.168.100.160

    listen = 192.168.100.161:9000

service php-fpm restart





 本文轉自1321385590 51CTO部落格,原文連結:http://blog.51cto.com/linux10000/1710960,如需轉載請自行聯絡原作者




相關文章