Total de visualizações de página

domingo, 1 de maio de 2016

Add Repositories


Add Repositories
2014/12/22
 
Add some useful external repositories to install useful softwares.
[1]Install a plugin to add priorities to each installed repositories.
[root@dlp ~]# 
yum -y install yum-plugin-priorities
# set [priority=1] to official repository

[root@dlp ~]# 
sed -i -e "s/\]$/\]\npriority=1/g" /etc/yum.repos.d/CentOS-Base.repo
[2]Add EPEL Repository which is provided from Fedora project.
[root@dlp ~]# 
yum -y install epel-release
# set [priority=5]

[root@dlp ~]# 
sed -i -e "s/\]$/\]\npriority=5/g" /etc/yum.repos.d/epel.repo
# for another way, change to [enabled=0] and use it only when needed

[root@dlp ~]# 
sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/epel.repo
# if [enabled=0], input a command to use the repository

[root@dlp ~]# 
yum --enablerepo=epel install [Package]
[3]Add RPMforge Repository which provides many useful packages.
[root@dlp ~]# 
yum -y install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
# set [priority=10]

[root@dlp ~]# 
sed -i -e "s/\]$/\]\npriority=10/g" /etc/yum.repos.d/rpmforge.repo
# for another way, change to [enabled=0] and use it only when needed

[root@dlp ~]# 
sed -i -e "s/enabled = 1/enabled = 0/g" /etc/yum.repos.d/rpmforge.repo
# if [enabled=0], input a command to use the repository

[root@dlp ~]# 
yum --enablerepo=rpmforge install [Package]

Nenhum comentário:

Postar um comentário