ubuntu
添加Nginx官方的源:
sudo tee /etc/apt/sources.list.d/nginx.list << EOF
deb http://nginx.org/packages/mainline/ubuntu `lsb_release -cs` nginx
deb-src http://nginx.org/packages/mainline/ubuntu `lsb_release -cs` nginx
EOF
添加Nginx的公钥:
wget http://nginx.org/keys/nginx_signing.key
sudo apt-key add nginx_signing.key
sudo apt update
sudo apt install nginx