To set up the local time server by configuring the NTP 
NTP is used to make the system and an accurate time source to maintain time synchronization protocol. In Linux, we can use the built-in NTP (Network Time Protocol) protocol through the network to make their own system of keeping accurate time.

Installation

# Yum install NTP

From the installation disc or search for NTP RPM package is installed

When you have only a link of network server, add

# crontab -e

Add a line:

*/15 * * * * ntpdate 210.72.145.44

210.72.145.44 China National Center for a time server address, so that the machine can be synchronized with the national time service center.

To set up local time server, only need to modify the /etc/ntp.conf file in a simple configuration can be, the following is my add configuration:

#add by Fengshihua

Server 210.72.145.44 prefer ( China National time service center server address prefer priority attention to the default server to change into it)

Server 218.21.130.42 ( cn.pool.ntp.org IP )

Restrict 192.168.100.0 mask 255.255.255.0 nomodify ( allow intranet communication )

Restrict 0.0.0.0 mask 0.0.0.0 nomodify notrap noquery notrust ( shielded other IP update time )

The default does not keep other.

In order to make the NTP service can be started automatically at system boot time, execution:

# chkconfig ntpd on

Startup / shutdown / restart the NTP command is:

# /etc/init.d/ntpd start

# /etc/init.d/ntpd stop

# /etc/init.d/ntpd restart

The synchronization time wrote CMOS.

VI /etc/sysconfig/ntpd

SYNC_HWCLOCK=yes

Need to restart the service to remember each configuration validation modify the configuration file. You can use the following command to check the NTP service is started, you should be able to get a process ID:

# pgrep ntpd

Command to check the time server synchronization state using the following:

# ntpq -p

With ntpstat you can also see some synchronization status, view port using netstat -ntlup usage!

Installed the client need 5-10 minutes to update time from the server!

Client settings:

# crontab -e

Add a line:

*/15 * * * * ntpdate server IP.

One day you use the flash digital magazine maker, you will always think the time is limited, because once you try, you cannot stop your thoughts of design digital books. Moreover, the progressed publish feature makes the software becomes a page flip publisher that allows you upload your flipping book to web.

 




Leave a Reply.