Yum & RepoList

How to set an local Repo List in Cent OS?

Step 1:

Import packages from ISO to local Directory
or Download packages from internet.


move downloaded RPM file to /var/ftp/pub/localrepo

Step 2:

create local repo link , now open an editor with the following name and paste the below code in that 

# vi /etc/yum.repos.d/localrepo.repo


[localrepo]
name=localrepo
baseurl=file:///var/ftp/pub/localrepo
gpgcheck=0
enabled=1 

Step 3:


open the Terminal and run below command

# createrepo -v /var/ftp/pub/localrepo/

# yum repolist

don’t forget to check local repo name in repolist table


Step 4:

open Terminal and run the below command

# yum clean all
# yum update

Step 5:

try to install a package from local repo

# yum install apacheds /var/ftp/pub/localrepo/

when yum prompt for yes no permission. Check the repository, should be Localrepo.

That's It we did !! now what ever you want to download any Repo Files it will fetch from your local Repo server 




THANK YOU !

Comments