Site updated: 2024-01-04 09:03:14

This commit is contained in:
qinglong
2024-01-04 09:03:16 +08:00
parent d53254bd6b
commit 0534eeb6cf
202 changed files with 208 additions and 208 deletions

View File

@@ -26,7 +26,7 @@
"url": "https://hitoli.com/2024/01/03/Centos7%E7%BC%96%E8%AF%91%E5%8D%87%E7%BA%A7nginx/",
"title": "Centos7编译升级nginx",
"date_published": "2024-01-03T09:40:00.000Z",
"content_html": "<h4 id=\"配置\"><a class=\"anchor\" href=\"#配置\">#</a> 配置</h4>\n<p>./configure<br />\n# 安装目录<br />\n --prefix=/usr/local/nginx<br />\n#nginx 运行时的非特权用户<br />\n --user=nginx<br />\n#nginx 运行时的非特权用户组<br />\n --group=nginx<br />\n#nginx 运行时 pid 的目录<br />\n --pid-path=/var/run/nginx/nginx.pid<br />\n# 锁定文件目录,防止误操作,或其他使用<br />\n --lock-path=/var/lock/nginx.lock<br />\n#nginx 错误日志目录<br />\n --error-log-path=/var/log/nginx/error.log<br />\n#nginx 运行日志目录<br />\n --http-log-path=/var/log/nginx/access.log<br />\n# 开启 gz 模块,压缩静态页面<br />\n --with-http_gzip_static_module<br />\n--with-http_gunzip_module<br />\n# 开启 ssl 模块<br />\n --with-http_ssl_module<br />\n# 开启 http2 模块<br />\n --with-http_v2_module<br />\n#openssl 目录<br />\n --with-openssl=/home/openssl-3.2.0<br />\n#nginx 的客户端状态<br />\n --with-http_stub_status_module<br />\n--with-http_realip_module<br />\n# 设定客户端请求的临时目录<br />\n --http-client-body-temp-path=/usr/local/nginx/client<br />\n# 设定 http 代理临时目录<br />\n --http-proxy-temp-path=/usr/local/nginx/proxy<br />\n# 设定 fastcgi 临时目录<br />\n --http-fastcgi-temp-path=/usr/local/nginx/fastcgi<br />\n# 设定 uwsgi 临时目录<br />\n --http-uwsgi-temp-path=/usr/local/nginx/uwsgi<br />\n# 设定 scgi 临时目录<br />\n --http-scgi-temp-path=/usr/local/nginx/scgi</p>\n<figure class=\"highlight bash\"><figcaption data-lang=\"bash\"></figcaption><table><tr><td data-num=\"1\"></td><td><pre>./configure <span class=\"token parameter variable\">--prefix</span><span class=\"token operator\">=</span>/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-openssl<span class=\"token operator\">=</span>/home/openssl-3.2.0</pre></td></tr></table></figure><h4 id=\"编译\"><a class=\"anchor\" href=\"#编译\">#</a> 编译</h4>\n<figure class=\"highlight bash\"><figcaption data-lang=\"bash\"></figcaption><table><tr><td data-num=\"1\"></td><td><pre>make不要make install</pre></td></tr></table></figure><h4 id=\"备份\"><a class=\"anchor\" href=\"#备份\">#</a> 备份</h4>\n<figure class=\"highlight bash\"><figcaption data-lang=\"bash\"></figcaption><table><tr><td data-num=\"1\"></td><td><pre><span class=\"token function\">mv</span> /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.old</pre></td></tr></table></figure><h4 id=\"更新\"><a class=\"anchor\" href=\"#更新\">#</a> 更新</h4>\n<figure class=\"highlight bash\"><figcaption data-lang=\"bash\"></figcaption><table><tr><td data-num=\"1\"></td><td><pre><span class=\"token function\">cp</span> /root/nginx-1.24.0/objs/nginx /usr/local/nginx/sbin/</pre></td></tr></table></figure>",
"content_html": "<h4 id=\"配置\"><a class=\"anchor\" href=\"#配置\">#</a> 配置</h4>\n<p>./configure<br />\n# 安装目录<br />\n --prefix=/usr/local/nginx<br />\n#nginx 运行时的非特权用户<br />\n --user=nginx<br />\n#nginx 运行时的非特权用户组<br />\n --group=nginx<br />\n#nginx 运行时 pid 的目录<br />\n --pid-path=/var/run/nginx/nginx.pid<br />\n# 锁定文件目录,防止误操作,或其他使用<br />\n --lock-path=/var/lock/nginx.lock<br />\n#nginx 错误日志目录<br />\n --error-log-path=/var/log/nginx/error.log<br />\n#nginx 运行日志目录<br />\n --http-log-path=/var/log/nginx/access.log<br />\n# 开启 gz 模块,压缩静态页面<br />\n --with-http_gzip_static_module<br />\n--with-http_gunzip_module<br />\n# 开启 ssl 模块<br />\n --with-http_ssl_module<br />\n# 开启 http2 模块<br />\n --with-http_v2_module<br />\n#openssl 目录<br />\n --with-openssl=/home/openssl-3.2.0<br />\n#nginx 的客户端状态<br />\n --with-http_stub_status_module<br />\n--with-http_realip_module<br />\n# 设定客户端请求的临时目录<br />\n --http-client-body-temp-path=/usr/local/nginx/client<br />\n# 设定 http 代理临时目录<br />\n --http-proxy-temp-path=/usr/local/nginx/proxy<br />\n# 设定 fastcgi 临时目录<br />\n --http-fastcgi-temp-path=/usr/local/nginx/fastcgi<br />\n# 设定 uwsgi 临时目录<br />\n --http-uwsgi-temp-path=/usr/local/nginx/uwsgi<br />\n# 设定 scgi 临时目录<br />\n --http-scgi-temp-path=/usr/local/nginx/scgi</p>\n<figure class=\"highlight bash\"><figcaption data-lang=\"bash\"></figcaption><table><tr><td data-num=\"1\"></td><td><pre>./configure <span class=\"token parameter variable\">--prefix</span><span class=\"token operator\">=</span>/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-openssl<span class=\"token operator\">=</span>/home/openssl-3.2.0</pre></td></tr></table></figure><h4 id=\"编译\"><a class=\"anchor\" href=\"#编译\">#</a> 编译</h4>\n<figure class=\"highlight bash\"><figcaption data-lang=\"bash\"></figcaption><table><tr><td data-num=\"1\"></td><td><pre>make不要make install</pre></td></tr></table></figure><h4 id=\"备份\"><a class=\"anchor\" href=\"#备份\">#</a> 备份</h4>\n<figure class=\"highlight bash\"><figcaption data-lang=\"bash\"></figcaption><table><tr><td data-num=\"1\"></td><td><pre><span class=\"token function\">cp</span> /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.old</pre></td></tr></table></figure><h4 id=\"更新\"><a class=\"anchor\" href=\"#更新\">#</a> 更新</h4>\n<figure class=\"highlight bash\"><figcaption data-lang=\"bash\"></figcaption><table><tr><td data-num=\"1\"></td><td><pre><span class=\"token comment\">#关闭 nginx</span></pre></td></tr><tr><td data-num=\"2\"></td><td><pre>nginx <span class=\"token parameter variable\">-s</span> stop</pre></td></tr><tr><td data-num=\"3\"></td><td><pre><span class=\"token comment\">#更新 nginx</span></pre></td></tr><tr><td data-num=\"4\"></td><td><pre><span class=\"token function\">cp</span> /root/nginx-1.24.0/objs/nginx /usr/local/nginx/sbin/</pre></td></tr><tr><td data-num=\"5\"></td><td><pre><span class=\"token comment\">#启动 nginx</span></pre></td></tr><tr><td data-num=\"6\"></td><td><pre>nginx</pre></td></tr></table></figure>",
"tags": [
"工作",
"解决问题",
@@ -97,9 +97,9 @@
"Windows",
"工具",
"SpringBoot",
"快速部署",
"Bat",
"批处理",
"快速部署"
"批处理"
]
},
{