Search This Blog

Total Pageviews

Friday, 29 November 2024

How to install NTP ?


Failed to restart ntpd.service: Unit ntpd.service not found.


	Oracle Linux: How to Start NTP Service With Slewing Enabled (Doc ID 2422934.1)



 yum clean all && yum makecache
 history
 
  cat /etc/resolv.conf
# Generated by NetworkManager
#search lan
nameserver 127.0.0.1
search localdomain
nameserver 192.168.1.214
nameserver 9.9.9.9

 
 yum install ntp




{
echo OPTIONS=\"-x -u ntp:ntp -p /var/run/ntpd.pid\"
} > /etc/sysconfig/ntpd


==
{ echo OPTIONS=\"-x -u ntp:ntp -p /var/run/ntpd.pid\"; } > /etc/sysconfig/ntpd

systemctl restart ntpd.service

cat /etc/sysconfig/ntpd

cat /etc/ntp.conf

server 0.rhel.pool.ntp.org iburst
server 1.rhel.pool.ntp.org iburst
server 2.rhel.pool.ntp.org iburst
server 3.rhel.pool.ntp.org iburst

[root@ora-rac1 ~]#




systemctl restart ntpd.service

[root@ora-rac1 ~]# ps -ef|grep -i ntpd
ntp      14258     1  0 08:06 ?        00:00:00 /usr/sbin/ntpd -u ntp:ntp -x -u ntp:ntp -p /var/run/ntpd.pid
root     14292 12045  0 08:07 pts/1    00:00:00 grep --color=auto -i ntpd

[root@ora-rac1 ~]# netstat -pl | grep ntp
udp        0      0 ora-rac1:ntp            0.0.0.0:*                           14258/ntpd
udp        0      0 ora-rac1-priv.uk.co:ntp 0.0.0.0:*                           14258/ntpd
udp        0      0 ora-rac1.uk.com:ntp     0.0.0.0:*                           14258/ntpd
udp        0      0 localhost:ntp           0.0.0.0:*                           14258/ntpd
udp        0      0 0.0.0.0:ntp             0.0.0.0:*                           14258/ntpd
udp6       0      0 ora-rac1:ntp            [::]:*                              14258/ntpd
udp6       0      0 ora-rac1:ntp            [::]:*                              14258/ntpd
udp6       0      0 ora-rac1:ntp            [::]:*                              14258/ntpd
udp6       0      0 localhost:ntp           [::]:*                              14258/ntpd
udp6       0      0 ora-rac1:ntp            [::]:*                              14258/ntpd
udp6       0      0 [::]:ntp                [::]:*                              14258/ntpd

[root@ora-rac1 ~]# pstree -l -s -p -a 14258
systemd,1 --switched-root --system --deserialize 22
  └─ntpd,14258 -u ntp:ntp -x -u ntp:ntp -p /var/run/ntpd.pid

[root@ora-rac1 ~]# ps -P 14258
  PID PSR TTY      STAT   TIME COMMAND
14258   0 ?        Ss     0:00 /usr/sbin/ntpd -u ntp:ntp -x -u ntp:ntp -p /var/run/ntpd.pid
[root@ora-rac1 ~]#




=========

yum install ntp -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
base                                                                                                                                                                                   | 3.6 kB  00:00:00
extras                                                                                                                                                                                 | 2.9 kB  00:00:00
updates                                                                                                                                                                                | 2.9 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package ntp.x86_64 0:4.2.6p5-29.el7.centos.2 will be installed
--> Processing Dependency: libopts.so.25()(64bit) for package: ntp-4.2.6p5-29.el7.centos.2.x86_64
--> Running transaction check
---> Package autogen-libopts.x86_64 0:5.18-5.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================
 Package                                             Arch                                       Version                                                        Repository                                Size
==============================================================================================================================================================================================================
Installing:
 ntp                                                 x86_64                                     4.2.6p5-29.el7.centos.2                                        base                                     549 k
Installing for dependencies:
 autogen-libopts                                     x86_64                                     5.18-5.el7                                                     base                                      66 k

Transaction Summary
==============================================================================================================================================================================================================
Install  1 Package (+1 Dependent package)

Total download size: 615 k
Installed size: 1.5 M
Downloading packages:
No Presto metadata available for base
(1/2): autogen-libopts-5.18-5.el7.x86_64.rpm                                                                                                                                           |  66 kB  00:00:00
(2/2): ntp-4.2.6p5-29.el7.centos.2.x86_64.rpm                                                                                                                                          | 549 kB  00:00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                         2.2 MB/s | 615 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : autogen-libopts-5.18-5.el7.x86_64                                                                                                                                                          1/2
  Installing : ntp-4.2.6p5-29.el7.centos.2.x86_64                                                                                                                                                         2/2
warning: /etc/ntp.conf created as /etc/ntp.conf.rpmnew
warning: /etc/sysconfig/ntpd created as /etc/sysconfig/ntpd.rpmnew
  Verifying  : autogen-libopts-5.18-5.el7.x86_64                                                                                                                                                          1/2
  Verifying  : ntp-4.2.6p5-29.el7.centos.2.x86_64                                                                                                                                                         2/2

Installed:
  ntp.x86_64 0:4.2.6p5-29.el7.centos.2

Dependency Installed:
  autogen-libopts.x86_64 0:5.18-5.el7

Complete!
[root@ora-rac2 ~]#




Oracle DBA

anuj blog Archive