Linux時間調整

Linux修改時區

shell # cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

Linux安裝ntp時間服務器

shell # yum install ntp ntpdate -y
shell # vim /etc/ntp.conf
1)vim /etc/ntp.conf
①  配置方法一:只允許192.168.100.0網段的客戶機進行時間同步
在restrict default kod nomodify notrap nopeer noquery(表示默認拒絕所有IP的時間同步)之後增加一行:
restrict 192.168.100.0 mask 255.255.255.0 nomodify notrap

②  配置方法二:允許任何ip的客戶機都可以進行時間同步
將restrict default kod nomodify notrap nopeer noquery修改爲如下行:
Restrict default nomodify

Linux時間調整

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章