1. Log in to the machine and use the date command to view it.
2. Execute the following command:
#echo -e "0.asia.pool.ntp.org\ 1.asia.pool.ntp.org\ 2.asia.pool. Ntp.org\ 3.asia.pool.ntp.org\ 210.72.145.44">/etc/ntp/step-tickers #ntpdate -u 0.asia.pool.ntp.org #echo -e "server 0.asia.pool.ntp.org prefer\ server 1.asia.pool.ntp.org\ server 2.asia.pool.ntp.org\ server 3.asia.pool.ntp.org\ server 210.72.145.44" >>/etc/ntp.conf #service ntpd start #chkconfig --level 35 ntpd on
3. Use date to see if the time has been synchronized to the national standard time
A method
When we use the CentOS system, there may be problems in the time zone. Sometimes it will go wrong after the change. Let's learn a way to change this situation. If it is not installed, and you are using the CentOS system, use the command yum install ntp
then: ntpdate us.pool.ntp.org.
Because the CentOS system is compiled with the source code of rhas, many places are exactly the same.
The time zone of rhas5 exists in the form of a file. The current time zone file is in /etc/localtime
Then where are the files in other time zones stored?
Under /usr/share/zoneinfo
We use East Eight District, Beijing, Shanghai time
#cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime #reboot
After reboot, date view time, view current time zone date -R, view/modify Linux time zone and time
1. Time zone
1 View the current time zone date -R
2. Modify the set time zone Method (1) tzselect method (2) RedHat Linux and CentOS only timeconfig method (3) Applies to Debian dpkg-reconfigure tzdata
3. Copy the corresponding time zone file and replace the CentOS system time zone file; or create a link file cp /usr/share/zoneinfo/$main time zone/$time zone /etc/localtime can be used in China: cp /usr/share/Zoneinfo/Asia/Shanghai /etc/localtime
Second, time
1. View time and date date
2. Set the time and date Set the CentOS system date to Command dated June 10, 1996 date -s 06/22/96 Command to set the CentOS system time to 1:52 pm 0 pm date -s 13:52:00
3. Current Time and date are written to the BIOS Avoid failure after restart hwclock -w
Third, timing synchronization time # /usr/sbin/ntpdate 210.72.145.44 > /dev/null 2>&1
So we are done About setting the time zone for modifying the CentOS system. I hope everyone can learn more.
Remote Desktop Terminal Services default port as “3389” To prevent malicious connections
Managing a server is not an easy task. Today, I will introduce some of the five W
HTTP Error 403.1 - Forbidden Access: Execution access is denied. Workaround This page cannot display
Software Name: Dynamic Network Forum Dvbbs Software Version: 7.0.0 SP2 Authorization: Free Softwar
Server temporarily solves ARP spoofing attack method
Nginx server cache settings example explain
Breaking the IIS client connection limit
Description www server use linux build (a)
RAID disk array technology and data recovery principle
Build SVN server under Windows system
Entry-level rack service assembly Baotong DIY service
Windows 7 installation Apache service failed to do
Secret: How is the Windows server attacked
Linux with Apache one IP multiple sites multiple domain configuration method
How to increase the maximum number of Apache connections? Details of
What is the difference between a server and a PC on the hard disk?
Win8 system how to set the desktop background slide show effect
How to install the graphics card driver? Five steps to complete the driver installation
Effective solution for desktop input method icon "missing"
Win10 malware removal tool tutorial
How does Win8.1 solve the problem that Bluetooth devices are disabled?
If the computer can't start 10 solutions to teach you the fault
Can Win10 Technology Preview be upgraded to the official version if it needs to be activated?
Win10 method to achieve automatic shutdown through commands