Skip to content

Instantly share code, notes, and snippets.

@sarjarapu
Created October 5, 2018 04:30
Show Gist options
  • Save sarjarapu/112fdd7fddf3b434520623c996ee0b9c to your computer and use it in GitHub Desktop.
Save sarjarapu/112fdd7fddf3b434520623c996ee0b9c to your computer and use it in GitHub Desktop.
A bash script to install ntpd service on all three servers (KDC, MongoDB Server and User machine)
# Run these commands on all 3 servers
# Install NTP to synchronize the clock on all three servers
sudo yum install -y ntp
sudo ntpdate 0.rhel.pool.ntp.org
sudo systemctl start ntpd.service
sudo systemctl enable ntpd.service
# TODO: Fix the below ip addresses based on your lab environment
echo "172.31.10.101 kdc.mdbkrb5.net" | sudo tee -a /etc/hosts
echo "172.31.10.102 mdb01.mdbkrb5.net" | sudo tee -a /etc/hosts
echo "172.31.10.103 client01.mdbkrb5.net" | sudo tee -a /etc/hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment