LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-17-2018, 08:06 AM   #1
MadhuPalter
LQ Newbie
 
Registered: Apr 2018
Location: Pune, India
Posts: 2

Rep: Reputation: Disabled
Local yum server & client issue.


Hello,

I have a test environment which has six CentOS servers, and created a local YUM repository in one of the servers, where the other five servers should be fetching packages from this local YUM server via ftp.

Server1 (Yum Server): I have installed the FTP server and was able to install local yum server without any issues, but only after renaming the remaining pre-installed CentOS-*.repo files to CentOS-*.repo.bak files.

Server2-5 (Yum Clients): I am able to fetch packages from Yum Server via ftp. But, I had to rename the pre-installed CentOS-*.repo files to CentOS-*.repo.bak files, just like I did in Server1.

Server6 (Yum Client): In this server, I did not rename the CentOS-*.repo files, but created a new file "client.repo" in the /etc/yum.repos.d/ folder. When i tried to do a yum repolist, it failed with “Another app is currently holding the yum lock” error. After going through various articles, I have disabled the PackageKit utility which was the reason for the error and then I was able to execute the yum repolist command. But, when I tried to install a package, it fetched from the CentOS-Base.repo file, instead of the "client.repo" file, which was created to fetch the packages via ftp server.

Can someone help me how can this be fixed? One of my friend said, it is okay to have multiple .repo files in /etc/yum.repos.d/ folder. How can I make sure that the packages are being fetched from the local YUM server which I created?

It would be great, if anyone can help me on this. Thanks in advance.
 
Old 04-17-2018, 01:06 PM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
There must be soem sort of priority system for the .repo files. I think you add the parameter 'priority=N' where N=1-99.
 
Old 04-18-2018, 11:58 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,363

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
There are 2 solns:

1. set enabled=0 in the repo file (recommended)
2. use yum priorities https://wiki.centos.org/PackageManag...Yum/Priorities

It depends if you always want repo 'off' - option 1.
Option 2 makes yum search repos in priority order (1 = highest priority) for each pkg - 1st match wins, so set Centos (or RHEL) repos with low numbers (eg 1 - 5) to protect your system.
 
  


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
Local yum server & client issue. MadhuPalter Linux - Newbie 2 04-17-2018 01:53 PM
what is the use of createrepo ? how to configure yum client & server and usage? raviteja_s Linux - General 1 08-05-2010 01:59 AM
Yum client package/updates installation and updates through local Yum Server gautamnarayan Linux - Server 1 03-11-2010 01:51 AM
NIS server && client issue LinuxRam Linux - Networking 1 11-03-2004 11:14 AM
pptp server/client settings & routing issue csvke Linux - Networking 0 01-27-2004 07:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:33 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