LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 04-21-2018, 10:50 AM   #1
linuxuser7
Member
 
Registered: Apr 2018
Location: Ohio, USA
Distribution: openSUSE Tumbleweed, Ubuntu 18.04, Scientific Linux 7.5
Posts: 72

Rep: Reputation: Disabled
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.
 
Old 04-21-2018, 11:14 AM   #2
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by linuxuser7 View Post
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.

https://www.cyberciti.biz/faq/instal...os-redhat-7-x/
 
1 members found this post helpful.
Old 04-21-2018, 11:37 AM   #3
linuxuser7
Member
 
Registered: Apr 2018
Location: Ohio, USA
Distribution: openSUSE Tumbleweed, Ubuntu 18.04, Scientific Linux 7.5
Posts: 72

Original Poster
Rep: Reputation: Disabled
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.
 
Old 04-21-2018, 11:48 AM   #4
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by linuxuser7 View Post
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.

So, you can do it manually as well if you want...

Last edited by jsbjsb001; 04-21-2018 at 11:49 AM.
 
1 members found this post helpful.
Old 04-22-2018, 07:04 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
As above, there's at least couple of ways:

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.

NB: If you do add extra repos, definitely install https://access.redhat.com/discussions/1348623 first. This https://wiki.centos.org/PackageManag...8ae9202b66d6da explains it as well.
Otherwise you risk borking your system...

Last edited by chrism01; 04-22-2018 at 07:08 PM.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: ADD Swap Space on Linux Servers (CentOS / RHEL / Fedora / Ubuntu) On the Fly LXer Syndicated Linux News 0 05-27-2013 12:40 AM
[SOLVED] add ubuntu 12.04 repositories to ubuntu 10.04 bonedragon Linux - Newbie 7 08-17-2012 12:15 AM
How to add user define services in RHEL 5 kalyanv Linux - Software 1 08-30-2008 12:55 PM
Ubuntu repositories and how to add them, izquierdista Ubuntu 2 07-09-2007 02:00 PM
Cant add repositories after ubuntu upgrade? meniscus Linux - Newbie 4 07-06-2007 08:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 03:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration