In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
1. Check the current version and compile-time parameters before starting:
[root@www] # / usr/local/nginx/sbin/nginx-Vnginx version: nginx/1.12.2built by gcc 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC) built with OpenSSL 1.0.1e-fips 11 Feb 2013TLS SNI support enabledconfigure arguments:-- user=www-- group=www-- prefix=/usr/local/nginx-- with-http_stub_status_module-- with-http_ssl_module
Copy the compilation parameters, which will be used when compiling the new version.
2. Download the new version: http://nginx.org/en/download.html
Cd nginx-1.14.0./configure-user=www-group=www-prefix=/usr/local/nginx-with-http_stub_status_module-with-http_ssl_modulemake
3. After the execution is completed, you do not need make install, back up the original binary startup file, and then copy the new version of the startup file.
Mv / usr/local/nginx/sbin/nginx / usr/local/nginx/sbin/nginx.bak [root@www nginx-1.14.0] # cp objs/nginx / usr/local/nginx/sbin/nginx
4. Test whether the copied file is valid:
[root@www nginx-1.14.0] # / usr/local/nginx/sbin/nginx-tnginx: the configuration file / usr/local/nginx/conf/nginx.conf syntax is oknginx: configuration file / usr/local/nginx/conf/nginx.conf test is successful
5. Send the USR2 signal to the nginx master process (after the nginx service receives the USR2 signal, it will first add the suffix .oldbin to the old nginx.pid file and change it to nginx.pid.oldbin, and then execute the new version of the binary file startup service. If the new service starts successfully, there will be two new and old Nginx services in the system to provide web service together)
Kill-USR2 `cat / usr/local/nginx/logs/ nginx.pid` [root@www nginx-1.14.0] # ps-ef | grep nginx root 22644 1 0 23:30? 00:00:00 nginx: master process / usr/local/nginx/sbin/nginxwww 22648 22644 0 23:30? 00:00:00 nginx: worker process root 25784 22644 0 23:47? 00:00:00 nginx: master process / usr/local/nginx/sbin/nginxwww 25789 25784 0 23:47? 00:00:00 nginx: worker process
6. Stop the old Nginx service process by sending WINCH signal (gently stop worker process) and QUIT signal (gently stop Nginx service)
Kill-WINCH `cat / usr/local/nginx/logs/ nginx.pid.oldbin` kill-QUIT `cat / usr/local/nginx/logs/ nginx.pid.oldbin`
7. The upgrade is complete. Finally, take a look at the nginx version:
/ usr/local/nginx/sbin/nginx-vnginx version: nginx/1.14.0
The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.