Configuring additional repositories

Whether you create your own mirror repository or organizations provide software for you in repositories, setting up additional repositories on your RHEL system is quite simple. This recipe will show you how to set them up. Many repositories have their own repo files or even an RPM that automatically installs the repository. When these are available, don't hesitate to use them!

Getting ready

For this to work, you will need to have a repository set up, which can be accessed through the following URL: http://repo.example.com/myrepo/7/x86_64.

How to do it…

In order to create an additional repository, create a file in /etc/yum.repos.d called myrepo.repo, which contains the following information:

[myrepo]
name=My Personal Repository
baseurl=http://repo.example.com/myrepo/$releasever/$basearch
gpgcheck=0
enabled=1

There's more…

The gpgcheck=1 option only functions if you or the provider of a repo has signed all the RPMs in the repo. This is generally a good practice and provides extra security to your repositories.

The $releasever and $basearch variables allow you to create a single repository file that can work on multiple systems as long as you have a repository for the URLs. The $releasever variable expands to the major version of the OS (7 in our case), and the $basearch will expands to x86_64. On an i386 system (RHEL 7 only comes in the x86_64 architecture), $basearch expands to i386.

You can find many repositories on the Internet, such as epel and elrepo, but it may not always be a good idea to use them. Any software provided by the Red Hat standard repositories are also supported by Red Hat, and they will no longer support you if you start using the same software provided through another repository. So, you better ensure that you don't care about support or have another party that is willing to support you.

See also

Although I do not condone the use of these in production without taking the appropriate support actions, here is a list of some popular repositories that you can use:

The ELRepo repository can be found at:

http://elrepo.org/tiki/tiki-index.php

The EPEL repository is at:

https://fedoraproject.org/wiki/EPEL

The Puppetlabs repositories can be found at:

https://docs.puppetlabs.com/guides/puppetlabs_package_repositories.html

The Zabbix repositories are at the following link:

https://www.zabbix.com/documentation/2.0/manual/installation/install_from_packages

For the RepoForge repositories, refer to the following website:

http://repoforge.org/use/

Remi's repositories can be found at:

http://rpms.famillecollet.com/

The Webtatic repositories are at:

https://webtatic.com/projects/yum-repository/

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset