Former Ubuntu user wants to know how to add repositories in RHEL 7.4?
Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: openSUSE Tumbleweed, Ubuntu 18.04, Scientific Linux 7.5
Posts: 72
Rep:
Former Ubuntu user wants to know how to add repositories in RHEL 7.4?
I am using Scientific Linux 7.4 which is a repackaged Red Hat Enterprise Linux with a scientific bent. Coming from Ubuntu, I am new to the Red Hat branch of Linux. I have a really simple and stupid question: How do I add repositories on RHEL.
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Quote:
Originally Posted by linuxuser7
I am using Scientific Linux 7.4 which is a repackaged Red Hat Enterprise Linux with a scientific bent. Coming from Ubuntu, I am new to the Red Hat branch of Linux. I have a really simple and stupid question: How do I add repositories on RHEL.
A quick Google search yielded this, that mentions (as I was suspecting) "yum", therefore Scientific Linux appears to use yum as it's "frontend" for the "rpm" package manager. It also appears that, you may be able to use "Enterprise Linux software repositories", as well as the one's for Scientific Linux itself.
The following link will tell you how to add extra software repo's. I know it does not mention Scientific Linux (AFAICS), but given the above, it should be the same procedure.
Distribution: openSUSE Tumbleweed, Ubuntu 18.04, Scientific Linux 7.5
Posts: 72
Original Poster
Rep:
Thank you for the links. Yes, Scientific Linux really is just RHEL. I am familiar with installing packages with yum, but not adding repositories. I've added them only by copying and pasting code without really understanding the syntax or what I was doing.
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Quote:
Originally Posted by linuxuser7
Thank you for the links. Yes, Scientific Linux really is just RHEL. I am familiar with installing packages with yum, but not adding repositories. I've added them only by copying and pasting code without really understanding the syntax or what I was doing.
That's ok! There's at least a couple of ways you can add extra repo's - like most things in Linux. If you have a look in /etc/yum.repos.d/ you'll see a load of .repo files, these files define your configured software repo's. Here is one just plucked from the same place:
Quote:
### Name: ELRepo.org Community Enterprise Linux Repository for el7
### URL: http://elrepo.org/
[elrepo]
name=ELRepo.org Community Enterprise Linux Repository - el7
baseurl=http://elrepo.org/linux/elrepo/el7/$basearch/
http://mirrors.coreix.net/elrepo/elrepo/el7/$basearch/
http://mirror.rackspace.com/elrepo/elrepo/el7/$basearch/
http://repos.lax-noc.com/elrepo/elrepo/el7/$basearch/
http://mirror.ventraip.net.au/elrepo/elrepo/el7/$basearch/
mirrorlist=http://mirrors.elrepo.org/mirrors-elrepo.el7
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org
protect=0
...
There's more in that file, but to save space in the post, I chopped the last part of it off. But you can see the basic syntax - it's the same syntax for all .repo files.
1. just edit a new repofile as above (read up on the options)
2. in many cases, eg EPEL, they supply an rpm for you to install manually (usually d/l first) and that will create the repo file(s) for you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.