自建epel yum仓库并安装nginx
1、创建 repo 文件
[root@neo ~]# cat /etc/yum.repos.d/epel.repo
[epel]
name=epel repository
baseurl=https://epel.mirror.constant.com//7/x86_64/
gpgcheck=0
2、yum repolist查看repolist
[root@neo ~]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.jdcloud.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
epel | 5.4 kB 00:00:00
(1/3): epel/group_gz | 88 kB 00:00:05
(2/3): epel/updateinfo | 1.0 MB 00:00:07
(3/3): epel/primary_db | 6.8 MB 00:00:51
repo id repo name status
base/7/x86_64 CentOS-7 - Base 10,019
epel epel repository 13,383
extras/7/x86_64 CentOS-7 - Extras 435
updates/7/x86_64 CentOS-7 - Updates 2,500
repolist: 26,337
3、安装 nginx
[root@neo ~]# yum install nginx -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.jdcloud.com
* extras: mirror.jdcloud.com
* updates: mirror.jdcloud.com
Resolving Dependencies
--> Running transaction check
---> Package nginx.x86_64 1:1.12.2-3.el7 will be installed
--> Processing Dependency: nginx-all