Configuring the Deployment Environment
This section uses three servers and three clients as an example.
- Set the host name on each node.
hostnamectl set-hostname ceph1 hostnamectl set-hostname ceph2 hostnamectl set-hostname ceph3 hostnamectl set-hostname client1 hostnamectl set-hostname client2 hostnamectl set-hostname client3
- Configure the host names on the three hosts and add the following content to the /etc/hosts file:
[IP] ceph1 [IP] ceph2 [IP] ceph3 [IP] client1 [IP] client2 [IP] client3
Change [IP] to the actual local IP address.
- Configure password-free login on ceph1, ceph2, and ceph3.
ssh-keygen -t rsa for i in {1..3};do ssh-copy-id ceph$i;done - Disable the firewall.
systemctl stop firewalld systemctl disable firewalld systemctl status firewalld
- Disable SELinux.
setenforce 0 sed -i 's/=permissive/=disabled/g' /etc/selinux/config
- Configure clock synchronization on ceph1, ceph2, and ceph3.
- Install the chrony service.
dnf install -y chrony
- Back up the configuration file.
mv /etc/chrony.conf /etc/chrony.conf.bak
- Modify the configuration file.
cat > /etc/chrony.conf <<EOF server xxx iburst # xxx indicates the IP address of the synchronization service. allow xxx/xx # xxx indicates the local IP address. local stratum 10 EOF
- Restart chrony.
systemctl restart chronyd systemctl enable chronyd
- Check the time synchronization status.
chronyc -a makestep # Forcibly synchronize the system time. chronyc sourcestats # Display the synchronization statistics of the current time source. chronyc sources -v # Display detailed information about the current time source.
- Install the chrony service.
Parent topic: Deploying Ceph