In this tutorial, we will learn how to configure NTP Client on Solaris 11 operating system.
While time passes by, the computer’s internal clocks tend to drift which can lead to inconsistent time issues, especially on servers and client’s logs files or if you want to replicate servers’ resources or databases. The Network Time Protocol (NTP) is a protocol used to synchronize the clocks of computers over a network. NTP uses a hierarchical architecture of time sources, which can be either local or external.
Table of Contents
Steps Involved in Configuration of NTP on Solaris 11:
- Create ntp.conf file
- Make changes to ntp.conf file
- Enable ntp servcie
- Test server connectivity
- Check time synchronization
Step 1: Become an administrator
Become an administrator or login as a user having Administrative rights.
$ sudo su
OR
$ su -
Step 2: Create ntp.conf file [If not present]
If ntp.clinet file is not present then copy the ntp.client file to use as a template for the ntp.conf file.
# cd /etc/inet
# cp ntp.client ntp.conf
Otherwise take backup of existing ntp.clinet file (Not necessary but recommended)
# cd /etc/inet
# cp -p ntp.conf ntp.conf_bkp
Step 3: Edit the ntp.conf file.
Open the ntp.conf file and make changes as below
# cd /etc/inet
# pfedit ntp.conf
NOTE: It is recommended to use pfedit to edit the ntp.conf file.
Step 4: Enable ntp client service
Enable ntp client service (ntpd daemon) and verify it is working
Open the ntp.conf file and make changes as below
# svcadm enable ntp
# svcs | grep ntp
Step 5: Check ntp server connection
Check if ntp server added in ntp.conf file is reachable or not by running below command
# ntpdate -qd server 0.in.pool.ntp.org
You will get output similar to below –
Step 6: Check time
Now its time to check the date and time
As you can see above time has now been synchronized with ntp server. Enjoy.
You may read the official Oracle Doc to know more.
Reference Links:-
- https://docs.oracle.com/cd/E37838_01/html/E61003/time-4.html
- https://docs.oracle.com/cd/E37838_01/html/E61003/time-2.html
- https://docs.oracle.com/cd/E26502_01/html/E28996/time-20.html