LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Local yum server & client issue. (https://www.linuxquestions.org/questions/linux-newbie-8/local-yum-server-and-client-issue-4175627844/)

MadhuPalter 04-17-2018 08:06 AM

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.

AwesomeMachine 04-17-2018 01:06 PM

There must be soem sort of priority system for the .repo files. I think you add the parameter 'priority=N' where N=1-99.

chrism01 04-18-2018 11:58 PM

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.


All times are GMT -5. The time now is 07:49 PM.