Symas OpenLDAP Knowledge Base

Timezone/Timesync

Set the TimeZone

The timezone defaults to Universal Coordinated Time (UCT, formerly known as Greenwich Mean Time). If you want to set it for your local time zone will need to know the timezone code for your location. There is a list in the /usr/share/zoneinfo directory.

vi /etc/localtime 

Install NTP

For RHEL, CentOS, Fedora, etc.

sudo yum install ntp ntpdate ntp-doc -y 

For Debian, Ubuntu

sudo apt install ntp ntpdate ntp-doc

Load (enable) NTP Service

        systemctl enable ntpd.service 

Set NTP Sync

        ntpdate pool.ntp.org 

Edit NTP Pool Servers

        vi /etc/ntp.conf 

And add the following:

        server 0.centos.pool.ntp.org iburst 
        server 1.centos.pool.ntp.org iburst 
        server 2.centos.pool.ntp.org iburst 
        server 3.centos.pool.ntp.org iburst 
        
        server 0.europe.pool.ntp.org 
        server 1.europe.pool.ntp.org 
    server 0.europe.pool.ntp.org 
    server 1.europe.pool.ntp.org 
    

Start Service

        systemctl enable ntpd.service