[Linux] How to Create a Local Repository From a RPM File

  • OS Version: Redhat 7.5

Usually we will create a local repository for our intranet machines to use. So your mirror repository machine can connect to the internet, but sometimes we just want to create a offline repository to use what should we do?

Step1 Get RPM File & Install

Supposed you already have a local repository which is running by apache2 or nginx. Like the example below:

You can see we put single 3rdparty’s rpm to each folder. For example you can see nginx folder.

First you need to download the rpm file you want.

Then you will see your local repository have a new repository for nginx.

Step2 Create REPO file for the machine you need

Now, you can install the package you need.

That’s all.

Reference

Understanding Red Hat Content Delivery Network Repositories and their usage with Satellite 6

Add a Comment