安装最新版本 nginx
有时用操作系统默认安装 yum install apt install , 版本都会低,当然存在的bug 也会有。装最新版本 nginx 需要用他自己的源:
sudo add-apt-repository ppa:nginx/stable sudo apt-get update sudo apt-get install nginx
具体参考官网: http://nginx.org/en/linux_packages.html
Debian 安装最新:
wget -qO - http://nginx.org/keys/nginx_signing.key | sudo apt-key add -
编辑:vi /etc/apt/sources.list 加入:
deb http://nginx.org/packages/debian/ codename nginx deb-src http://nginx.org/packages/debian/ codename nginx
注意:
Version | Codename | Supported Platforms |
8.x | jessie | x86_64, i386 |
9.x | stretch | x86_64, i386 |
apt-get update apt-get install nginx