Обновление nginx (ispmanager) на Debian

Для Debian
— Качаем ключ nginx
wget http://nginx.org/keys/nginx_signing.key

и добавляем его:
apt-key add nginx_signing.key


— Добавляем следующие репозитарии в конец файла /etc/apt/sources.list:

echo "deb http://nginx.org/packages/debian/ wheeze nginx" >> /etc/apt/sources.list
echo "deb-src http://nginx.org/packages/debian/ wheeze nginx" >> /etc/apt/sources.list


— Затем выполняем обновление:
apt-get update
apt-get upgrade


— Радуемся обновленной версии nginx:
Проверяем версию:
nginx -V

1 комментарий

avatar
Иногда при обновлении можно получить следующую ошибку:
root@server:~# apt-get upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be upgraded:
nginx
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 460 kB of archives.
After this operation, 964 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 nginx.org/packages/debian/ squeeze/nginx nginx amd64 1.4.5-1~squeeze [460 kB]
Fetched 460 kB in 2s (214 kB/s)
Reading changelogs… Done
(Reading database… 34498 files and directories currently installed.)
Preparing to replace nginx 1.2.1-2.2+wheezy2 (using .../nginx_1.4.5-1~squeeze_amd64.deb)…
Unpacking replacement nginx…
dpkg: error processing /var/cache/apt/archives/nginx_1.4.5-1~squeeze_amd64.deb (--unpack):
trying to overwrite '/etc/logrotate.d/nginx', which is also in package nginx-common 1.2.1-2.2+wheezy2
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/nginx_1.4.5-1~squeeze_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Исправить очень просто, нужно запустить команду:
sudo dpkg -i --force-all /var/cache/apt/archives/nginx_1.4.5-1~squeeze_amd64.deb

Оставить комментарий