epel做本地源

挂载iso文件命令mount -t iso9660 -o loop xxx.iso /mnt/path

1、yum install yum-utils

2、yum install createrepo

3、reposync -r epel -p /root/

4、createrepo -v /root/epel/

5、新建repo文件

[root@localhost ~]# cat /etc/yum.repos.d/epel.repo
[epel]
name=epel
baseurl=file:///root/epel
enabled=1
gpgcheck=0
[root@localhost ~]#

6、yum clean all

7、yum makecache

8、如果要制作成iso则输入命令

mkisofs -r -o /root/centos6-epel.iso /root/epel/
原文地址:https://www.cnblogs.com/tiantianhappy/p/12161630.html