How to create yum repo in Linux
Creation of Repo in Oracle Enterprise Linux from the local repository.
Why we create repo on Linux machine.
Whenever we install rpm on our machine. That software needs other packages also to run that software in compatible and proper way. Yum help to provide those dependencies to installation rpm.
Creation of Linux yum
Move all the Linux rpm packages to one directory for making local repository packages.
You will get these Packages from the DVD or you can download all the Linux packages from the internet websites.
To create yum packages, we must first install createrepo rpm on our Linux machine.
To install createrepo, make sure install mention name packages from your Packages folder.
Install repo rpm package on the existing Linux machine.
For this, you must install 2 more packages for repo rpm installation.
- Delta rpm
- Python-delta rpm
- Createrepo rpm
Command to install packages using rpm
#rpm -ivh package name –nodeps –force
After createrepo package installation successfully moves to yum directory to give yum package folder path.
Once the installation done and move to directory
Fire this below command
#yum clean all
Paste below the line in your ol.repo file to create repo.
Fire this command to create repo from packages folder.
#createrepo -v Packages
Show all the repolist to access packages
It will show your packages repository list.
If you want to add new packages in the future you must use all the steps again. Except for createrepo rpm packages.