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 -zxvf php-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
cd /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