(备注:此一共用到4台机器。分别命名为ceph-admin ,ceph0,ceph1,ceph2.其中ceph-admin作为deploy 机器用于部署,ceph-admin,ceph0作为mon,ceph1,作为OSD,ceph2作为元数据服务器)
0.配置IP/主机名
1.在每台机器上创建ceph用户,
udo useradd -d /home/ceph -m ceph
sudo passwd ceph
2.在每个Ceph节点中为用户增加 root 权限
echo "ceph ALL = (root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/ceph |
---|
3.安装ssh服务器
sudo yum install openssh-server
4.用无密码的SSH连接到每个Ceph节点来配置你的 ceph-deploy 管理节点. 保留密码为空:
ssh-keygen
Generating public/private key pair.
Enter file in which to save the key (/ceph-client/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /ceph-client/.ssh/id_rsa.
Your public key has been saved in /ceph-client/.ssh/id_rsa.pub.
5.复制秘钥至每个Ceph节点.
ssh-copy-id ceph0@ceph-server |
---|
ssh-copy-id ceph1@ceph-server
6.修改你的ceph-deploy 管理节点的 ~/.ssh/config 文件使它能像你创建的用户(比如, ceph)一样记录至Ceph节点 .
Host ceph-server Hostname ceph-server.fqdn-or-ip-address.com User ceph |
---|
7.更新你的仓库并安装ceph-deploy (ceph-admin节点上安装ceph-deploy,用于部署)
sudo apt-get update && sudo apt-get install ceph-deploy |
---|