Skip to main content

LINUX - How to create a local YUM repository

Hi Guys,


This is my first Post. I am really excited to talk about YUM which has solved all the problem in Linux for installing packages . The cool feature is that it takes care of all the dependencies.


Let me teach you how to configure YUM in Redhat 5 .Since in Redhat 5 you cannot directly use yum since we require licence.Imagine you forgot to install a package say for example perl what will you do?.It may not be simple just to download the package But think about its dependencies YUM may be configured with ftp http or local I will explain all.


First of all while installing redhat 5 please please make sure you install createrepo package ( very very important)


Let create a local yum repository with ftp service.


1:First create a folder name Server in /var/ftp/pub/

#mkdir -p /var/ftp/pub/Server

2: copy all the packages from the cd or dvd to /var/ftp/pub/Server

# cd /media/
 
# cd Packages

# cp -rf * /var/ftp/pub/Server

3: Once all the packages are copied in /var/ftp/pub/Server . We need to run this command
 
#cd /var/ftp/pub

#createrepo -v Server/

4: After running the command go into the folder Server/ .You will be able to see repodata folder

5: Go into to the folder and check whether four .xml files are created.
 
6: Great that is it your yum repository is ready .
 
7: Now just start the ftp service
 
# service vsftpd restart
 
8:Now we need to edit the Yum configuration file
 
#cd /etc/yum.repos.d
 
9:Now we will edit the file
 
# vi rheldebug.info
 
10: Please edit remove all the lines and make this entry
 
[rhel-server]
 
name=
 
baseurl=ftp://< youripaddress >/pub/Server
 
enable = 1
 
gpgcheck = 0
 
save this file
 
Now run this command
 
#yum clean all
 
Thats it now the yum server is ready
 
for http service
 
just add the packages in /var/www/html/Server
 
follow step 3
 
restart the httpd service
 
make an entry in vi /etc/yum.repos.d/rheldebug.info
 
here in baseurl://http:///html/Server
 
and for ordinary yum
 
make this entry in vi /etc/yum.repos.d/rheldebug.info
 
baseurl://file:///
 
eg baseurl://file:///var/ftp/pub/Server

Comments

Popular posts from this blog

Helping an Employee Who’s Struggling with Postpartum Depression

Going back to work is tough for any new parent, but the transition is especially difficult for those suffering from postpartum depression. (Remember, postpartum depression affects both women and men.) If you manage someone who has recently had a baby, pay close attention to how they’re doing — a parent’s struggle doesn’t always show on the outside. Some people may overcompensate by working too hard, while others may show a loss of enthusiasm. Familiarize yourself with the services your firm offers — which may include groups for working parents, health care coverage for counseling, or post-natal yoga or meditation classes — so that you can help your employee access support. Offer options such as flex time, telecommuting, gradual return, or peer mentoring. In fact, it’s a good idea to offer these things to all team members so that the new parent doesn’t feel singled out. Find ways to make supporting employees and their mental health part of your culture. Adapted from " What Managers...

Honda recalls Jazz and City Cars

Automobile Giant Honda recalls 646,000 Fit/Jazz & City cars worldwide because of its window switch defect which could lead to fire.Yesterday it was Toyota and today its Honda. Whats the problem ? Under some severe operating conditions, water or any other liquid may enter the driver's window and reach the master power window switch resulting in impaired function of the switch. If the master power switch is damaged then it may lead to fire and and threat to life. There were three reported cases of fire due to the defect two in America and one in South Africa. Jazz in India wont be hit Honda spokesperson in India said it wont affect Jazz in India because the hatchback sold in India are next generation model and the defects pertains only to the previous generation models which was not sold to India.

Stamp your documents with QR Code (Free)

The power of a digital document - on paper. Stamp your documents with a QRdoc code and unlock the power of digital features like getting the latest version of the document.  This is a free service offered by QRDoc.io  https://qrdoc.io/