Understand, Learn and Implement.. LINUX / UNIX DEVOPS CONTAINERS OPENSHIFT KUBERNETES DEVOPS TOOLS VIRTUALIZATION STORAGE BACKUP SCRIPTS MONITORING MIDDLEWARE

Showing posts with label ntp centos. Show all posts
Showing posts with label ntp centos. Show all posts

Tuesday, November 11, 2014

NTP Server and Client Configuration Linux

9:46 PM Posted by vinod , No comments
Configure NTP server for time adjustment. NTP uses 123/UDP.
Firstly, you need to raise a request with the Network Team to open the 123/UDP port fot NTP.Once it is opened then check with the below command to confirm the same.

Server Ip address : 192.168.248.128

Server Configuration:
[root@linunix ~]$ nc -z -u x.x.x.x  123
Connection to x.x.x.x 123 port [udp/ntp] succeeded!

root@linunix:~# yum -y install ntp
root@linunix# vi /etc/ntp.conf

 Comment out the below lines
#server  0.rhel.pool.ntp.org
#server  1.rhel.pool.ntp.org

#server  2.rhel.pool.ntp.org
# change servers for time  synchronization
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2..pool.ntp.org

Add the network range you allow to receive requests or you can comment it out if you dont want to mention


#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
root@linunix# /etc/init.d/ntp restart
 * Stopping NTP server ntpd      [ OK ]
 * Starting NTP server ntpd      [ OK ]

root@linunix# chkconfig ntpd on


root@linunix# ntpq -p 

     remote refid st t when poll reach delay offset jitter
==============================================================================
 ntp1.jst.mfeed. 133.243.236.17   2 u    3   64    1   20.052    2.622   0.000
 ntp2.jst.mfeed. 210.173.160.86   2 u    2   64    1   19.616    2.274   0.000
 ntp3.jst.mfeed. 210.173.160.56   2 u    1   64    1   18.126    1.942   0.000
 europium.canoni .INIT.               16 u    -   64    0    0.000    0.000   0.000

CLIENT CONFIGURATION

root@client# yum install ntp -y
root@client# vi /etc/ntp.conf
Comment out the below lines and add the server ip address as below and save the file.
#server  0.rhel.pool.ntp.org #server  1.rhel.pool.ntp.org
#server  2.rhel.pool.ntp.org
server  192.168.248.128
root@client# service ntpd stop
root@client# ntpdate 192.168.248.128
root@client# service ntpd start
root@client# chkconfig ntpd on
root@client# ntpq -p
Now the time will be syncing fine without any issues.

Wednesday, September 10, 2014

NTP Server Configuration - LINUX

2:32 AM Posted by vinod , No comments
NTP Server configuration  :
This service is responsible for maintaining the system time, which is highly important in any environment because so many things rely on time (logs, error messages, applications, and so on).
Step1: Install the ntp package:
Step2:Edit the configuration file /etc/ntp.conf :  
1. Add the network range you allow to receive requests
restrict 10.0.0.0 mask 255.255.255.0 nomodify  notrap
2. Add the server as shown below
Server ntp1.jst.mffed.ad.jp
Server ntp2.jst.mffed.ad.jp      
Server ntp3. jst.mffed.ad.jp 
(In RHEL6, the local server and fudge options are both commented out by default.)
Step3 : Start the ntpd service
Start the ntpd service and configure on boot with the chkconfig as shown below.
And finally check the result by executing the below command.
Finally, you chec the date command to check the settings of the date on your server.
FOr more information, you can check the Red Hat Website for the NTP NTP - Detail Explanation