一、OpenStack之构建本地yum源 pike版
1、OpenStack 源 —-openstack-pike
centos7.6.1810版本 openstack yum 源
https://mirrors.aliyun.com/centos-vault/7.6.1810/cloud/x86_64/
2、下载软件仓库文件到本机/opt目录
wget -m -c -np -nH --cut-dirs=4 -e robots=off https://mirrors.aliyun.com/centos-vault/7.6.1810/cloud/x86_64/openstack-pike/ -P /opt
3、创建本地yum源文件
yum install -y createrepo
createrepo /opt/openstack-pike
4、配置本地yum源
vim /etc/yum.repos.d/pike.repo
输入以下内容:
[aliyun-pike]
name=Aliyun-pike
baseurl=file:///opt/openstack-pike
gpgcheck=0
enabled=1
5、生成缓存
yum clean all
yum makecache
yum repolist
二、搭建本地centos 的软件仓库
1、上传centos镜像和pike-yum仓库文件到/opt目录
2、挂载iso文件
【挂载CentOS-7-x86_64-DVD-1810.iso】
[root@controller ~]# mount -o loop /opt/CentOS-7-x86_64-DVD-1810.iso /mnt/
[root@controller ~]# mkdir /opt/centos
[root@controller ~]# cp -rvf /mnt/* /opt/centos/
[root@controller ~]# umount /mnt/
3、搭建ftp服务器,开启并设置自启
[root@controller ~]# yum install vsftpd –y
[root@controller ~]# vi /etc/vsftpd/vsftpd.conf
添加anon_root=/opt/
保存退出
[root@controller ~]# systemctl start vsftpd
[root@controller ~]# systemctl enable vsftpd
#访问 FTP 地址
4、创建repo文件(实验室本地yum)
【controller】节点
在/etc/yum.repos.d修改pike.repo源文件
mv /etc/yum.repos.d/* /opt
vim /etc/yum.repos.d/bendi.repo
[bendi-pike]
name=bendi-pike
baseurl=ftp://10.110.45.66/openstack-pike
gpgcheck=0
enabled=1
[bendi-centos-1810]
name=bendi-centos-1810
baseurl=ftp://10.110.45.66/centos
gpgcheck=0
enabled=1
[bendi-openstack-train]
name=bendi-openstack-train
baseurl=ftp://10.110.45.66/openstack_train_rpm
gpgcheck=0
enabled=1
[bendi-centos2003-base]
name=bendi-centos2003-base
baseurl=ftp://10.110.45.66/alimirro/base/
gpgcheck=0
enabled=1
[bendi-epel]
name=bendi-epel
baseurl=ftp://10.110.45.66/alimirro/epel/
gpgcheck=0
enabled=1
[bendi-extras]
name=bendi-extras
baseurl=ftp://10.110.45.66/alimirro/extras/
gpgcheck=0
enabled=1
[bendi-script]
name=bendi-script
baseurl=ftp://10.110.45.66/alimirro/script/
gpgcheck=0
enabled=1
[bendi-updates]
name=bendi-updates
baseurl=ftp://10.110.45.66/alimirro/updates/
gpgcheck=0
enabled=1
【compute】节点
在/etc/yum.repos.d修改本地.repo源文件
mv /etc/yum.repos.d/* /opt
vim /etc/yum.repos.d/pike.repo
[bendi-pike]
name=bendi-pike
baseurl=ftp://10.110.45.66/openstack-pike
gpgcheck=0
enabled=1
[bendi-centos-1810]
name=bendi-centos-1810
baseurl=ftp://10.110.45.66/centos
gpgcheck=0
enabled=1
[bendi-openstack-train]
name=bendi-openstack-train
baseurl=ftp://10.110.45.66/openstack_train_rpm
gpgcheck=0
enabled=1
[bendi-centos2003-base]
name=bendi-centos2003-base
baseurl=ftp://10.110.45.66/alimirro/base/
gpgcheck=0
enabled=1
[bendi-epel]
name=bendi-epel
baseurl=ftp://10.110.45.66/alimirro/epel/
gpgcheck=0
enabled=1
[bendi-extras]
name=bendi-extras
baseurl=ftp://10.110.45.66/alimirro/extras/
gpgcheck=0
enabled=1
[bendi-script]
name=bendi-script
baseurl=ftp://10.110.45.66/alimirro/script/
gpgcheck=0
enabled=1
[bendi-updates]
name=bendi-updates
baseurl=ftp://10.110.45.66/alimirro/updates/
gpgcheck=0
enabled=1
三、配置阿里ceph源
vim /etc/yum.repos.d/ceph.repo
添加
[ceph]
name=ceph
baseurl=http://mirrors.aliyun.com/ceph/rpm-jewel/el7/x86_64/
gpgcheck=0
[ceph-noarch]
name=cephnoarch
baseurl=http://mirrors.aliyun.com/ceph/rpm-jewel/el7/noarch/
gpgcheck=0
进行yum的makecache
yum makecache