LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 08-18-2015, 05:36 PM   #1
SigelTown
LQ Newbie
 
Registered: Aug 2015
Posts: 15

Rep: Reputation: 1
Switching Between RHEL Reposync and Local Repos


I have a RHEL 6.7 server setup as a reposync server pulling down updates from RedHat making local repositories. Mainly for repos such as rhel-6-server-rpms, rhel-6-server-eus-epms, rhel-6-server-optional-rpms and so on. I use these local repos to test to make sure all looks good then continue on to patch/update my remaining RHEL clients I have. Life is good...

But when it comes around to patching the reposync server itself, how do I gracefully change the configuration to use the local repos for a “yum update –y” and not the repos setup for downloading the rpms from Redhat? I want to use the same local repos as I do for the other RHEL clients so everyone is patched the same. Besides the obvious proxy issues, do I use “yum-config-manager” to disable the repos then add my local repos info in a repo file in /etc/yum.repos.d/?

The basic question how do I properly toggle my RHEL download or reposync server between patching with local repositories vs downloading or reposyncing new rpms from Redhat?
 
Old 08-19-2015, 08:23 PM   #2
catdad6
LQ Newbie
 
Registered: Aug 2009
Posts: 1

Rep: Reputation: 0
you could have your alternate in /etc/yum.repos.d you disable it in by default. then when you are ready to patch you use yum --disablerepo=* --enablerepo=some_repo_you_want_to_use

some variation of that should work for you
 
Old 08-19-2015, 09:18 PM   #3
JockVSJock
Senior Member
 
Registered: Jan 2004
Location: DC
Distribution: RHEL/CentOS
Posts: 1,386
Blog Entries: 4

Rep: Reputation: 164Reputation: 164
Quote:
Originally Posted by SigelTown View Post

The basic question how do I properly toggle my RHEL download or reposync server between patching with local repositories vs downloading or reposyncing new rpms from Redhat?
I believe I have seen others copy/move the .repo files out of /etc/yum.repo.d to say /home/user/repos that way yum will pick up on the files listed here.
 
Old 08-19-2015, 09:36 PM   #4
SigelTown
LQ Newbie
 
Registered: Aug 2015
Posts: 15

Original Poster
Rep: Reputation: 1
I think the disablerepo with yum would make sense and would normally work but unfortunately the repo names from the download (found in “/etc/yum.repos.d/redhat.repo”) is the same as in the local repo. So the disablereop option might be confused as to which repo to run against – the download repo from redhat or the local repo (maybe?). What I did do today which seems to work is...

In my “/etc/yum.repo.d” directory I have redhat.repo and a 2nd repo file with our local repo information. First I did a “yum clean all” to clear cache, then a “sed” against “/etc/yum.repos.d/redhat.repo” to change all occurrences of “enabled = 1” to “enabled = 0”. Then my “yum update –y” to patch.

I wonder if the yum with the disablerepo option will do basically do the same as my sed command – I’ll try that tomorrow and let you know.

Thanks for the suggestions --
 
Old 10-04-2015, 06:00 PM   #5
SigelTown
LQ Newbie
 
Registered: Aug 2015
Posts: 15

Original Poster
Rep: Reputation: 1
Here’s what I did that I think works for me..

1) I used subscription-manager to disable the repos used for the download of updates. Example would be “subscription-manager repos --disable=rhel-server-dts2-6-rpms”. Do this for each Redhat repo you have enabled for download.
2) Now add/update /etc/yum.repos.d/<your-local-repos>.repo with your local repo information to be used for patching (or at least make sure it is in place).
3) Do your patching with a “yum update –y”.
4) Now enable your repos again for download -- “subscription-manager repos --enable=rhel-server-dts2-6-rpms”. Do this for each Redhat repo you have want to download.

That should do it. Thanks to all for their help and suggestions --
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
enabling repos in rhel 7 ezhilanez Red Hat 5 12-08-2014 01:28 PM
RHEL 6.2 reposync not working bits45 Linux - Enterprise 1 02-15-2012 05:21 PM
Switching/adding repos in RHEL6 Alexvader Red Hat 3 11-28-2010 07:18 PM
RHEL 5 repos???? setlec_seta Red Hat 1 08-12-2008 01:55 PM
using centos repos under rhel sycamorex Linux - Software 4 05-26-2008 11:35 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 07:13 AM.

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