In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to smoothly upgrade nginx after compiling and installing nginx. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
The process of upgrading from nginx-1.13.6 to nginx-1.13.12 is also applicable to other versions.
I. download the new version of nginx
Download page: http://nginx.org/en/download.html
Wget-c http://nginx.org/download/nginx-1.13.12.tar.gz
2. Get the configuration of the old version of nginx
Check the current version: / usr/local/nginx/sbin/nginx-v
View current configuration: / usr/local/nginx/sbin/nginx-V
[root@zixuephp nginx-1.13.6] # / usr/local/nginx/sbin/nginx-vnginx version: nginx/1.13.6 [root@zixuephp nginx-1.13.6] # / usr/local/nginx/sbin/nginx-Vnginx version: nginx/1.13.6built by gcc 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) built with OpenSSL 1.0.2k-fips 26 Jan 2017TLS SNI support enabledconfigure arguments:-- prefix=/usr/local/ Nginx-user=www-group=www-prefix=/usr/local/nginx-with-http_stub_status_module-with-http_v2_module-with-http_gzip_static_module-with-http_sub_module with-pcre with-http_ssl_module
Decompress the new version of nginx source code package
Tar-xzvf nginx-1.13.12.tar.gzcd nginx-1.13.12
IV. Configuration before recompilation of the new version
The configuration here is the same as the old version: / usr/local/nginx/sbin/nginx-V
The copy code is as follows:
/ configure-- prefix=/usr/local/nginx-- user=www-- group=www-- prefix=/usr/local/nginx-- with-http_stub_status_module-- with-http_v2_module-- with-http_gzip_static_module-- with-http_sub_module-- with-pcre-- with-http_ssl_module
Compile and generate the objs directory, enter the directory, and replace nginx
Make
After compilation, you can see a directory with objs through ls.
[root@zixuephp nginx-1.13.12] # lsauto CHANGES CHANGES.ru conf configure contrib html LICENSE Makefile man objs README src [root@zixuephp nginx-1.13.12] #
Go to the objs directory and replace the old version of the nginx main program (be sure to back up before doing anything here to avoid errors)
[root@zixuephp objs] # mv nginx/ usr/local/nginx/sbin/nginx
VI. Smooth upgrade
Make upgrade
7. If the upgrade is successful, check the version
[root@zixuephp nginx-1.13.12] # / usr/local/nginx/sbin/nginx-vnginx version: nginx/1.13.12 [root@zixuephp nginx-1.13.12] # / usr/local/nginx/sbin/nginx-Vnginx version: nginx/1.13.12built by gcc 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) built with OpenSSL 1.0.2k-fips 26 Jan 2017TLS SNI support enabledconfigure arguments:-- prefix=/usr/local/ Nginx-user=www-group=www-prefix=/usr/local/nginx-with-http_stub_status_module-with-http_v2_module-with-http_gzip_static_module-with-http_sub_module with-pcre with-http_ssl_module
Be sure to back up files such as nginx programs and websites in advance before upgrading to avoid errors.
Thank you for reading! This is the end of this article on "how to smoothly upgrade nginx after compiling and installing nginx". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!
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.