1、安裝編譯工具及庫文件php
yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel
2、首先要安裝 PCRE
PCRE 做用是讓 Ngnix 支持 Rewrite 功能。
一、下載 PCRE 安裝包,下載地址: http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gzmysql
# wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
#tar zxvf pcre-8.35.tar.gz
#cd pcre-8.35
#./configure
#make && make install
#pcre-config --version
3、安裝nginxnginx
一、下載c++
wget http://nginx.org/download/nginx-1.10.1.tar.gzsql
二、#tar -zxf nginx-1.10.1.tar.gzcurl
#cd nginx-1.10.1socket
#./configure --prefix=/usr/local/nginx--with-http_stub_status_module --with-http_ssl_module --with-file-aio --with-http_realip_module --with-pcre=/root/soft/pcre-8.35工具
#make && make installurl
4、php安裝spa
#wget http://cn2.php.net/distributions/php-5.6.26.tar.gz
#tar -zxf php-5.6.26.tar.gz
#cd php-5.6.26
#./configure --prefix=/usr/local/php --enable-fpm --with-mcrypt --enable-mbstring --disable-pdo --with-curl --disable-debug --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --with-mhash --enable-zip --with-pcre-regex --with-mysql --with-mysqli --with-gd --with-jpeg-dir
#make && make install