March 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
25262728293031

Categories

March 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
25262728293031

CentOS / RHEL 7 : Enable NTP to start at boot after fresh install (disable chrony)

Chrony is introduced as new NTP client to replace the ntp as the default time syncing package since RHEL7, so if you configure NTP during the installation process, it just enables the chronyd service, not ntpd service.

# systemclt status ntpd.service
ntpd.service – Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled)
Active: inactive (dead)
Even when you have enabled NTP to start on boot, it will not start when chrony is enabled. So to enable NTP to start on boot, we have to disable the chrony service
In case you want to use NTP only, then below is the procedure to do so :

Please follow steps below to enable NTP service on RHEL 7:
1. Disable chronyd service.
To stop chronyd, issue the following command as root:

# systemctl stop chronyd
To prevent chronyd from starting automatically at system start, issue the following command as root:

# systemctl disable chronyd
2. Install ntp using yum:

# yum install ntp
3. Then enable and start ntpd service:

# systemctl enable ntpd.service
# systemctl start ntpd.service
4. Reboot and verify.

# systemctl status ntpd.service
ntpd.service – Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled)
Active: active (running) since Fri 2015-01-09 16:14:00 EST; 53s ago
Process: 664 ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 700 (ntpd)
CGroup: /system.slice/ntpd.service
??700 /usr/sbin/ntpd -u ntp:ntp -g

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>