为什么安装了旧版本的Nginx?

我安装了Nginx和PHP5-FPM,并且一切正常,但是我注意到我安装了Nginx 1.2.1,而不是最新的稳定版本(1.6.x)。 我也注意到PHP-FPM有PHP 5.4而不是PHP 5.5。 但是,这不像旧的Nginx版本那么多的安全问题。

我如何安装:

  1. 添加deb http://nginx.org/packages/debian/ wheezy nginx/etc/apt/sources.list 。 我也正确地添加了PGP密钥。
  2. su
  3. apt-get update在更新期间列出了Nginx服务器,并且没有错误。
  4. apt-get install nginx-extras php5-fpm
  5. 然后我configuration了两个我喜欢的。 我也意识到我有一个旧版本的Nginx。
  6. 我做了apt-cache show nginx-common ,看到了旧版本。
  7. 我试图apt-get upgrade无济于事。

apt-cache show nginx-common输出apt-cache show nginx-common

 Package: nginx-common Source: nginx Version: 1.2.1-2.2+wheezy3 Installed-Size: 203 Maintainer: Kartik Mistry <[email protected]> Architecture: all Replaces: nginx (<< 0.8.54-4), nginx-extras (<< 0.8.54-4), nginx-full (<< 0.8.54-4), nginx-light (<< 0.8.54-4) Depends: lsb-base (>= 3.2-14) Breaks: nginx (<< 0.8.54-4), nginx-extras (<< 0.8.54-4), nginx-full (<< 0.8.54-4), nginx-light (<< 0.8.54-4) Description-en: small, powerful, scalable web/proxy server - common files Nginx ("engine X") is a high-performance web and reverse proxy server created by Igor Sysoev. It can be used both as a standalone web server and as a proxy to reduce the load on back-end HTTP or mail servers. . This package contains base configuration files used by all versions of nginx. Homepage: http://nginx.net Description-md5: 9e23931d84d07adbee5412aefdad8a90 Tag: role::app-data Section: httpd Priority: optional Filename: pool/main/n/nginx/nginx-common_1.2.1-2.2+wheezy3_all.deb Size: 72790 MD5sum: 45164faa28f8937d2864d1ccb5a8787f SHA1: ff54c828017f7866cc84cf23eb54e516a07f81a8 SHA256: 3c87c9377d66c574c45c977a602fa01d26e57b89b7cb1a8751fee4ab8f0e1225 

Debian Wheezy 7.7 i686-pae

你安装了错误的软件包。

您已经将上游nginx存储库添加到您的服务器,但在此repo中,nginx包简单地命名为nginx 。 没有其他的软件包可以安装。 这些是Debian特有的(并且经常令人困惑)。

要解决该问题,请删除您安装的软件包,然后安装nginx软件包。

 sudo apt-get purge nginx-common nginx-extras sudo apt-get autoremove ## optional sudo apt-get install nginx