操作
环境准备
部署节点:ceph 192.168.1.20
其它节点:
chen1:192.168.1.13
chen2:192.168.1.14
chen3:192.168.1.15
所有节点配置域名解析
vim /etc/hosts
192.168.1.13 chen1
192.168.1.14 chen2
192.168.1.15 chen3
192.168.1.20 ceph
~
所有集群节点(包括客户端)创建cent用户,并设置密码,后执行如下命令:
useradd cent && echo "123" | passwd --stdin cent
echo -e 'Defaults:cent !requiretty\ncent ALL = (root) NOPASSWD:ALL' | tee /etc/sudoers.d/ceph
chmod 440 /etc/sudoers.d/ceph
在部署节点切换为cent用户,设置无密钥登陆各节点包括客户端节点
ssh-keygen
cd .ssh
ssh-copy-id chen1
ssh-copy-id chen2
ssh-copy-id chen3
在部署节点切换为cent用户,在cent用户家目录,设置如下文件:
vim .ssh/config
Host ceph
Hostname ceph
User cent
Host chen1
Hostname chen1
User cent
Host chen2
Hostname chen2
User cent
Host chen3
Hostname chen3
User cent
~
chmod 600 .ssh/config
配置yum源并发到其它集群式
cd /etc/yum.repos.d/
vim ceph-yunwei.repo
[ceph-yunwei]
name=ceph-yunwei-install
baseurl=https://mirrors.aliyun.com/centos/7/storage/x86_64/ceph-jewel/
enable=1
gpgcheck=0
scp ceph-yunwei.repo chen1:/etc/yum.repos.d/
scp ceph-yunwei.repo chen2:/etc/yum.repos.d/