How do I set my PlantStar host clock automatically?

This article will describe how to set up NTP to synchronize your server time with an internet based time source.

Select the timezone you wish to configure the server to in /usr/share/zoneinfo/America and create a link to the correct timezone file from /etc/localtime

mv /etc/localtime /etc/localtime.back
ln -s /usr/share/zoneinfo/America/FILENAME /etc/localtime

 

From <https://www.hugeserver.com/kb/config-time-date-centos-6-ntp/>

At a command prompt type:

ntpdate pool.ntp.org

this will set the server to the current time for the timezone just configured

 

Edit /etc/ntpd.conf and modify the servers to the following:

# change servers for synchronization to your timezone

server 0.centos.pool.ntp.org

server 1.centos.pool.ntp.org

server 2.centos.pool.ntp.org

server 3.centos.pool.ntp.org

 

From <https://www.server-world.info/en/note?os=CentOS_6&p=ntp>

Start the ntpd daemon:

service ntpd start

 

Start NTP at boot time

chkconfig ntpd on

 

Verify that NTP is working

ntpstat

 

Check the date/time to ensure that it agrees

date