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
[root@wachid ~]#
[root@wachid ~]# ls /etc/yum.repos.d/
epel.repo  epel-testing.repo  redhat.repo  rhel-source.repo
[root@wachid ~]#
[root@wachid ~]# vi /etc/yum.repos.d/centos.repo
[root@wachid ~]#
Insert the following text on centos.repo file
[root@wachid ~]# 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
[root@wachid ~]#
Check the repo list
[root@wachid ~]# 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
[root@wachid ~]#
Once you've completed this step, you can now use “yum” to install CentOS packages. 

Tidak ada komentar :

Posting Komentar