ntp/install.sh

raw link view readme
1 yum install firewalld -y
2 systemctl start firewalld
3 systemctl enable firewalld
4 firewall-cmd --permanent --add-interface=eth0 --zone=public
5 firewall-cmd --permanent --add-service=ntp --zone=public
6 firewall-cmd --reload
7
8 yum install ntp -y
9
10 sed -i.original "s/^restrict default.*/restrict default nomodify notrap/" /etc/ntp.conf
11 sed -i "s/^#restrict 192\.168\.1\.0.*/restrict 10.0.0.0 mask 255.0.0.0 nomodify notrap/" /etc/ntp.conf
12
13 systemctl start ntpd
14 systemctl enable ntpd
15