nginx version upgrade

WBOY
Release: 2016-08-08 09:32:57
Original
1439 people have browsed it

nginx version upgrade

Today, I upgraded the nginx version of the server to the latest stable version 1.6.2. The server operating system is ubuntu12.4 64-bit. Let me write about the upgrade process. First download nginx. This upgrade is directly upgraded remotely using ssh, so all operations It is all done under the shell, and all operations use commands. In fact, apart from watching, there are only a few commands that are really needed.

Upgrade process

# 下载解压nginx
$ curl http://nginx.org/download/nginx-1.6.2.tar.gz > nginx-1.6.2.tar.gz
	$ tar zxvf nginx-1.6.2.tar.gz
	$ cd nginx-1.6.2
	# 查看当前nginx 编译参数
	$ nginx -V
	# 输出 configure arguments: --prefix=/usr/local/nginx
	# ,linux不用加
	# 加上编译参数
	$ ./configure --prefix=/usr/local/nginx 
	# 编译
	$ make
	# 如果没有什么问题,应该是编译成功的,我在本机编译的时候报错了,我的系统是 mac 10.10,最后 ./configure 加上 --with-cc-opt=-Wno-deprecated-declarations ,再编译就没问题了,如果编译成功则忽略
	# 先把nginx停了,然后备份一下
	$ nginx -s stop
	$ cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx-1.6
	# 把刚才编译好的nginx二进制文件,覆盖现在文件
	$ cp -f ./objs/nginx /usr/local/nginx/sbin/nginx
	$ 启动nginx
	$ nginx
	$ 查看nginx版本
	$ nginx -v
	# 输出 nginx version: nginx/1.6.2	
Copy after login



OK, upgrade completed

The above introduces the nginx version upgrade, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!