在Ubuntu 16.04 (Xenial)安装官方的nginx

在Ubuntu 16.04 (Xenial)安装官方的nginx

1.添加下面的内容到/etc/apt/sources.list

deb https://nginx.org/packages/ubuntu/ xenial nginx
deb-src https://nginx.org/packages/ubuntu/ xenial nginx

2.运行下面的命令

wget http://nginx.org/packages/keys/nginx_signing.key
cat nginx_signing.key | sudo apt-key add - 
sudo apt-get update
sudo apt-get install nginx

3.查看版本号

root@localhost:~# nginx -v
nginx version: nginx/1.16.1
 

你可能感兴趣的:(nginx,ubuntu,nginx,ubuntu)