The VPS server uses apt-get to upgrade nginx (ubuntu/debian)

Source: Internet
Author: User
Tags vps vps server
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

Related Article

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.