Preparing the Environment
Before compiling and deploying 3FS, you need to disable the firewall and configure SELinux, host names, hosts files, and cluster time synchronization.
Disabling the Firewall and Configuring SELinux
Perform this operation on all nodes.
- Disable the firewall.
systemctl stop firewalld systemctl disable firewalld systemctl status firewalld

- Set SELinux to the permissive mode.
- Open the /etc/selinux/config file.
vi /etc/selinux/config
- Press i to enter the insert mode and modify the configuration as follows.
SELINUX=permissive
- Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
Figure 1 Setting the permissive mode
- Restart the server for the configuration to take effect.
- Open the /etc/selinux/config file.
Configuring Host Names and the hosts File
Perform this operation on all nodes.
- Set the name of each node according to Cluster Environment Planning. For example, set the name of the Meta node as follows:
hostnamectl --static set-hostname meta
- Enter the IP address of the Meta node in the /etc/hosts file of each node.
- Open the /etc/hosts file.
vi /etc/hosts
- Press i to enter the insert mode and add the following content to the file:
192.168.65.10 meta
- Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Open the /etc/hosts file.
Synchronizing the Cluster Time
Perform this operation on all nodes.
- Install the NTP and ntpdate tools.
yum install -y ntp ntpdate
- Back up the original configuration on each node.
cd /etc && mv ntp.conf ntp.conf.bak
- Edit the NTP configuration file on the Meta node.
- Open the NTP configuration file.
vi /etc/ntp.conf
- Press i to enter the insert mode and edit the configuration file according to the following content:
restrict 127.0.0.1 restrict ::1 restrict 192.168.65.10 mask 255.255.255.0 server 127.127.1.0 fudge 127.127.1.0 stratum 8 # Hosts on local network are less restricted. restrict 192.168.65.10 mask 255.255.255.0 nomodify notrap
- Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Open the NTP configuration file.
- Enable the NTPD service on the Meta node.
systemctl start ntpd systemctl enable ntpd systemctl status ntpd

- Edit the NTP configuration file on nodes other than Meta.
- Open the NTP configuration file.
vi /etc/ntp.conf
- Press i to enter the insert mode and add the IP address of the Meta node to the file.
server 192.168.65.10
- Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Forcibly synchronize the time of Meta to all the other nodes.
ntpdate meta
Wait for 5 minutes. Otherwise, an error message "no server suitable for synchronization found" is displayed.
- Write the hardware clock to all the nodes except Meta to prevent configuration failures after the restart.
hwclock -w
- Install and start the crontab tool.
yum install -y crontabs chkconfig crond on systemctl start crond crontab -e
- Synchronize time with the Meta node every 10 minutes.
*/10 * * * * /usr/sbin/ntpdate 192.168.65.10
- Open the NTP configuration file.