CentOS install and configure NTP to synchronize the system clock

Type the following command to install ntp:

[root@myServer ~] # yum install ntp

Turn on the service

[root@myServer ~] # chkconfig ntpd on

Synchronize the system clock with pool.ntp.org server:

[root@myServer ~] # ntpdate pool.ntp.org

Start the ntp:

[root@myServer ~] # /etc/init.d/ntpd start

Check the time:

[root@myServer ~] # date

Check if the bios clock matches the system clock:

[root@myServer ~] # hwclock

Set the bios clock to match the system clock

[root@myServer ~] #hwclock --systohc

Set the ntp time servers in the file /etc/ntp.conf (the ntp servers will begin with: server)

Leave a Reply

Your email address will not be published. Required fields are marked *