Centos 更换本地源,搭建openstak本地源

来源:互联网 发布:keyerror python 编辑:程序博客网 时间:2024/05/16 04:36

1、下载相应的软件包http://repos.Fedorapeople.org/repos/openstack/openstack-icehouse/epel-6/

2、将下载的包放到centos的   /opt/epel6文件夹下。

3、创建repodata信息
createrepo -p -d -o /opt/epel6 /opt/epel6


4、配置http服务器,将根目录指到/opt/epel6
yum install -y httpd
rm -rf /var/www/html
ln -s /opt/epel6 /var/www/html
service httpd start

5、在/etc/yum.repos.d/目录下创建rdo-release.repo文件
[openstack-icehouse]
name=OpenStack Icehouse Repository
baseurl=http://本机ip/opt/epel6/           (如果是用file的方式,url应为:baseurl=file:///opt/epel6/
)

enabled=1
gpgcheck=0


将其他repo文件备份后,执行

yum clean allyum makecache
6、OK.

0 0