搭建centos6.5下openstack icehouse版本的时候,发现rdo方式已经不能用centos6.5,最新的版本需要升级到centos7才可以,于是自己搭建本地的openstack yum源。方法转载
1
2
3
4
5
|
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
|
1
2
|
mv /tmp/repos/openstack/openstack-icehouse/epel-
6
/ /home/yum/openstack/openstack-icehouse/epel-
6
/
vim rdo-release.repo
配置文件中原本有以下两行
gpgcheck=1
gpgkey=
file
:
///etc/pki/rpm-gpg/RPM-GPG-KEY-RDO-Icehouse
|
1
2
3
4
5
6
7
8
9
10
|
#################
[openstack-icehouse]
name=OpenStack Icehouse Repository
baseurl=http:
//localhost/yum/openstack/openstack-icehouse/epel-6/
enabled=1
skip_if_unavailable=0
gpgcheck=0
priority=98
#################
|
1
|
createrepo -pdo
/home/yum/openstack/openstack-icehouse/epel-6/
/home/yum/openstack/openstack-icehouse/epel-6/
|
1
|
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
|
1
2
|
mv
/etc/yum
.repos.d
/epel
.repo
/etc/yum
.repos.d
/epel
.repo.tmp
vim
/etc/yum
.repos.d
/epel-local
.repo
|
1
2
3
4
5
6
7
|
[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
|