在所有主机上执行以下操作。
1 | hostnamectl set-hostname 主机名 --static |
1 | vim /etc/hosts |
在hosts文件中添加集群所有节点的“地址-主机名”映射关系。
Linux系统默认开启的SELinux安全机制对于OpenStack等相关服务会做安全控制拦截,同时会阻止Ceph集群间的互相通信,导致无法正常部署OpenStack和Ceph集群。这是Linux OS本身的行为,鲲鹏BoostKit虚拟化使能套件并不对此提供的详细解决方案。如果客户想在自己的系统中使用SELinux,则需要自行寻找解决方法。
针对此限制,我们提供了快速的禁用SELinux的方法。鲲鹏BoostKit虚拟化使能套件中,提供的SELinux配置方法仅供参考,需用户自行评估并承担相应风险。
禁用SELinux可能会导致安全问题,如果客户最终的解决方案本身就没有规划启用SELinux,建议通过端到端的整体方案来弥补SELinux关闭带来的风险,且需自行承担安全风险。如果客户有SELinux的需求,建议根据实际的SELinux问题进行细粒度的规则配置,并保证整个系统的安全。
1 2 3 | [root@ceph1 ~]# systemctl stop firewalld.service && systemctl disable firewalld.service [root@ceph2 ~]# systemctl stop firewalld.service && systemctl disable firewalld.service [root@ceph3 ~]# systemctl stop firewalld.service && systemctl disable firewalld.service |
1 | setenforce 0
|
该操作为临时关闭SELinux,若需永久关闭,请修改配置文件“/etc/selinux/config”,配置“SELINUX=disabled”。
1 | yum -y install ntp ntpdate |
1 | cd /etc && mv ntp.conf ntp.conf.bak |
1 | vim /etc/ntp.conf |
1 2 3 4 5 | restrict 127.0.0.1 restrict ::1 restrict 192.168.21.0 mask 255.255.255.0 server 127.127.1.0 fudge 127.127.1.0 stratum 8 |
1 | vim /etc/ntp.conf |
server 192.168.21.1
1 | systemctl enable ntpd && systemctl start ntpd |
1 2 | ntpdate ceph1 hwclock -w |
1 | ssh-keygen -t rsa |
全部回车,采取默认配置。
1 2 3 4 5 | ssh-copy-id ceph1 ssh-copy-id ceph2 ssh-copy-id ceph3 ssh-copy-id controller ssh-copy-id compute |
1 | ssh-keygen -t rsa |
全部回车,采取默认配置。
1 2 3 4 5 | ssh-copy-id ceph1 ssh-copy-id ceph2 ssh-copy-id ceph3 ssh-copy-id controller ssh-copy-id compute |