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...

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/ 

If Your Team Is Overwhelmed, What Can They Stop Doing?

Project overload is real. But as a leader, it can be hard to tell whether your team needs more resources or just could be working more efficiently. Start by asking people to identify their key activities and how much time they spend on them in a typical week. Use that data to assess workloads and priorities. Consider which tasks the team could stop doing and which might benefit from having their process rethought. Pay special attention to low-value projects that have to get done but that take up an inordinate amount of time. Are there ways to simplify the workflows to reduce the amount of time your team spends in these areas? And last but not least, look for tasks that simply can be done more quickly. If your team is still struggling after these steps, it might be time to hire more people. Adapted from “What to Do If Your Team Is Too Busy to Take On New Work,” by Dutta Satadip