http://www.aboutyun.com/thread-9790-1-1.html

mkdir -p /home/yum/openstack/openstack-icehouse/epel-6/
wget -np -nH --cut-dirs=1 -r -c -L --exclude-directories=repodata --accept=rpm,zip,gz,xml http://repos.Fedorapeople.org/repos/openstack/openstack-icehouse/epel-6/ -P /tmp

#测试上面的命令下载不成功,换下面是另一个wget命令执行成功了
wget -c -r -np--reject=html,gif,A,D -nH http://repos.Fedorapeople.org/repos/openstack/openstack-icehouse/epel-6/ -P /tmp


下载完成后:(将openstackyum目录合并到本地yum文件夹中)

mv /tmp/repos/openstack/openstack-icehouse/epel-6/ /home/yum/openstack/openstack-icehouse/epel-6/
vim rdo-release.repo
#################
[openstack-icehouse]
name=OpenStack Icehouse Repository
baseurl=http://localhost/yum/openstack/openstack-icehouse/epel-6/
enabled=1
skip_if_unavailable=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-RDO-Icehouse
priority=98
#################
createrepo -pdo /home/yum/openstack/openstack-icehouse/epel-6/ /home/yum/openstack/openstack-icehouse/epel-6/


本地OpenStack软件源搭建完成

本地epel软件源搭建开始:

epel.repo源码包地址:

wget -t 1 -np -nH --cut-dirs=1 -r -c -L --exclude-directories=repodata --accept=rpm,zip,gz,xml http://mirrors.hust.edu.cn/centos/6.5/os/x86_64/ -P /tmp

其中wget 中-t 1 表示连接超时重连次数,一般设置为重试一次就ok

下载完成后:

mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.tmp
vim /etc/yum.repos.d/epel-local.repo
[epel-local]
name=local epel
baseurl=http://localhost/yum/epel/centos/6.5/os/x86_64/
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6


本地epel软件源搭建完成!!!


官方源码包地址:

http://repos.fedorapeople.org/repos/openstack/openstack-icehouse/epel-6/