Ceph快速部署(CentOS7+Jewel)(2)

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

安装ceph客户端

yum -y install ceph ceph-radosgw ntp ntpdate
关闭selinux和firewalld
sed -i 's/SELINUX=.*/SELINUX=disabled/' /etc/selinux/config  #重启机器
systemctl stop firewalld
systemctl disable firewalld

同步各个节点时间:

ntpdate  -s time-a.nist.gov
echo ntpdate  -s time-a.nist.gov >> /etc/rc.d/rc.local
echo "01 01 * * * /usr/sbin/ntpdate -s time-a.nist.gov    >> /dev/null 2>&1" >> /etc/crontab

开始部署

在部署节点(mon-1)安装ceph-deploy,下文的部署节点统一指mon-1:

[root@mon-1 ~]# yum -y install ceph-deploy
[root@mon-1 ~]# ceph-deploy --version
1.5.36
[root@mon-1 ~]# ceph -v
ceph version 10.2.3 (ecc23778eb545d8dd55e2e4735b53cc93f92e65b)

在部署节点创建部署目录

[root@mon-1 ~]# mkdir cluster
[root@mon-1 ~]# cd cluster
[root@mon-1 cluster]# ceph-deploy new mon-1 osd-1 osd-2
[ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf
[ceph_deploy.cli][INFO  ] Invoked (1.5.36): /usr/bin/ceph-deploy new mon-1 osd-1 osd-2
[ceph_deploy.cli][INFO  ] ceph-deploy options:
[ceph_deploy.cli][INFO  ]  username                      : None
[ceph_deploy.cli][INFO  ]  func                          : <function new at 0x1803230>
[ceph_deploy.cli][INFO  ]  verbose                      : False
[ceph_deploy.cli][INFO  ]  overwrite_conf                : False
[ceph_deploy.cli][INFO  ]  quiet                        : False
[ceph_deploy.cli][INFO  ]  cd_conf                      : <ceph_deploy.conf.cephdeploy.Conf instance at 0x186d440>
[ceph_deploy.cli][INFO  ]  cluster                      : ceph
[ceph_deploy.cli][INFO  ]  ssh_copykey                  : True
[ceph_deploy.cli][INFO  ]  mon                          : ['mon-1', 'osd-1', 'osd-2']
[ceph_deploy.cli][INFO  ]  public_network                : None
[ceph_deploy.cli][INFO  ]  ceph_conf                    : None
[ceph_deploy.cli][INFO  ]  cluster_network              : None
[ceph_deploy.cli][INFO  ]  default_release              : False
[ceph_deploy.cli][INFO  ]  fsid                          : None
[ceph_deploy.new][DEBUG ] Creating new cluster named ceph
[ceph_deploy.new][INFO  ] making sure passwordless SSH succeeds
[ceph_deploy.new][DEBUG ] Writing initial config to ceph.conf...  #如果能准确无误的走到这一步就算成功了

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/427bce504afb7c40a7493b52b6e50b9a.html