badlogic

How to configure time in cent os

Aug 25th, 2016
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.13 KB | None | 0 0
  1. Configuration of time and date in cent os 7
  2.  
  3. Step 1. install using this command in terminal ->    yum -y install ntp
  4.  
  5. Step 2. after the client is install type this in command line ->    ntpdate ntp.pagasa.dost.gov.ph
  6.  
  7. Step 3. to check if the date is change type this in a terminal -> date or timedatectl
  8.  
  9. Step 4. to view the list of time zone type this in a terminal ->  timedatectl list-timezones | grep -i asia
  10.  
  11. Step 5. set the time zone type this in a command line ->   timedatectl set-timezone 'Asia/Hong_Kong'
  12.  
  13. Step 6. now edit the ntp.conf so Linux knows what time servers to sync with on startup type in terminal press control + i to edit -> vi /etc/ntp.conf
  14.  
  15. Step 7. comment the encircle in line 19 to 23 the terminal by putting # in front of the txt and add this at the bottom of commented file (see attach file for reference)
  16. ->  server 1.centos.ntp.pagasa.dost.gov.ph iburst
  17.  
  18. Step 8 . to save the file press ESC and Control + : and type wq to save
  19.  
  20. reference link here
  21.  
  22. http://blog.zwiegnet.com/linux-server/configure-ntp-client-on-centos-7/
  23. http://www.cyberciti.biz/faq/howto-set-date-time-from-linux-command-prompt/
Add Comment
Please, Sign In to add comment