1.下载所有待编译安装的包
wget http://nginx.org/download/nginx-1.9.9.tar.gz
wget http://cn2.php.net/distributions/php-7.2.8.tar.gz
php 装好后自带php-fpm
注意: 如果发现装好后没带php-fpm,那十有八九是你编译的configure那条命令参数没带全,注意有个参数叫做--fpm什么的
Nginx:
依赖插件安装:(centos用户自己谷歌下相应的组件)
sudo apt-get install openssl libssl-dev
sudo apt-get install libpcre3 libpcre3-dev
安装:
(!!!!! 所有的代码 一定记得该换行的时候换行,--参数全部都要敲到命令行,防止编译的时候有的参数没编译上)
(方法一)
./configure --prefix=/usr/local/service --with-http_ssl_module
(方法二)
./configure --user=nginx\
--group=nginx\
--prefix=/usr/local/nginx\
--with-http_stub_status_module\
--with-http_ssl_module\
--with-http_gzip_static_module\
--with-ipv6
make
make install
异常抉择:
如出现:nginx: [error] invalid PID number