#cd /usr/local/src
#wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz (也可以本地下载后上传上去)
#tar -zxvf pcre-8.39.tar.gz
#cd pcre-8.39
#./configure
报错:[error]configure: error: You need a C++ compiler for C++ support.
解决报错执行:#yum -y install gcc-c++
重新执行
#./configure
#make
#make install
#cd /usr/local/src
#wget http://zlib.net/zlib-1.2.11.tar.gz
#tar -zxvf zlib-1.2.11.tar.gz
#cd zlib-1.2.11
#./configure
#make
#make install
#cd /usr/local/src
#wget http://nginx.org/download/nginx-1.17.7.tar.gz
#tar -zxvf nginx-1.17.7.tar.gz
#cd nginx-1.17.7
#./configure
#make
#make install
linux 修改路径/usr/local/nginx/conf/nginx.conf,
修改端口为8090,localhost修改为你服务器ip地址。(
启动:
# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf、
重启:
#cd /usr/local/nginx/sbin
#./nginx -s reload
查看进程号
#ps -ef|grep nginx
杀死进程
kill -quit 端口号
查看nginx启动成功:
访问ip:端口
出现以下界面即为成功、