Configuring and Installing New Servers
Disabling the Firewall
On each server node and client node, run the following commands in sequence to disable the firewall:
1 2 3 | systemctl stop firewalld systemctl disable firewalld systemctl status firewalld |

Configuring Host Names
- Set the permanent static host names as ceph4 and ceph5.
Set the host name of Ceph server node 4 to ceph4:
1hostnamectl --static set-hostname ceph4
Set the host name of Ceph server node 5 to ceph5:
1hostnamectl --static set-hostname ceph5
- Modify /etc/hosts on each server and client.
1vim /etc/hostsAdd the following content to the file:192.168.3.156 ceph1 192.168.3.157 ceph2 192.168.3.158 ceph3 192.168.3.197 ceph4 192.168.3.198 ceph5 192.168.3.192 client1
Configuring NTP
Ceph automatically checks the time of the storage nodes. If a large time difference is detected, an alarm will be generated. To prevent the time difference between storage nodes, perform the following steps:
- Install the NTP service.
- On each server node and client node, install the NTP service.
1yum -y install ntp ntpdate

- Back up the existing configuration on each server node and client node.
1cd /etc && mv ntp.conf ntp.conf.bak
- Create an NTP file on the server node ceph1.
1vim /etc/ntp.confAdd the NTP server information:1 2 3 4 5
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 192.168.3.0 mask 255.255.255.0 indicates the network segment and subnet mask of ceph1.
- Create an NTP file on ceph4, ceph5, and all client nodes.
1vim /etc/ntp.confAdd the client information:1server 192.168.3.166
- Save the settings and exit.
- On each server node and client node, install the NTP service.
- Start the NTP service.
- On ceph1, start the NTP service and check the service status.
1 2 3
systemctl start ntpd systemctl enable ntpd systemctl status ntpd

- Forcibly synchronize the time of all other nodes with the NTP server (ceph1) time.
1ntpdate ceph1 - Write the hardware clock to all nodes except ceph1 to prevent the configuration failure after the restart.
1hwclock -w - Install and start the crontab tool on all nodes except ceph1.
1 2 3 4
yum install -y crontabs chkconfig crond on systemctl start crond crontab -e
- Add the following information to enable the system to automatically synchronize time with ceph1 every 10 minutes:
1*/10 * * * * /usr/sbin/ntpdate 192.168.3.166
- On ceph1, start the NTP service and check the service status.
Configuring Password-Free Login
Enable ceph1 to access all cluster/client nodes (including ceph1) without a password and client1 to access all cluster/client nodes (including client1) without a password.
- Generate a public key on ceph1 and send the public key to each server node and client node.
1 2
ssh-keygen -t rsa for i in {4..5}; do ssh-copy-id ceph$i; done
- Generate a public key on client1 and send the public key to each server node and client node.
1 2
ssh-keygen -t rsa for i in {4..5}; do ssh-copy-id ceph$i; done
After entering the ssh-keygen -t rsa command, press Enter to use the default configuration.
Setting the Permissive Mode
Set the permissive mode on each server node and client node.
- Set the permissive mode temporarily. The configuration becomes invalid after the system restarts.
1setenforce permissive
- Set the permissive mode permanently. The configuration takes effect upon the next restart.
1vim /etc/selinux/configSet SELINUX to permissive.

Configuring the EPEL Source
Run the following command on each cluster node and client node to configure the Extra Packages for Enterprise Linux (EPEL) source:
1 | yum install epel-release -y |

Configuring the Ceph Mirror Source
- Create a ceph.repo file on each server node and client node.
1vim /etc/yum.repos.d/ceph.repoAdd the following content to the file:
[Ceph] name=Ceph packages for $basearch baseurl=http://download.ceph.com/rpm-luminous/el7/$basearch enabled=1 gpgcheck=1 type=rpm-md gpgkey=https://download.ceph.com/keys/release.asc priority=1 [Ceph-noarch] name=Ceph noarch packages baseurl=http://download.ceph.com/rpm-luminous/el7/noarch enabled=1 gpgcheck=1 type=rpm-md gpgkey=https://download.ceph.com/keys/release.asc priority=1 [ceph-source] name=Ceph source packages baseurl=http://download.ceph.com/rpm-luminous/el7/SRPMS enabled=1 gpgcheck=1 type=rpm-md gpgkey=https://download.ceph.com/keys/release.asc priority=1
- Update the Yum source.
1yum clean all && yum makecache

Installing the Ceph Software
- Check the current version on an existing Ceph node.
1ceph -vThe following information is displayed:

- Install the Ceph software on the new node. Ensure that the Ceph version is the same as that of existing nodes.
1yum -y install ceph*12.2.11 –exclude ceph-debuginfo
- Check the version after the new node is installed.
1ceph -vThe following information is displayed:
