Rate This Document
Findability
Accuracy
Completeness
Readability

Configuring the Deployment Environment

This section uses three servers and three clients as an example.

  1. Set the host name on each node.
    1
    2
    3
    4
    5
    6
    hostnamectl set-hostname ceph1
    hostnamectl set-hostname ceph2
    hostnamectl set-hostname ceph3
    hostnamectl set-hostname client1
    hostnamectl set-hostname client2
    hostnamectl set-hostname client3
    
  2. Configure the host names on the three hosts and add the following content to the /etc/hosts file:
    1
    2
    3
    4
    5
    6
    [IP] ceph1
    [IP] ceph2
    [IP] ceph3
    [IP] client1
    [IP] client2
    [IP] client3
    

    Change [IP] to the actual local IP address.

  3. Configure password-free login on ceph1, ceph2, and ceph3.
    1
    2
    ssh-keygen -t rsa 
    for i in {1..3};do ssh-copy-id ceph$i;done
    
  4. Disable the firewall.
    1
    2
    3
    systemctl stop firewalld
    systemctl disable firewalld
    systemctl status firewalld
    
  5. Disable SELinux.
    1
    2
    setenforce 0
    sed -i 's/=permissive/=disabled/g' /etc/selinux/config
    
  6. Configure clock synchronization on ceph1, ceph2, and ceph3.
    1. Install the chrony service.
      1
      dnf install -y chrony
      
    2. Back up the configuration file.
      1
      mv /etc/chrony.conf /etc/chrony.conf.bak
      
    3. Modify the configuration file.
      1
      2
      3
      4
      5
      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
      
    4. Restart chrony.
      1
      2
      systemctl restart chronyd
      systemctl enable chronyd
      
    5. Check the time synchronization status.
      1
      2
      3
      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.