Configuring Local RPM repository on RHEL and Cent OS

Hire us for your custom mobile application and Web Application development needs . You can be assured your final deliverable, no matter the technology its built on, will be secure, scalable and sustainable in whatever environment its hosted.

WhatsApp : +918500018686 :: skype:



Sometimes we may need to install a bunch of rpm files at once . If we configure local yum repository , we can install all rpm files at once with yum command.

If a vendor is frequently updating the packages in the remote repository and you just want to stick with old packages , then you can download all rpm packages from teh vendor remote base URL and add them to local repository and then run yum install package.

To create a rpm repository first install “createrepo” package by running yum install createrepo

make a directory where you want to copy all rpm files.

# mkdir /My_repository

# cp from_rpms_directory/* /My_repository

Now run command

#createrepo /My_repository

Add repository file in /etc/yum.repos.d/

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

then add the entries like

name=My application from local repository

Now we can issue yum command to install my_app package

# yum install my_app

If you have a web server running ,you can upload rpm files to the web directory and just replace file:// with http:// .

this way you can share this repository with other servers when you needed .

example baseurl=http://mywebserver_ip/repo/ .

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top