RPMForge is now RepoForge. And in this tutorial, I will show you how to install and enable RepoForge on CentOS 7 x86_64 platform.
First make sure you are using CentOS 7. Check your version with this command:
[[email protected] ~]$ cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core)
Import Dag’s GPG key
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
Download the RPM package
Verify the integrity of the package you downloaded.
rpm -Kv rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: OK Header SHA1 digest: OK (e5714445d5ef3919d2c608192b23b22bff1883ec) MD5 digest: OK (aed55512ff31c562e48bdd7c5d9f0060) V3 DSA/SHA1 Signature, key ID 6b8d79e6: OK
Then install it with RPM
sudo rpm -ivh rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
Now update your repositories and install something like the MySQL monitoring tool mtop:
sudo yum update && sudo yum install mtop
There are 4 subrepositories in RepoForge
- rf: RepoForge. This repo is enabled by default. It does not replace CentOS base packages.
- rfx: RepoForge-extras. This repo is disabled by default, because its packages replace CentOS base packages.
- rft: RepoForge-testing. This repo is disabled by default.
- rfb: RepoForge-buildtools
How to Disable RepoForge
If your CentOS has enabled other third-party repositories such as EPEL, REMI, webtatic, then these third-party repos might conflict with each other, so a better way to use these repos is to disable it by default and only enable it when installing packages from these repos.
To disable RepoForge, open up /etc/yum.repo.d/rpmforge.repo file
sudo nano /etc/yum.repos.d/rpmforge.repo
Find this line
enabled = 1
1 means it’s enabled. Now change it to this.
enabled = 0
0 means it’s disabled. Save and close the file.
Now if you want to install software packages that are only included in RepoForge repository such as mtop, use this command.
sudo yum --enablerepo=rpmforge install mtop
It will temporarily enable the repository and install mtop. After installation is complete, it’s disabled again.
How can I tell Which Repository a Package is Installed From?
You can use yum info command.
yum info mtop
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base : ftp.osuosl.org * epel : mirrors.kernel.org * extras : pubmirrors.dal.corespace.com * updates : centos-distro.cavecreek.net Installed Packages Name : mtop Arch : noarch Version : 0.6.6 Release : 1.2.el7.rf Size : 135 k Repo : installed From repo : rpmforge Summary : Tool to monitor a MySQL database URL : http://mtop.sourceforge.net/ License : GPL Description : mtop (MySQL top) monitors a MySQL database showing the queries : which are taking the most amount of time to complete. Features : include 'zooming' in on a process to show the complete query : and 'explaining' the query optimizer information.