Linux.com

Home Linux Community Forums Software Installation Install 3rd party repository manually..

Install 3rd party repository manually..

Link to this post 17 May 09

Let us say you would like to install 3rd party repository from foo.nixcraft.com.

Create a file called foo:

# cd /etc/yum.repos.d
# vi foo

Append following code:

[foo]
name=Foo for RHEL/ CentOS $releasever - $basearch
baseurl=http://foo.nixcraft.com/centos/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://foo.nixcraft.com/RPM-GPG-KEY.txt

Save and close the file.

Where,

* [foo] : Repository name i.e. The [main] section must exist for yum to do anything.
* name=Foo for RHEL/ CentOS $releasever - $basearch : A human readable string describing the repository name
* baseurl=http://foo.nixcraft.com/centos/$releasever/$basearch/ : Must be a URL to the directory where the yum repository’s ‘repodata’ directory lives
* enabled=1 : Enabled or disabled repo. To disable the repository temporarily, set the enabled to 0
* gpgcheck=1 : Security feature, use GPG key
* gpgkey=http://foo.nixcraft.com/RPM-GPG-KEY.txt : GPL file location

Also you need to import the gpg key for the repository as follows:

# rpm --import http://foo.nixcraft.com/RPM-GPG-KEY.txt

Now you are ready to install software from foo repository.

For further information refer to yum.conf man page:

# man yum.conf
# man yum

Hope this tip will help you to configure repository as and when required.

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board