2.10.配置用户NTF服务
2.10.1.配置节点RAC1
1) |
[[email protected] sysconfig]#sed -i ‘s/OPTIONS/#OPTIONS/g‘ /etc/sysconfig/ntpd |
2) |
[[email protected] sysconfig]#cat >> /etc/sysconfig/ntpd << EOF > OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid" > EOF |
3) |
[[email protected] sysconfig]#mv /etc/ntp.conf /etc/ntp.confbak |
4) |
[[email protected] sysconfig]# cat > /etc/ntp.conf << EOF > restrict 0.0.0.0 mask 0.0.0.0 nomodify > server 127.127.1.0 > fudge 127.127.1.0 stratum 10 > driftfile /var/lib/ntp/drift > broadcastdelay 0.008 > authenticate no > keys /etc/ntp/keys > EOF |
2.10.2.配置节点RAC2
1) |
[[email protected] sysconfig]# sed -i ‘s/OPTIONS/#OPTIONS/g‘ /etc/sysconfig/ntpd |
2) |
[[email protected]]# cat >> /etc/sysconfig/ntpd << EOF > OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid" > EOF |
3) |
[[email protected] sysconfig]# mv /etc/ntp.conf /etc/ntp.confbak |
4) |
[[email protected] sysconfig]# cat >> /etc/ntp.conf << XL > restrict default kod nomodify notrap nopeer noquery > restrict 10.10.97.0mask 255.255.255.0 nomodify notrap > restrict 127.0.0.1 > server 10.10.97.168 > server 127.127.1.0 # local clock > fudge 127.127.1.0 stratum 10 > driftfile /var/lib/ntp/drift > broadcastdelay 0.008 > keys /etc/ntp/keys > XL |
2.10.3.启动服务(双节点)
[[email protected] etc] #service ntpd restart |
2.10.4.系统启动自动加载
[[email protected] etc] #chkconfig ntpd on |
时间: 2024-11-13 07:51:19