Open/etc/apt/sources. list and add the following two lines of Ubuntu: debhttp: // logs
Open/etc/apt/sources. list and add the following two lines
Ubuntu:
Deb http://nginx.org/packages/ubuntu/ lucid nginx
Deb-src http://nginx.org/packages/ubuntu/ lucid nginx
Debian:
Deb http://nginx.org/packages/debian/ squeeze nginx
Deb-src http://nginx.org/packages/debian/ squeeze nginx
Update packages and install nginx
Apt-get update
Apt-get install nginx
Tip:
Configuration file '/etc/nginx. Conf'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What wocould you like to do about it? Your options are:
Y or I: install the package maintainer's version
N or O: keep your currently-installed version
D: show the differences between the versions
Z: background this process to examine the situation
The default action is to keep your current version.
* ** Nginx. conf (Y/I/N/O/D/Z) [default = N]?
Enter N to retain the previous nginx. conf configuration.
Restart nginx after installation.
Service nginx restart
After the update is completed, enter the following command to view the current version.
Nginx-v