How to compile and smoothly upgrade Nginx from 1.6.0 to Nginx 1.6.1 in linux

Source: Internet
Author: User


This article describes how to seamlessly and smoothly upgrade Nginx from 1.6.0 to Nginx 1.6.1.

# Download the latest software
[Root @ idoseek ~] # Cd/usr/local/src /&&
Wget http://nginx.org/download/nginx-1.6.1.tar.gz &&
Tar-zxvf nginx-1.6.1.tar.gz
 
# Decompress the package and compile it based on the original parameters
[Root @ idoseek nginx-1.6.1] # cd nginx-1.6.1 &&
. /Configure -- prefix =/usr/local/nginx -- without-http_memcached_module -- user = www -- group = www -- with-http_stub_status_module -- with-http_ssl_module -- with-http_gzip_static_module -- with-openssl =/usr/local/src/openssl-1.0.1h -- with-zlib =/usr/local/src/zlib-1.2.8 -- with-pcre =/usr/local/src/pcre-8.35 &&
Make
 
# Back up nginx applications
[Root @ idoseek nginx-1.6.1] # mv/usr/local/nginx/sbin/nginx. bak
# Copy the compiled nginx executable application to the nginx root directory
# Cp objs/nginx/usr/local/nginx/sbin/nginx
 
# Test whether the nginx configuration is correct
[Root @ idoseek nginx-1.6.1] #/usr/local/nginx/sbin/nginx-t
Nginx: the configuration file/usr/local/nginx/conf/nginx. conf syntax is OK
Nginx: configuration file/usr/local/nginx/conf/nginx. conf test is successful
 
# Smoothly upgrade nginx
[Root @ idoseek nginx-1.6.1] # make upgrade
/Usr/local/nginx/sbin/nginx-t
Nginx: the configuration file/usr/local/nginx/conf/nginx. conf syntax is OK
Nginx: configuration file/usr/local/nginx/conf/nginx. conf test is successful
Kill-USR2 'cat/usr/local/nginx/logs/nginx. Pid'
Sleep 1
Test-f/usr/local/nginx/logs/nginx. pid. oldbin
Kill-QUIT 'cat/usr/local/nginx/logs/nginx. pid. Oldbin'
 
# View the updated nginx version
[Root @ idoseek nginx-1.6.1] #/usr/local/nginx/sbin/nginx-V
Nginx version: nginx/1.6.1
Built by gcc 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC)
Tls sni support enabled
Configure arguments: -- prefix =/usr/local/nginx -- without-http_memcached_module -- user = www -- group = www -- with-http_stub_status_module -- with-http_ssl_module -- with-http_gzip_static_module -- with-openssl =/usr/local/src/openssl-1.0.1h -- -zlib =/usr/local/src/zlib-1.2.8 -- with-pcre =/usr/local/src/pcre-8.35

The upgrade process is simple, so we will not introduce it much.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.