美文网首页
Ubuntu16.04下安装Nginx

Ubuntu16.04下安装Nginx

作者: 兰_泽 | 来源:发表于2019-07-18 11:24 被阅读0次

1. 参考文档链接 :http://nginx.org/en/linux_packages.html#Ubuntu

2. 安装步骤如下:

# Install the prerequisites:

sudo apt install curl gnupg2 ca-certificates lsb-release

# To set up the apt repository for stable nginx packages, run the following command:

echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list

# Import an official nginx signing key so apt could verify the packages authenticity:

curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -

# Verify that you now have the proper key:

sudo apt-key fingerprint ABF5BD827BD9BF62

# The output should contain the full fingerprint 573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62 as follows:

pub   rsa2048 2011-08-19 [SC] [expires: 2024-06-14]

      573B FD6B 3D8F BC64 1079  A6AB ABF5 BD82 7BD9 BF62

uid   [ unknown] nginx signing key <signing-key@nginx.com>

# To install nginx, run the following commands:

sudo apt update

sudo apt install nginx

3. 配置文件在:/etc/nginx/nginx.conf

4. 文档链接在:http://nginx.org/en/docs/

相关文章

网友评论

      本文标题:Ubuntu16.04下安装Nginx

      本文链接:https://www.haomeiwen.com/subject/xaiklctx.html