Linux安装Nginx
1、下载nginx安装包,官网地址:http://nginx.org/download/
2、安装编译工具及库文件
yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel pcre-devel
3、安装nginx,建议开启ssl模式,否则后续配置https还需要重新编译
#编译
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
#安装
make && make install
4、启动nginx
cd /usr/local/nginx/sbin
启动:./nginx
重启:./nginx -s reload
校验配置:./nginx -t
更多nginx的配置,可参考 https://blog.csdn.net/weixin_50367873/article/details/114821637