在我的服务器中,Nginx -v返回Nginx版本:Nginx / 1.4.6(Ubuntu),它很老,所以我决定将它更新到最新的稳定版本.
然后,我跟着this answer:
sudo apt-get update
sudo apt-get install Nginx
它给:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
Nginx-common Nginx-core
Suggested packages:
fcgiwrap Nginx-doc
The following packages will be upgraded:
Nginx Nginx-common Nginx-core
3 upgraded,0 newly installed,0 to remove and 311 not upgraded.
Need to get 349 kB of archives.
After this operation,3,072 B of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main Nginx-common all 1.4.6-1ubuntu3.7 [19.0 kB]
Get:2 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main Nginx all 1.4.6-1ubuntu3.7 [5,352 B]
Get:3 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main Nginx-core amd64 1.4.6-1ubuntu3.7 [325 kB]
Fetched 349 kB in 0s (431 kB/s)
Preconfiguring packages ...
(Reading database ... 111751 files and directories currently installed.)
Preparing to unpack .../Nginx-common_1.4.6-1ubuntu3.7_all.deb ...
Unpacking Nginx-common (1.4.6-1ubuntu3.7) over (1.4.6-1ubuntu3.5) ...
Preparing to unpack .../Nginx_1.4.6-1ubuntu3.7_all.deb ...
Unpacking Nginx (1.4.6-1ubuntu3.7) over (1.4.6-1ubuntu3.5) ...
Preparing to unpack .../Nginx-core_1.4.6-1ubuntu3.7_amd64.deb ...
Unpacking Nginx-core (1.4.6-1ubuntu3.7) over (1.4.6-1ubuntu3.5) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up Nginx-common (1.4.6-1ubuntu3.7) ...
Setting up Nginx-core (1.4.6-1ubuntu3.7) ...
Setting up Nginx (1.4.6-1ubuntu3.7) ...
最佳答案
原文链接:https://www.f2er.com/nginx/434393.html