安装php需要的软件。yum -y install gcc gcc-c++ libzip-devel libxml2-devel libiconv libjpeg-devel libpng-devel
yum -y install gdgd-devel bzip2-devel curl-devel freetype-devel zlib-devel glibc-devel glib2-devel
yum -y install libtool-ltdl-devel pcre-devel libmcrypt-devel mhash-devel libxslt-devel gettext-devel
安装libiconv库wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.tar.gz
tar zxf libiconv-1.13.tar.gz
cd libiconv-1.13
./configure –prefix=/usr/local/libiconv
make && make install
cd ..
安装PHPcd /home/darren/tools
#需要手动下载php,附件中也有
http://cn2.php.net/get/php-5.6.30.tar.gz/from/this/mirror
tar zxf php-5.6.30.tar.gz
cd php-5.6.30##############./configure –prefix=/usr/local/php
–enable-mysqlnd
–with-mysql=mysqlnd
–with-mysqli=mysqlnd
–with-pdo-mysql=mysqlnd
–with-iconv-dir=/usr/local/libiconv
–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
–with-curl
–with-mcrypt
–with-curlwrappers
–enable-mbregex
–enable-fpm
–enable-mbstring
–with-gd
–enable-gd-native-ttf
–with-openssl
–with-mhash
–enable-pcntl
–enable-sockets
–with-xmlrpc
–enable-zip
–enable-soap
–enable-short-tags
–enable-zend-multibyte
–enable-static
–with-xsl
–enable-ftp
–with-fpm-user=nginx
–with-fpm-group=nginx make && make install
#################################################################复制php配置文件php.ini
cp php.ini-production /usr/local/php/lib/php.ini
#复制fastcgi配置文件php-fpm.conf
cd /usr/local/php/etc/
cp php-fpm.conf.default php-fpm.conf
#################################################################
/usr/local/php/sbin/php-fpm -t #检查语法
/usr/local/php/sbin/php-fpm #启动php-fpm
cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm #拷贝启动脚本
chkconfig –add php-fpm #增加到开机启动项
chkconfig php-fpm on #设置开机启动######################################
一键安装php脚本:
附另一个生产环境编译参数:./configure –prefix=/usr/local/php
–with-mysql=mysqlnd
–with-mysqli=mysqlnd
–with-pdo-mysql=mysqlnd
–with-iconv-dir
–with-freetype-dir
–with-jpeg-dir
–with-png-dir
–with-zlib
–with-libxml-dir
–enable-xml
–disable-rpath
–enable-bcmath
–enable-shmop
–enable-sysvsem
–enable-inline-optimization
–with-curl
–with-mcrypt
–with-curlwrappers
–enable-mbregex
–enable-fpm
–enable-mbstring
–with-gd
–enable-gd-native-ttf
–with-openssl
–with-mhash
–enable-pcntl
–enable-sockets
–with-xmlrpc
–enable-zip
–enable-soap
–without-pear
相关资源:橘子快速启动软件(橘子启动器)v3.0绿色免费版-其它代码类资源…
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!