前提条件:如果发生了没有注册redhat账号造成没有权限使用yum的情况下,可以参考:http://www.cnblogs.com/boshen-hzb/p/6080431.html

1、cd /etc/yum.repos.d/

在里面新建文件nginx.repo

[nginx]

name=nginx repo

baseurl=http://nginx.org/packages/CentOS/$releasever/$basearch/

gpgcheck=0

enabled=1

注意,上面的baseurl要检测是否可用,如果不可用,去nginx写网找真实的地址。

2、执行

yum -y install nginx

相关文章:

  • 2021-08-10
  • 2021-12-02
  • 2021-09-17
  • 2021-07-28
  • 2022-01-19
  • 2021-08-27
  • 2021-07-06
猜你喜欢
  • 2021-08-06
  • 2021-05-25
  • 2022-12-23
  • 2021-11-25
  • 2022-12-23
相关资源
相似解决方案