BMS-HOSxP Community
HOSxP => Linux => ข้อความที่เริ่มโดย: doramon ที่ พฤษภาคม 03, 2008, 21:34:13 PM
-
http://www.mm.co.th/poonlap/node/77
http://www.itdestination.com/freetips/showtip.php?00468
-
ขอบคุณมากครับ อ.อ็อด
-
linux ทำแบบนี้ครับ
เข้าไปที่ command linux หน้าจอดำ
# crontab -e
0 1 * * * ntpdate pool.ntp.org
หมายเหตุ
1. linux ที่กำหนดการตั้งเวลาแบบนี้ต้องต่อเน็ต อยู่
2. ทุก 01.00 น. จะตรวจสอบเวลา
-
http://www.scriptdd.com/webtip/crontab-how-to.html
-
http://kevin.vanzonneveld.net/techblog/article/schedule_tasks_on_linux_using_crontab/
-
วิธีการติดตั้งโปรแกรม NTP Server บนระบบปฏิบัติการ Linux กับสถาบันมาตรวิทยาแห่งชาติ ครับ
linux ที่เชื่อมต่อ อินเตอร์เน็ต
/etc/ntp.conf
------------------------------------
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
server 203.185.69.60
server 203.185.69.59
server 203.185.69.56
#เครื่อง Time server ของสถาบันมาตรวิทยาแห่งชาติ
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 2
driftfile /var/lib/ntp/drift
broadcastdelay 0.008
authenticate yes
keys /etc/ntp/keys
-------------------------------------------------
ในกรณีที่เครื่อง server Linux ไม่ได้เชื่อมต่อ อินเตอร์เน็ต ทำได้โดยการ sync เวลากับเครื่อง server linux ที่เชื่อมต่ออินเตอร์เน็ต config ดังนี้
/etc/ntp.conf
----------------------------
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
server 192.168.1.5
server 192.168.1.10
#เครื่อง Server ในเครื่อข่าย Lan ที่ Sync เวลากับ Time server ของสถาบันมาตรฯ
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 2
driftfile /var/lib/ntp/drift
brodcastdelay 0.008
authenticate yes
keys /etc/ntp/keys
-----------------------------
แก้ ไฟล์ /etc/ntp.conf เสร็จแล้ว ก็สั่งให้โปรแกรม ntp ทำงาน
#service ntpd restart
อ้างอิง *http://www.nimt.or.th/nimt/Service/index.php?menuName=time5 (http://www.nimt.or.th/nimt/Service/index.php?menuName=time5)
-
ขอบคุณมากครับจะลองเอาไปใช้ดูครับพี่ครับ
-
ขอบคุณครับ :D :D :D
-
วิธีการลง NTP (Network Time Protocol) Server ใน CentOS 5 ครับ
http://hosxp.net/index.php?option=com_smf&topic=6922
-
ขอบคุณครับ ;)