How To Install etckeeper on CentOS 8
Introduction
In this tutorial we learn how to install etckeeper
on CentOS 8.
What is etckeeper
The etckeeper program is a tool to let /etc be stored in a git, mercurial, bzr or darcs repository. It hooks into yum to automatically commit changes made to /etc during package upgrades. It tracks file metadata that version control systems do not normally support, but that is important for /etc, such as the permissions of /etc/shadow. It’s quite modular and configurable, while also being simple to use if you understand the basics of working with version control. The default backend is git, if want to use a another backend please install the appropriate tool (mercurial, darcs or bzr). To start using the package please read /usr/share/doc/etckeeper/README.
We can use yum
or dnf
to install etckeeper
on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install etckeeper.
Install etckeeper 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 etckeeper
using dnf
by running the following command:
sudo dnf -y install etckeeper
Install etckeeper 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 etckeeper
using yum
by running the following command:
sudo yum -y install etckeeper
How To Uninstall etckeeper on CentOS 8
To uninstall only the etckeeper
package we can use the following command:
sudo dnf remove etckeeper
etckeeper Package Contents on CentOS 8
/etc/cron.daily/etckeeper
/etc/etckeeper
/etc/etckeeper/commit.d
/etc/etckeeper/commit.d/10vcs-test
/etc/etckeeper/commit.d/20store-metadata
/etc/etckeeper/commit.d/30bzr-add
/etc/etckeeper/commit.d/30darcs-add
/etc/etckeeper/commit.d/30git-add
/etc/etckeeper/commit.d/30hg-addremove
/etc/etckeeper/commit.d/50vcs-commit
/etc/etckeeper/commit.d/99push
/etc/etckeeper/commit.d/README
/etc/etckeeper/daily
/etc/etckeeper/etckeeper.conf
/etc/etckeeper/init.d
/etc/etckeeper/init.d/10restore-metadata
/etc/etckeeper/init.d/20restore-etckeeper
/etc/etckeeper/init.d/40vcs-init
/etc/etckeeper/init.d/50vcs-ignore
/etc/etckeeper/init.d/50vcs-perm
/etc/etckeeper/init.d/50vcs-pre-commit-hook
/etc/etckeeper/init.d/60darcs-deleted-symlinks
/etc/etckeeper/init.d/70vcs-add
/etc/etckeeper/init.d/README
/etc/etckeeper/list-installed.d
/etc/etckeeper/list-installed.d/50list-installed
/etc/etckeeper/post-install.d
/etc/etckeeper/post-install.d/50vcs-commit
/etc/etckeeper/post-install.d/README
/etc/etckeeper/pre-commit.d
/etc/etckeeper/pre-commit.d/20warn-problem-files
/etc/etckeeper/pre-commit.d/30store-metadata
/etc/etckeeper/pre-commit.d/README
/etc/etckeeper/pre-install.d
/etc/etckeeper/pre-install.d/10packagelist
/etc/etckeeper/pre-install.d/50uncommitted-changes
/etc/etckeeper/pre-install.d/README
/etc/etckeeper/unclean.d
/etc/etckeeper/unclean.d/50test
/etc/etckeeper/unclean.d/README
/etc/etckeeper/uninit.d
/etc/etckeeper/uninit.d/01prompt
/etc/etckeeper/uninit.d/50remove-metadata
/etc/etckeeper/uninit.d/50vcs-uninit
/etc/etckeeper/uninit.d/README
/etc/etckeeper/update-ignore.d
/etc/etckeeper/update-ignore.d/01update-ignore
/etc/etckeeper/update-ignore.d/README
/etc/etckeeper/vcs.d
/etc/etckeeper/vcs.d/50vcs-cmd
/usr/bin/etckeeper
/usr/lib/systemd/system/etckeeper.service
/usr/lib/systemd/system/etckeeper.timer
/usr/share/bash-completion
/usr/share/bash-completion/completions
/usr/share/bash-completion/completions/etckeeper
/usr/share/doc/etckeeper
/usr/share/doc/etckeeper/README.fedora
/usr/share/doc/etckeeper/README.html
/usr/share/licenses/etckeeper
/usr/share/licenses/etckeeper/GPL
/usr/share/man/man8/etckeeper.8.gz
/usr/share/zsh
/usr/share/zsh/vendor-completions
/usr/share/zsh/vendor-completions/_etckeeper
/var/cache/etckeeper
References
Summary
In this tutorial we learn how to install etckeeper
on CentOS 8 using yum and dnf.