侧边栏壁纸
博主头像
学海无涯博主等级

有疑问可发邮件[email protected]

  • 累计撰写 326 篇文章
  • 累计创建 85 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

使用nginx官方源安装nginx

利刃
2019-05-14 / 0 评论 / 0 点赞 / 5 阅读 / 2163 字
温馨提示:
本文最后更新于 2024-08-13,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

今天进行Django项目生产机部署,需要用到Nginx,按之前的博客安装Nginx时,发现不是最新发行版本,于是进官网进行查看,偶然发现官网竟然也提供了yum安装源。

官方地址:http://nginx.org/en/linux_packages.html

image

具体安装方式如下:

Install the prerequisites:

sudo yum install yum-utils

To set up the yum repository, create the file named

/etc/yum.repos.d/nginx.repo
with the following contents:
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key

[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key

By default, the repository for stable nginx packages is used. If you would like to use mainline nginx packages, run the following command:

sudo yum-config-manager --enable nginx-mainline

To install nginx, run the following command:

sudo yum install nginx

When prompted to accept the GPG key, verify that the fingerprint matches

573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62
, and if so, accept it.




2019-5-14 10:35:53

0
  1. 支付宝打赏

    qrcode alipay
  2. 微信打赏

    qrcode weixin

评论区