sudo apt-get install Nginx
cd /etc/Nginx/sites-enabled
vi/etc/Nginx/sites-available/default(配置文件就是这个,其他没必要改)
http://cn2.php.net/distributions/php-7.0.13.tar.gz
tar -zxvfphp-7.0.13.tar.gz
cd PHP-7.0.13
./configure --help
./configure --prefix=/home/skinglzw8/PHP-7.0.13 --with-pdo-MysqL --enable-fpm --with-libdir=lib64 --disable-cli
报错的话,看缺少什么,安装下,我是缺少下面这些,装完,PHP7就安装成功了
apt-get install libxml2-dev
apt-get install libxml2
cd /PHP-7.0.13
cp PHP.ini-development PHP.ini
cd /PHP-7.0.13/etc
cd /home/skinglzw8/PHP-7.0.13/etc/PHP-fpm.d
cp www.conf.default www.conf
cd /home/skinglzw8/PHP-7.0.13/sapi/fpm/
cp ./init.d.PHP-fpm /etc/init.d/PHP-fpm
groupadd nobody
cd /etc/init.d
bash ./PHP-fpm start
cd /home/skinglzw8/PHP-7.0.13/etc/PHP-fpm.d
vi www.conf
pm.max_children=10
pm.start_servers=4
pm.min_spare_servers=2
pm.max_spare_servers=10
min_spare_servers + (max_spare_servers - min_spare_servers) / 2