Centos time adjustment operation

Source: Internet
Author: User
Tags time zones
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 yumi...
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
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.