centos6.7(64位)
nginx下载地址:http://nginx.org/download/nginx-1.6.0.tar.gz
php下载地址:http://php.net/get/php-5.6.15.tar.gz/from/a/mirror
安装所有软件需要的包:yum -y install make gcc gcc-c++ gcc-g77 pcre-devel openssl openssl-devel flex bison file libtool libtool-libs autoconf kernel-devel libjpeg libjpeg-devel libpng libpng-devel libpng10 libpng10-devel gd gd-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glib2 glib2-devel bzip2 bzip2-devel libevent libevent-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel gettext gettext-devel ncurses-devel gmp-devel pspell-devel unzip libcap lsof
# 第一步安装nginx
wget http://nginx.org/download/nginx-1.6.0.tar.gz
tar xvf nginx-1.6.0.tar.gz
cd nginx-1.6.0
./configure --prefix=/usr/local/nginx
make
make install
开启nginx:/usr/local/nginx/sbin/nginx
重启nginx:/usr/local/nginx/sbin/nginx -s reload
#第二步安装php
wget php压缩包
cd php5.6的解压包
./configure --prefix=/usr/local/php5.6 --enable-fpm --with-curl --with-mysql --enable-mysqlnd --with-pdo-mysql --enable-mbstring --enable-tokenizer --with-openssl --with-zlib --with-pcre-dir --with-mcrypt --enable-sockets
make
make install
# 错误“./configure是错误:No package php-mcrypt available” 解决办法:yum install epel-release //扩展包更新包
yum update //更新yum源
yum install libmcrypt libmcrypt-devel mcrypt mhash
以上3步就ok了 (完)