在CentOS 6.x或7.x上安装RepoForge Repo
RepoForge is the new RPMforge.
The RepoForge project maintains RPM packages for: * Red Hat Enterprise Linux (RHEL) * CentOS * Scientific Linux
$ cat /etc/issue
$ uname -a
$ yum install yum* //为了安装yum-config-manager
Import Repoforge GPG key
Next, import the Repoforge RPM repository's official GPG key. That way, you will be able to validate all the RPM packages from the
repository using the key.
$ sudo rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt //导入GPG key
After running the above command, verify that the key has been imported successfully with:
$ yum-config-manager rpmforge | grep gpgkey
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag //检查GPG key
Without importing the key in this step, you will see the following warning when you attempt to install a Repoforge RPM file later.
warning: /var/tmp/rpm-tmp.rHqPLd: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY //不导入GPG key会提示这样的错误信息
CentOS 6.x
32位
sudo rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm
64位
sudo rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
CentOS 7.x
64位
sudo rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
Verify Repoforge Repository Status
Once Repoforge is installed on your system, you can verify its status by running:
$ yum repolist //确认Repoforge Repository状态
0 packages excluded due to repository protections
repo id repo name status
base CentOS-6 - Base 6518
epel Extra Packages for Enterprise Linux 6 - x86_64 11365
extras CentOS-6 - Extras 37
rpmforge RHEL 6 - RPMforge.net - dag 4718
updates CentOS-6 - Updates 946
repolist: 23584
In general, it is not a good idea to keep Repoforge enabled as it could potentially cause conflicts with other third-party packages such as EPEL
$ sudo yum-config-manager --disable rpmforge //禁用Repoforge Repository
If successful, the subsequent output should display "enabled=0".
sudo yum-config-manager --enable rpmforge //启用Repoforge Repository
If successful, the subsequent output should display "enabled=1".
Now if you want to install any package from Repoforge repository, use the following command.
$ sudo yum --enablerepo=rpmforge install [package-name] //或者只安装指定包
完成