When we use the centos System for CentOS time adjustment, problems may occur frequently in the time zone, and sometimes errors may occur after the change. Next we will learn a way to change this situation.
If you are not using CentOS, run the command yum install ntp and then: ntpdate us.pool.ntp.org. Because the CentOS system is re-compiled with the source code of rhas, many places are exactly the same. The Time Zone of www.2cto.com rhas5 exists as a file. The current time zone file is in/etc/localtime. Where are the files stored in other time zones? In/usr/share/zoneinfo, we use UTC + 8, Beijing, and Shanghai time # cp-f/usr/share/zoneinfo/Asia/Shanghai/etc/localtime # After reboot is restarted, date to view the time, view the current time zone date-R, view/modify the Linux time zone and time 1, Time Zone 1. view the current time zone date-R 2. modify the time zone method (1) tzselect method (2) Limited to the RedHat Linux and CentOS system timeconfig method (3) applicable to Debiandpkg-reconfigure tzdata 3. copy the corresponding time zone file to replace the CentOS System Time Zone file, or create the link file cp/usr/share/zoneinfo/$ main Time Zone/$ Time Zone/etc/localtime which can be used in China: cp/usr/share/zoneinfo/Asia/Shanghai/ Etc/localtime 2, time 1, view time and date www.2cto.com 2, set the time and date to set the CentOS system date to the command date-s June 10, 1996/96 on January 1, 06/22 set the CentOS system time the command date-s 01:52:00 P.M. 3. write the current time and date to the BIOS, avoid Failure after restart hwclock-w III. Scheduled synchronization time #/usr/sbin/ntpdate 210.72.145.44>/dev/null 2> & 1 so that we have completed the settings to modify the CentOS System Time Zone. I hope you can learn more. When ntpdate is used, the following error occurs: no server suitable for synchronization found is probably because the firewall blocks udp port 123. If the firewall is still disabled, it is very likely that there is a problem with the upper-layer routing settings. In this case, we can only update the time through tcp. It must be rdate to view the time of the Time Server: # rdate time-b.nist.gov set time and time server synchronization: # rdate-s time-b.nist.gov www.2cto.com what do not understand, please # man rdate below the attached Series Time Server list, some may not use ha time.nist.govtime-b.nist.gov216.118.116.105rdate.darkorb.net202.106.196.19time-b.timefreq.bldrdoc.gov
Author Xiong Erxian