Установка Nginx версии 1.6 в Debian Wheezy

Dec 31, 2015 17:23 · 307 words · 2 minute read nginx debian

В репозитории Debian Wheezy по умолчанию веб-сервер Nginx представлен версией 1.2, которая является устаревшей. Давайте разберемся как установить Nginx версии 1.6!

Прежде всего необходимо добавить в /etc/apt/sources.list следующую строку:

deb http://ftp.de.debian.org/debian/ wheezy-backports main contrib non-free

Сделать это можно просто выполнив команду:

echo "deb http://ftp.de.debian.org/debian/ wheezy-backports main contrib non-free" >> /etc/apt/sources.list

После чего обновляем информацию о пакетах в системе:

aptitude update

Проверить доступные для установки версии веб-сервера Nginx можно с помощью apt-cache show nginx, результатом будет:

Package: nginx
Version: 1.6.2-5~bpo70+1
Installed-Size: 99
Maintainer: Kartik Mistry 
Architecture: all
Depends: nginx-full (>= 1.6.2-5~bpo70+1) | nginx-light (>= 1.6.2-5~bpo70+1) | nginx-extras (>= 1.6.2-5~bpo70+1), nginx-full (<< 1.6.2-5~bpo70+1.1~) | nginx-light (<< 1.6.2-5~bpo70+1.1~) | nginx-extras (<< 1.6.2-5~bpo70+1.1~)
Description-en: small, powerful, scalable web/proxy server
 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 is a dependency package to install either nginx-full (by default) or
 nginx-light.
Homepage: http://nginx.net
Description-md5: fcb68fdad0dca137e47a44b011e92ee4
Section: httpd
Priority: optional
Filename: pool/main/n/nginx/nginx_1.6.2-5~bpo70+1_all.deb
Size: 72030
MD5sum: 3a816953082b815d52a0fef3cbaf860d
SHA1: 61534b988d71ff293e214acd4bf9ea980c65377c
SHA256: 5a2228383b5b0788c53ec919e9f8ab46f281df2068785feb5e890b3682b66a72

Package: nginx
Version: 1.2.1-2.2+wheezy3
Installed-Size: 87
Maintainer: Kartik Mistry 
Architecture: all
Depends: nginx-full | nginx-light
Description-en: small, powerful, scalable web/proxy server
 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 is a dependency package to install either nginx-full (by default) or
  nginx-light.
Homepage: http://nginx.net
Description-md5: 19a4ea43e33eae4a46abf8a78966deb5
Tag: implemented-in::c, interface::daemon, network::server, network::service,
 protocol::http, role::program, use::proxying
Section: httpd
Priority: optional
Filename: pool/main/n/nginx/nginx_1.2.1-2.2+wheezy3_all.deb
Size: 61374
MD5sum: 25ae5234388762babbfbe3632dbdcc57
SHA1: 34d7ff8f24cc47960688ae84d6d98f92275ad453
SHA256: 516d33cf93f20ca070a203bafacc6f7ceb04bd3ae221d5a9a59f90e2ab828245

Непосредственно установка нужной версии Nginx:

aptitude -t wheezy-backports install nginx

Убедимся в правильности установленной версии:

nginx -V
nginx version: nginx/1.6.2
...
tweet Share