linuxͬ²½Ê±¼äÔõôÉèÖÃ
ͨ¹ýÒÔÏ°취¿ÉÔÚ linux ÖÐÉèÖÃʱ¼äͬ²½£º×°Öà ntp ЧÀÍÆôÓà ntp ЧÀÍÉèÖà ntp ЧÀÍÆ÷£¬Ìí¼Ó¿ÉÓÃЧÀÍÆ÷£¨Èç time.google.com£©ÖØÆô ntp ЧÀÍÐèÈ·±£ ntp ЧÀÍÆ÷¿É»á¼ûÇÒÎȹ̣¬²¢°´ÆÚ¼ì²éЧÀÍ״̬¡£ÈôÓÐÐëÒª£¬ÉóÉ÷ʹÓà date -s ÏÂÁîÊÖ¶¯µ÷½âϵͳʱ¼ä¡£
ÔÚ Linux ÖÐÉèÖÃʱ¼äͬ²½
ÔõÑùÉèÖà Linux ͬ²½Ê±¼ä£¿
ÔÚ Linux ϵͳÖÐÉèÖÃʱ¼äͬ²½£¬ÐèÒªÒÔÏ°취£º
×°Öà NTP ЧÀÍ£º
CentOS/Red Hat£ºyum install ntp
Debian/Ubuntu£ºapt install ntp
ÆôÓà NTP ЧÀÍ£º
CentOS/Red Hat£ºsystemctl start ntpd
Debian/Ubuntu£ºservice ntp start
ÉèÖà NTP ЧÀÍÆ÷£º
±à¼ /etc/ntp.conf Îļþ¡£
½« server ÐÐ×¢Ê͵ô²¢Ìí¼Ó¿ÉÓÃµÄ NTP ЧÀÍÆ÷£¬ÀýÈ磺
#server 0.debian.pool.ntp.org server time.google.com
µÇ¼ºó¸´ÖÆ
ÖØÆô NTP ЧÀÍ£º
CentOS/Red Hat£ºsystemctl restart ntpd
Debian/Ubuntu£ºservice ntp restart
ÆäËû×¢ÖØÊÂÏ
È·±£Ê¹ÓÃµÄ NTP ЧÀÍÆ÷¿É»á¼ûÇÒÎȹ̡£
°´ÆÚ¼ì²é NTP ЧÀ͵Ä״̬ (systemctl status ntpd »ò service ntp status)¡£
ÈôÊÇϵͳʱ¼äÓнϴó²î±ð£¬¿ÉÒÔÊÖ¶¯µ÷½âʱ¼ä£¬µ«Ó¦ÉóÉ÷²Ù×÷¡£Ê¹Óà date -s ÏÂÁî¿ÉÒÔÉèÖÃϵͳʱ¼ä£¬µ«Òª×¢ÖØ¿ÉÄÜÆÆËðϵͳÈÕÖ¾µÈʱ¼äÏà¹ØµÄ¹¦Ð§¡£
ÒÔÉϾÍÊÇlinuxͬ²½Ê±¼äÔõôÉèÖõÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡