编译安装php
[root@db software]# tar xfphp-5.6.11.tar.gz
[root@db software]# cd php-5.6.11
[root@db php-5.6.11]# ./configure--prefix=/usr/local/php --with-mysql=/usr/local/mysql--with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-openssl--enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir--with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath--enable-shmop --enable-sysvsem --enable-inline-optimization --enable-mbregex--enable-mbstring --with-gd --enable-gd-native-ttf --with-mhash --enable-pcntl--enable-sockets --with-mcrypt --with-ldap --with-xmlrpc --enable-zip--enable-soap --with-bz2 --with-config-file-path=/etc --enable-fpm--with-config-file-scan-dir=/etc/php.d --enable-maintainer-zts
[root@db php-5.6.11]# make ZEND_EXTRA_LIBS=‘-liconv‘&& make install
3)php的配置
[root@db php-5.6.11]# cpphp.ini-production /etc/php.ini
[root@db php-5.6.11]# cp/usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
[root@db php-5.6.11]# cpsapi/fpm/init.d.php-fpm /etc/rc.d/init.d/php-fpm
[root@db php-5.6.11]# chmod +x/etc/rc.d/init.d/php-fpm
[root@db php-5.6.11]# chkconfig --addphp-fpm
[root@db php-5.6.11]# chkconfig php-fpm on
[root@db php-5.6.11]# service php-fpmstart
Starting php-fpm done
4、查看php、nginx、mysql是否安装成功
[root@db php-5.6.11]# ss -tnl
LISTEN 0 128 127.0.0.1:9000 *:*
LISTEN 0 50 *:3306 *:*
LISTEN 0 128 *:80
本文出自 “alex文章” 博客,转载请与作者联系!
原文地址:http://6206428.blog.51cto.com/6196428/1839927