等风来

北冥有鱼 其名为鲲

世界那么大,我想去看看


Debian安装最新版nginx

在Debian下面通过apt-get可以自动安装 nginx,这样安装的nginx版本都有些旧.

Nginx官网提供了一些编辑绎好的安装包,只需先更新安装源,再通过 apt-get & install 就可安装了。

1.添加安装源

vi /etc/apt/sources.list

根据系统版本添加对应的安装源

#Debian 5.0:
deb http://nginx.org/packages/debian/ lenny nginx
deb-src http://nginx.org/packages/debian/ lenny nginx

#Debian 6.0:
deb http://nginx.org/packages/debian/ squeeze nginx
deb-src http://nginx.org/packages/debian/ squeeze nginx

#Debian 7.0:
deb http://nginx.org/packages/debian/ wheezy nginx
deb-src http://nginx.org/packages/debian/ wheezy nginx

#Debian 8.0:
deb http://nginx.org/packages/debian/ jessie nginx
deb-src http://nginx.org/packages/debian/ jessie nginx

#Debian 9.0:
deb http://nginx.org/packages/debian/ stretch nginx
deb-src http://nginx.org/packages/debian/ stretch nginx

2.导入升级Key并更新源

wget http://nginx.org/keys/nginx_signing.key && apt-key add nginx_signing.key
apt-get update

3.安装nginx

apt-get install nginx

Enjoy it!




除另有声明外,本博客文章均采用 知识共享(Creative Commons) 署名-非商业性使用-相同方式共享 3.0 中国大陆许可协议 进行许可。Made with ❤ by ViNew

最近的文章

安卓自动精简脚本

说明 安卓自动精简脚本,支持Wi...

更早的文章

使用acme.sh申请Let's Encrypt通配符证书

1.安装acme.shcurl h...