Sabtu, 22 September 2018

Enable the CentOS repository on RedHat 6.x, or Oracle Linux 6.4 or higher

  Tidak ada komentar
Some day i have to install some package on unregistered Redhat 6 Os, i need to use centos repositories in other i get the package that i need, i search the how to, and here i share my experience how to enable the CentOS repository on RedHat 6.x, or Oracle Linux 6.4 or higher

Create new centos repo file
[[email protected] ~]#
[[email protected] ~]# ls /etc/yum.repos.d/
epel.repo  epel-testing.repo  redhat.repo  rhel-source.repo
[[email protected] ~]#
[[email protected] ~]# vi /etc/yum.repos.d/centos.repo
[[email protected] ~]#
Insert the following text on centos.repo file
[[email protected] ~]# cat /etc/yum.repos.d/centos.repo
[centos]
name=CentOS $releasever - $basearch
baseurl=http://ftp.heanet.ie/pub/centos/6/os/$basearch/
enabled=1
gpgcheck=0
[[email protected] ~]#
Check the repo list
[[email protected] ~]# yum repolist
Loaded plugins: product-id
repo id                                     repo name                                                                           status
centos                                      CentOS 6Server - x86_64                                                              6,713
epel                                        Extra Packages for Enterprise Linux 6 - x86_64                                      12,520
repolist: 19,233
[[email protected] ~]#
Once you've completed this step, you can now use “yum” to install CentOS packages. 

Tidak ada komentar :

Posting Komentar