Centos搭建ceph+++四、yum源设置

四、设置ceph yum源

都是用的阿里的源

所有节点上:

1.新建ceph源

vi /etc/yum.repos.d/ceph.repo

[ceph-jewel]
name=Ceph jewel packages
baseurl=https://mirrors.aliyun.com/ceph/rpm-jewel/el7/x86_64/
enabled=1
gpgcheck=0

2.安装epel源

yum install https://mirrors.aliyun.com/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm


admin-node节点:

安装ceph-deploy

yum install https://mirrors.aliyun.com/ceph/rpm-jewel/el7/noarch/ceph-deploy-1.5.39-0.noarch.rpm

node1,node2,node3节点:

安装ceph

yum install ceph -y


如果你正常安装:

就去搭建个ntp服务器使所有节点时间同步(我是直接同步的openstack的controller节点因为我后面需要)不会的参考我http://blog.csdn.net/controllerha/article/details/78658204设置ntp时间同步服务器


____________________________________________________________________________________________________________________________________


我在最开始安装时遇到了报错(是openstack源的问题,我前面是直接克隆的弄openstack的虚拟机,搞得依赖包错误,最后我还是重新新建的虚拟机来,然后用了上面的那种源设置):

下面的只是写出来只表示如果有相同错误可以去试试,不过虽然是安装起了但是还是感觉有问题

报错有一大堆说有许多依赖包没有安装于是我加了个centos7本地源

vi local.repo

[centos]
name=centos
baseurl=ftp://192.168.100.10/centos/
gpgcheck=0
enabled=1
[mitaka]
name=mitaka
baseurl=ftp://192.168.100.10/mitaka/Openstack-Mitaka/
gpgcheck=0
enabled=0

我源是在openstack的controller节点上通过ftp共享过来的,我先是只打开了centos7的本地源,没有开启mitaka的源(开启了可能会有依赖包报错)

源设置具体参考http://blog.csdn.net/controllerha/article/details/78657920


然后继续安装(报错少了许多):

Error: Package: 1:ceph-mon-10.2.10-0.el7.x86_64 (ceph-jewel)
           Requires: python-flask
Error: Package: 1:ceph-selinux-10.2.10-0.el7.x86_64 (ceph-jewel)
           Requires: selinux-policy-base >= 3.13.1-102.el7_3.13
           Installed: selinux-policy-targeted-3.13.1-60.el7_2.7.noarch (@mitaka)
               selinux-policy-base = 3.13.1-60.el7_2.7
           Available: selinux-policy-minimum-3.13.1-60.el7.noarch (centos)
               selinux-policy-base = 3.13.1-60.el7
           Available: selinux-policy-mls-3.13.1-60.el7.noarch (centos)
               selinux-policy-base = 3.13.1-60.el7
           Available: selinux-policy-targeted-3.13.1-60.el7.noarch (centos)
               selinux-policy-base = 3.13.1-60.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

它说我缺少依赖包python-flask

并且selinux-policy包版本低了

然后我找了半天,发现我mitaka本地源中居然有python-falsk包


我打开mitaka本地源安装了python-fslsk:

[centos]
name=centos
baseurl=ftp://192.168.100.10/centos/
gpgcheck=0
enabled=1
[mitaka]
name=mitaka
baseurl=ftp://192.168.100.10/mitaka/Openstack-Mitaka/
gpgcheck=0
enabled=1

安装:

yum install python-flask -y


但是还缺少了个selinux-policy,版本低了于是我把移走的CentOS-Base.repo重新移动回来更新了selinux-policy

 cp /opt/CentOS-Base.repo /etc/yum.repos.d/

yum update selinux-policy* -y


安装完这个后,我把mitaka的源重新关闭并将CentOS-Base.repo改了个名字使其不生效(mitaka的源可能会报依赖包错误,但是我centos7的本地源没有关闭,因为安装ceph需要其中一些包)


[centos]
name=centos
baseurl=ftp://192.168.100.10/centos/
gpgcheck=0
enabled=1
[mitaka]
name=mitaka
baseurl=ftp://192.168.100.10/mitaka/Openstack-Mitaka/
gpgcheck=0
enabled=1

mv CentOS-Base.repo CentOS-Base.repo.bak


做完上述的事后我的源,还有三个在用:centos7本地源,ceph源,epel源,再次安装ceph无报错完美结束

安装前全部清除一次否则还会有错

[root@node2 yum.repos.d]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: centos ceph-jewel epel
Cleaning up everything
Cleaning up list of fastest mirrors

yum install ceph -y

你可能感兴趣的:(ceph四节点部署,ceph四节点部署)