1. download the latest nginx [plain] viewplaincopywgethttp: // nginx.org/download/nginx-1.5.11.tar.gz2##nginx1. download the latest nginx
[Plain]View plaincopy
- Wget http://nginx.org/download/nginx-1.5.11.tar.gz
2. View nginx version
[Plain]View plaincopy
- /Usr/local/nginx/sbin/nginx-V
[Plain]View plaincopy
- Nginx version: nginx/1.4.2
- Built by gcc 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
- Configure arguments: -- prefix =/usr/local/nginx
3. nginx upgrade and installation
[Plain]View plaincopy
- Tar-zxvf nginx-1.4.3.tar.gz
- Cd nginx-1.4.3/
- ./Configure -- prefix =/usr/local/nginx
- Make
4. configure and back up old nginx files
[Plain]View plaincopy
- Mv/usr/local/nginx/sbin/nginx. old
Copy the newly compiled nginx to the nginx directory.
[Plain]View plaincopy
- Cp objs/nginx/usr/local/nginx/sbin/nginx
Restart nginx to complete upgrade and view the version
[Plain]View plaincopy
- /Usr/local/nginx/sbin/nginx-V
- Nginx version: nginx/1.4.2
- Built by gcc 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
- Configure arguments: -- prefix =/usr/local/nginx