- Add Repositories
- Add an User
Add some useful external repositories to install useful softwares.
Mục Lục
[1] Install a plugin to add priorities to each installed repositories.
[root@locahost ~]# yum -y install yum-plugin-priorities
# set [priority=1] to official repository
[root@localhost ~]# 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@locahost ~]# yum -y install epel-release
# set [priority=5]
[root@locahost ~]# 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@locahost ~]# 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@locahost ~]# yum --enablerepo=epel install [Package]
[3] Add CentOS SCLo Software collections Repository.
[root@localhost ~]# yum -y install centos-release-scl-rh centos-release-scl
# set [priority=10]
[root@localhost ~]# sed -i -e "s/\]$/\]\npriority=10/g" /etc/yum.repos.d/CentOS-SCLo-scl.repo
[root@localhost ~]# sed -i -e "s/\]$/\]\npriority=10/g" /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo
# for another way, change to [enabled=0] and use it only when needed
[root@localhost ~]# sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/CentOS-SCLo-scl.repo
[root@localhost ~]# sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo
# if [enabled=0], input a command to use the repository
[root@localhost ~]# yum --enablerepo=centos-sclo-rh install [Package]
[root@localhost ~]# yum --enablerepo=centos-sclo-sclo install [Package]
[4] Add Remi’s RPM Repository which provides many useful packages.
[root@localhost ~]# yum -y install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
# set [priority=10]
[root@localhost ~]# sed -i -e "s/\]$/\]\npriority=10/g" /etc/yum.repos.d/remi-safe.repo
# for another way, change to [enabled=0] and use it only when needed
[root@localhost ~]# sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/remi-safe.repo
# if [enabled=0], input a command to use the repository
[root@localhost ~]# yum --enablerepo=remi-safe install [Package]