来源于:http://docs.ceph.com/docs/master/start/quick-start-preflight/#ceph-deploy-setup
- 先安装NTP,防止时钟漂移(保证集群中的其他的电脑的时间相差在一个域内)引起的问题;(node中操作)
centos/RHEL,execute: sudo yum isntall ntp ntpdate ntp-doc
debian/ubuntu,execute: sudo spt install ntp
- 安装SSH SERVER,确保每个ceph node中都有openssh-server
- sudo apt install openssh-server或者
- sudo yum install openssh-server
3.创建一个CEPH 部署用户
- ssh username@ceph-server(这个是服务器地址)
- sudo useradd -d /home/{username} -m {username}
- sudo passwd {username}
- echo "{username} ALL = (root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/{usernae} #确保node有特权
- sudo chmod 0440 /etc/sudoers.d/{username}
4.确保ssh无密码,ceph-deploy将会创建一个SSH key 初始化显示器
- ssh-keygen
-
Generating public/private key pair. Enter file in which to save the key (/ceph-admin/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /ceph-admin/.ssh/id_rsa. Your public key has been saved in /ceph-admin/.ssh/id_rsa.pub.
- ssh-copy-id {username}@node1 #拷贝每个Ceph Node 代替username
- 再去etc目录下的ssh目录下取代下列的{username}用实际的用户名
-
Host node1 Hostname node1 User {username} Host node2 Hostname node2 User {username} Host node3 Hostname node3 User {username}
这样就实现了在admin账户下ssh免密登录到node中;