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