Enabling NTP on your cluster

The clocks of all the nodes in your cluster must be synchronized. If your system does not have access to the internet, you must set up a master node as an NTP xserver to achieve this synchronization.

About this task

Use the following instructions to enable NTP for your cluster:

Procedure

  1. Run the following command to configure NTP clients on each node in your cluster:
    1. Use the following command to configure the NTP clients:
      yum install ntp
    2. Use the following command to enable the service:
      systemctl enable ntpd
    3. Use the following command to start the NTPD:
      systemctl start ntpd
  2. Run the following command to enable the service on each node in your cluster:
    chkconfig ntpd on
  3. If you want to use an existing NTP server as the X server in your environment, complete the following steps:
    1. Configure the firewall on the local NTP server to enable UDP input traffic on Port 123 and replace 192.168.1.0/24 with the IP addresses in the cluster, as shown in the following example with RHEL hosts:
      # iptables -A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state --state NEW -p udp --dport 123 -j ACCEPT
  4. Save and restart iptables. Run the following command on all the nodes in your cluster:
    # service iptables save
    # service iptables restart 
  5. Finally, configure clients to use the local NTP server. Edit the /etc/ntp.conf file and add the following line:
    server $LOCAL_SERVER_IP OR HOSTNAME