在服务端节点配置镜像源,若服务器可直接访问外部网络,则无需配置。
1 2 | mkdir -p /iso mount /root/openEuler-***-everything-aarch64-dvd.iso /iso |
1 | vim /etc/yum.repos.d/openEuler.repo
|
1 2 3 4 5 6 | [Base] name=Base baseurl=file:///iso enabled=1 gpgcheck=0 priority=1 |
1 | wget https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/Everything/aarch64/os/Packages/c/compat-openssl10-1.0.2o-5.fc30.aarch64.rpm --no-check-certificate |
1 | rpm -ivh compat-openssl10-1.0.2o-5.fc30.aarch64.rpm |
Linux系统默认开启的防火墙安全机制会阻止各组件之间的正常连接,导致无法正常部署Ceph集群。这是Linux
针对此限制,我们提供了快速的关闭防火墙的方法。鲲鹏BoostKit分布式存储全局缓存特性中,
关闭防火墙可能会导致安全问题,如果客户最终的解决方案本身就没有规划启用防火墙,建议通过端到端的整体方案来弥补防火墙禁用带来的风险,且需自行承担安全风险。如果客户有开启防火墙的需求,建议对防火墙进行细粒度的规则配置,根据实际使用情况,开放对应的端口、协议,并保证整个系统的安全。
1 2 3 | systemctl stop firewalld systemctl disable firewalld systemctl status firewalld |
配置永久静态主机名,建议将服务端节点配置为ceph1~ceph3,客户端节点配置为client1~client3。
1 | vim /etc/hosts
|
1 2 3 4 5 6 | 192.168.3.166 ceph1 192.168.3.167 ceph2 192.168.3.168 ceph3 192.168.3.160 client1 192.168.3.161 client2 192.168.3.162 client3 |
Ceph中会自动校验存储节点之间的时间,若不同节点之间时差较大,会有告警,因此需要在各节点间配置时钟同步。
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 6 7 8 9 | restrict 127.0.0.1 restrict ::1 restrict 192.168.3.0 mask 255.255.255.0 server 127.127.1.0 fudge 127.127.1.0 stratum 8 restrict default kod nomodify notrap nopeer noquery interface ignore wildcard interface listen <IP-adress> |
以上文件中,“restrict 192.168.3.0 mask 255.255.255.0”是ceph1所在的IP网段与掩码。
1 | vim /etc/ntp.conf
|
1 | server 192.168.3.166 |
1 2 3 | systemctl start ntpd systemctl enable ntpd systemctl status ntpd |
1 | ntpdate ceph1 |
1 | hwclock -w |
1 2 3 4 | yum install -y crontabs systemctl enable crond.service systemctl start crond crontab -e |
1 | */10 * * * * /usr/sbin/ntpdate 192.168.3.166 |
1 2 3 | ssh-keygen -t rsa for i in {1..3};do ssh-copy-id ceph$i;done for i in {1..3};do ssh-copy-id client$i;done |
输入第一条命令“ssh-keygen -t rsa”之后,按“Enter”键使用默认配置。
在所有节点关闭permissive模式。
1 | setenforce permissive
|
1 | vim /etc/selinux/config
|