nginx安装运维

1.安装:

一、安装编译工具、依赖包
1.依赖
# 主要安装 pcre-devel Nginx 需要
$ yum -y install gcc gcc-c++ autoconf automake
$ yum -y install zlib zlib-devel openssl openssl-devel pcre-devel


2.解压: tar -zxvf nginx-1.14.0.tar.gz

需求模块可以参考,是否需要
3.配置: ./configure  --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-ipv6 --with-http_sub_module 
# j2 表示 2 个核心,可根据实际需求修改

4.安装: make  -j2 & make install 


5. 重启 nginx
service nginx restart

----修改配置文件


---检查配置文件是否正确
sbin/nginx -t

猜你喜欢

转载自www.cnblogs.com/students/p/11933669.html