How To Install linuxptp on CentOS 8

linuxptp is PTP implementation for Linux

Introduction

In this tutorial we learn how to install linuxptp on CentOS 8.

What is linuxptp

This software is an implementation of the Precision Time Protocol (PTP) according to IEEE standard 1588 for Linux. The dual design goals are to provide a robust implementation of the standard and to use the most relevant and modern Application Programming Interfaces (API) offered by the Linux kernel. Supporting legacy APIs and other platforms is not a goal.

We can use yum or dnf to install linuxptp on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install linuxptp.

Install linuxptp on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install linuxptp using dnf by running the following command:

sudo dnf -y install linuxptp

Install linuxptp on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install linuxptp using yum by running the following command:

sudo yum -y install linuxptp

How To Uninstall linuxptp on CentOS 8

To uninstall only the linuxptp package we can use the following command:

sudo dnf remove linuxptp

linuxptp Package Contents on CentOS 8

/etc/ptp4l.conf
/etc/sysconfig/phc2sys
/etc/sysconfig/ptp4l
/etc/timemaster.conf
/usr/lib/.build-id
/usr/lib/.build-id/16
/usr/lib/.build-id/16/dcfd6d4d4fae2dbe58931556e543c84a264a04
/usr/lib/.build-id/1a
/usr/lib/.build-id/1a/2aa210b6b41fcd7c612e5db0a05cccb2f8901b
/usr/lib/.build-id/24
/usr/lib/.build-id/24/1a66e5dbd3d09af0c97b0186ef7ffaaebad22d
/usr/lib/.build-id/37
/usr/lib/.build-id/37/4ba3276bb2f9e3cacd228fcab4e8d556464312
/usr/lib/.build-id/b4
/usr/lib/.build-id/b4/6ee08ee902c73aaa3d853616e6a530f0654f03
/usr/lib/.build-id/d4
/usr/lib/.build-id/d4/3b7dfdfd1a79ff22d148acee1428d2f00abcf3
/usr/lib/.build-id/dd
/usr/lib/.build-id/dd/84da29dade01b7a1e5cb2831e3e947ccbf16bb
/usr/lib/systemd/system/phc2sys.service
/usr/lib/systemd/system/ptp4l.service
/usr/lib/systemd/system/timemaster.service
/usr/sbin/hwstamp_ctl
/usr/sbin/nsm
/usr/sbin/phc2sys
/usr/sbin/phc_ctl
/usr/sbin/pmc
/usr/sbin/ptp4l
/usr/sbin/timemaster
/usr/share/doc/linuxptp
/usr/share/doc/linuxptp/COPYING
/usr/share/doc/linuxptp/README.org
/usr/share/doc/linuxptp/configs
/usr/share/doc/linuxptp/configs/E2E-TC.cfg
/usr/share/doc/linuxptp/configs/G.8265.1.cfg
/usr/share/doc/linuxptp/configs/G.8275.1.cfg
/usr/share/doc/linuxptp/configs/G.8275.2.cfg
/usr/share/doc/linuxptp/configs/P2P-TC.cfg
/usr/share/doc/linuxptp/configs/UNICAST-MASTER.cfg
/usr/share/doc/linuxptp/configs/UNICAST-SLAVE.cfg
/usr/share/doc/linuxptp/configs/default.cfg
/usr/share/doc/linuxptp/configs/gPTP.cfg
/usr/share/man/man5/ptp4l.conf.5.gz
/usr/share/man/man5/timemaster.conf.5.gz
/usr/share/man/man8/hwstamp_ctl.8.gz
/usr/share/man/man8/phc2sys.8.gz
/usr/share/man/man8/phc_ctl.8.gz
/usr/share/man/man8/pmc.8.gz
/usr/share/man/man8/ptp4l.8.gz
/usr/share/man/man8/timemaster.8.gz
/etc/ptp4l.conf
/etc/sysconfig/phc2sys
/etc/sysconfig/ptp4l
/etc/timemaster.conf
/usr/lib/.build-id
/usr/lib/.build-id/3c
/usr/lib/.build-id/3c/0888409a4e4984e8339b6e255e67c44d9b5b29
/usr/lib/.build-id/5a
/usr/lib/.build-id/5a/cbd808315665640f0caf8b12816ff92de688ee
/usr/lib/.build-id/6c
/usr/lib/.build-id/6c/4899a54b69e450b63c9ab592da6192a71fd0ff
/usr/lib/.build-id/71
/usr/lib/.build-id/71/52b10fc9dc50bff1d71f18c96b29fe4b73d29e
/usr/lib/.build-id/8a
/usr/lib/.build-id/8a/2bde3a634653b9b029325c2f9e78651dc158e7
/usr/lib/.build-id/e1
/usr/lib/.build-id/e1/54d186079f514c67d4978176545a33bec4e2cf
/usr/lib/.build-id/f0
/usr/lib/.build-id/f0/763561aa52ecb0dd9fb0c0b1869d0e505f68e7
/usr/lib/systemd/system/phc2sys.service
/usr/lib/systemd/system/ptp4l.service
/usr/lib/systemd/system/timemaster.service
/usr/sbin/hwstamp_ctl
/usr/sbin/nsm
/usr/sbin/phc2sys
/usr/sbin/phc_ctl
/usr/sbin/pmc
/usr/sbin/ptp4l
/usr/sbin/timemaster
/usr/share/doc/linuxptp
/usr/share/doc/linuxptp/COPYING
/usr/share/doc/linuxptp/README.org
/usr/share/doc/linuxptp/configs
/usr/share/doc/linuxptp/configs/E2E-TC.cfg
/usr/share/doc/linuxptp/configs/G.8265.1.cfg
/usr/share/doc/linuxptp/configs/G.8275.1.cfg
/usr/share/doc/linuxptp/configs/G.8275.2.cfg
/usr/share/doc/linuxptp/configs/P2P-TC.cfg
/usr/share/doc/linuxptp/configs/UNICAST-MASTER.cfg
/usr/share/doc/linuxptp/configs/UNICAST-SLAVE.cfg
/usr/share/doc/linuxptp/configs/default.cfg
/usr/share/doc/linuxptp/configs/gPTP.cfg
/usr/share/man/man5/ptp4l.conf.5.gz
/usr/share/man/man5/timemaster.conf.5.gz
/usr/share/man/man8/hwstamp_ctl.8.gz
/usr/share/man/man8/phc2sys.8.gz
/usr/share/man/man8/phc_ctl.8.gz
/usr/share/man/man8/pmc.8.gz
/usr/share/man/man8/ptp4l.8.gz
/usr/share/man/man8/timemaster.8.gz

References

Summary

In this tutorial we learn how to install linuxptp on CentOS 8 using yum and dnf.