PHP编译安装
nginx 运行
下载 PHP 源码包
#wget http://cn2.php.net/distributions/php-5.6.0.tar.xz
#xz -d php-5.6.0.tar.xz
#tar xf php-5.6.0.tar -C /usr/local/src/
yum install zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel
libiconv-devel(源码包,编译安装)
(./configure make make install )
yum install freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel bz2-devel
(yum install epel-release.noarch )
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
yum -y install libmcrypt-devel mhash mcrypt
创建 www 用户
#groupadd www
#useradd -g www -s /sbin/nologin -M www
编译安装
#cd /usr/local/src/php-5.6.0/
#./configure
–prefix=/usr/local/php56
–with-config-file-path=/usr/local/php56/etc
–enable-inline-optimization
–disable-debug
–disable-rpath
–enable-shared
–enable-opcache
–enable-fpm
–with-fpm-user=www
–with-fpm-group=www
–with-mysql=mysqlnd
–with-mysqli=mysqlnd
–with-pdo-mysql=mysqlnd
–with-gettext
–enable-mbstring
–with-iconv
–with-mcrypt
–with-mhash
–with-openssl
–enable-bcmath
–enable-soap
–with-libxml-dir
–enable-pcntl
–enable-shmop
–enable-sysvmsg
–enable-sysvsem
–enable-sysvshm
–enable-sockets
–with-curl
–with-zlib
–enable-zip
–with-bz2
–with-readline
–with-gd
提示 : 某些包 缺少 , yum install 包
加号中部分可以先忽略 :