CentOS7 hloov kho lub sijhawm ua haujlwm li cas? OpenVZ sync timezone rau NTP server

Lub sijhawm teeb tsa lub sijhawm tsis raug raws li Linux, yuav ua li cas hloov kho cov synchronization?

CentOS7 hloov kho lub sijhawm ua haujlwm li cas? OpenVZ sync timezone rau NTP server

Txoj hauv kev yooj yim tshaj plaws yog kom teeb tsa OpenVZ sai kom synchronize lub sijhawm thaj tsam rau NTP server ntawm SSH cov lus txib.

  • NTP English lub npe tag nrho yogNetwork Time Protocol.

OpenVZ yog dab tsi?

  • OpenVZ yog raws liLinuxOS-level virtualization technology rau cov ntsiav.
  • OpenVZ tso cai rau lub cev servers khiav ntau lub tshuab ua haujlwm, ib qho kev siv tshuab feem ntau siv hauv virtual private servers.

Ua ntej, rho tawm lub sijhawm hauv cheeb tsam ▼

rm -rf /etc/localtime

Hloov lub sijhawm rau thaj tsam +8 ▼

ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

Saib lub sijhawm teem caij ▼

date -R

Yuav hloov li casCentOS 7 lub sijhawm system?

Tom ntej no, hloov kho lub sijhawm CentOS 7 thiab teeb tsa OpenVZ synchronization lub sijhawm rau NTP server kom synchronize nrog lub sijhawm server.

Nruab NTP ▼

yum install -y ntp

Debug saib lub sijhawm sib txawv ▼

ntpdate -d us.pool.ntp.org

Sync lub sijhawm ▼

ntpdate us.pool.ntp.org

Xyuas seb lub sijhawm synchronized ▼

date -R

Hloov kho NTP cov ntaub ntawv teeb tsa ▼

vi /etc/sysconfig/ntpd

Synchronize lub moos kho vajtse ntawm tus tswv tsev standalone ▼

SYNC_HWCLOCK=yes

Teeb tsa kom pib qhov kev pabcuam NTP thaum pib, thiab cia li synchronize lub sijhawm tsis tu ncua ▼

systemctl enable ntpd.service

Pib NTP synchronization ▼

systemctl start ntpd.service

评论 评论

Koj email chaw nyob yuav tsis raug luam tawm. Yuav tsum tau siv cov liaj teb * Ntaus Cim

Scroll rau saum