美文网首页
nginx快捷安装

nginx快捷安装

作者: 指尖架构141319 | 来源:发表于2019-11-04 17:18 被阅读0次

1.下载

wget http://nginx.org/download/nginx-1.13.6.tar.gz

2.解压

tar -zvxf nginx-1.13.6.tar.gz

3.配置路径

进入nginx安装目录执行下面指令:

./configure --prefix=/usr/local/nginx

如果报错:
./configure: error: the HTTP rewrite module requires the PCRE library.
执行:
yum -y install pcre-devel
如果还报错:
./configure: error: the HTTP cache module requires
执行:
yum -y install openssl openssl-devel

4.执行make安装

make
make install

5.启动

/usr/nginx/sbin/nginx

6.停止

杀进程

7.平滑启动

/usr/nginx/sbin/nginx -s reload

8.重启配置文件conf

cd /usr/local/nginx/sbin/ ./nginx -c conf/nginx.conf

相关文章

网友评论

      本文标题:nginx快捷安装

      本文链接:https://www.haomeiwen.com/subject/unbdbctx.html