nginx源
方式一
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
方式二
wget http://nginx.org/keys/nginx_signing.key
sudo apt-key add nginx_signing.key
deb http://nginx.org/packages/ubuntu/ codename nginx
deb-src http://nginx.org/packages/ubuntu/ codename nginx
sudo apt-get update
如果提示只支持64位修改为:
deb [arch=amd64] http://nginx.org/packages/ubuntu/ codename nginx
deb-src http://nginx.org/packages/ubuntu/ codename nginx
- lsb_release -a 查看codename
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty 这就是codename
方式三 下载deb包
https://ubuntu.pkgs.org/18.04/nginx-amd64/nginx_1.16.0-1~bionic_amd64.deb.html