wget http://nginx.org/download/nginx-1.19.0.tar.gz
apt install openssl libssl-dev libpcre3 libpcre3-dev zlib1g-dev make
./configure --prefix=/opt/nginx --with-http_ssl_module --http-client-body-temp-path=/opt/nginx/temp/client_body_temp --http-proxy-temp-path=/opt/nginx/temp/proxy_temp --http-fastcgi-temp-path=/opt/nginx/temp/fastcgi_temp --http-uwsgi-temp-path=/opt/nginx/temp/uwsgi_temp --http-scgi-temp-path=/opt/nginx/temp/scgi_temp
make && make install
cd /opt/nginx && mkdir temp && sbin/nginx
sbin/nginx
sbin/nginx -s stop
检查nginx.conf配置文件的正确性和完整性
sbin/nginx -t
```
- 重新加载
修改nginx.conf配置文件后,可以不用重启nginx实现热加载配置信息
```
sbin/nginx -s reload
```
原文:https://www.cnblogs.com/iscodercn/p/12974575.html