How to Create local YUM repo?

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat How to Create local YUM repo?
# 1  
Old 09-03-2010
How to Create local YUM repo?

Hi friends,
I am using RHEL5 . I have tried to create the local repo using createrepo rpm.But i have been facing a lot of errors and it is not working well. Can somebody tell me how to create the local repo?
Thank you in advance.
Regards,
Prakashkumar.S
# 2  
Old 09-03-2010
Copy the RPM files to your server and run "createrepo" utility.

Example:

https://access.redhat.com/kb/docs/DOC-7228
# 3  
Old 09-04-2010
i can say what i do Smilie

Code:
# cp /etc/yum.repos.d/rhel-debuginfo.repo /etc/yum.repos.d/my.repo

edit and change your yum path location
for exa my repo file

Code:
# vi my.repo
[-----yucelgemici-x64-packages-----]
name=Red Hat Enterprise Linux x64 -x64 Systems - Debug
baseurl=file:///Server/x64
# baseurl=http://myhttpserverIP/x64 --> for http
# baseurl=ftp://myftpserverIP/myrpmfullpath --> for ftp
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

for example and i cp rpm files to my local disk in /Server/x64 dir
for this i use nfs with /etc/exports

Code:
# cat /etc/exports
/Server 192.168.255.128(rw,async,no_root_squash)

and create repo
Code:
# cd /Server/x64 
# createrepo .

let clear all cache and headers
Code:
# yum clean all

list our repos
Code:
# yum repolist
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
-----yucelgemici-i386-packages-----                                                                                  |  951 B     00:00
primary.xml.gz                                                                                                       | 1.3 kB     00:00
-----yucelgemici-i386-packages-----                            1/1
-----yucelgemici-x64-packages-----                                                                                   |  951 B     00:00
primary.xml.gz                                                                                                       | 108 kB     00:00
-----yucelgemici-x64-packages-----                             408/408
repo id              repo name                                status
-----yucelgemici-i38 Red Hat Enterprise Linux i386 -i386 Syst enabled :       1
-----yucelgemici-x64 Red Hat Enterprise Linux x64 -x64 System enabled :     408
repolist: 409


Thats all Smilie
This User Gave Thanks to ygemici For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Find which RPM Azure repo is used in "yum repolist" for EUS or non EUS repos

Hello, I'm looking for help with a script or ideally just a one line command perhaps that will check the results of yum repolist and look for a specific repo on a sever. We have some VM's using EUS repos from Red Hat and others that do not use EUS repos. The way we would see which repos are... (2 Replies)
Discussion started by: greavette
2 Replies

2. UNIX for Beginners Questions & Answers

Installation of virt-manager while yum update and yum install rhvm does not work

I have downloaded RHEV-H 4.2 Red Hat Virtualization - Red Hat Customer Portal (RHVirtualization 4.2 Host and Manager iso). I uploaded the image and installed on an HP G9 server baremetal. I found I dont have a WAN/net connectivity later on HPG9 server. How can I still install virt-manager on... (1 Reply)
Discussion started by: Paras Pandey
1 Replies

3. Linux

Local YUM Repository for RHEL versions

Hello, I need to know regarding setting up of Local repositories so that I can update or install packages on other RHEL servers. In our environment we have many servers with different RHEL versions. Like RHEL 7.2, RHEL 7.3, RHEL 7.4, RHEL 7.5 Arch = x86_64 I have setup one Repo server;... (0 Replies)
Discussion started by: SunshineMLinux
0 Replies

4. Red Hat

Questions about running local YUM server

Im building a local yum server to update a handful of RHEL6 and RHEL7 servers, I'll be sharing out these updates via a local http webserver but I have a few questions. 1) it seem I am only able to download RHEL6 patches from a RHEL6 box and 7 patches from a 7 box which would mean I would have to... (1 Reply)
Discussion started by: dendenyc
1 Replies

5. UNIX for Dummies Questions & Answers

Configuring EPEL repo and setting it as default repo.

I am using RHEL 6, but with no RHN subscription. I tried installing the EPEL repo, it is enabled under yum repolist but when I try a sample search such as yum search nginx , there's a string of errno 14 PYCURL error 6 . When I tried yum list installed, it didn't work because it defaults to the... (0 Replies)
Discussion started by: Hijanoqu
0 Replies

6. Red Hat

local yum server on fedora 17

Hello friends I was creating local yum server from dvd but fedora 17 used pool method , i mean similar to debian for packages i.e a,b....z How can i create local yum server on fedora 17 like fedora 14,15,16 Any help Thanks (1 Reply)
Discussion started by: rink
1 Replies

7. Red Hat

Local yum repository

Hi Friends, I have succesfully configured a local yum repository using ios image. Please let me know how i can synchronize the local repository with RHN. Is it possible, so that i can update the local repository with latest updates. Regards, Arumon (1 Reply)
Discussion started by: arumon
1 Replies

8. UNIX for Dummies Questions & Answers

Centos commands: Yum Upgrade versus Yum update

Hi, I would like to know the difference between YUM UPDATE and YUM UPGRADE. The man pages say upgrade is same as update with the obsolete option. And by default it says the obsolete option is turned on, which would make them equivalent. Does not say what obsolete does. Can someone please... (3 Replies)
Discussion started by: mojoman
3 Replies

9. Linux

Auto create local account with winbind.

Hi, I have a set up a linux box connected to windows active directory using winbind. Everything is up and running fine. Now i wish to auto create a local account whenever a new user logs in. I have tried every possible way using the smb.conf to no avail. Any help would be appreciated. (1 Reply)
Discussion started by: d_ark
1 Replies

10. Shell Programming and Scripting

Shell script to create local homes

Hi I am trying to write a login script for network based clients (OSX) that looks up local accounts eg admin, root, etc and exits the script so that it doesn't apply to them. Then for everyone else I make folders eg movies, music, etc that are placed in local harddrive rather than the default... (11 Replies)
Discussion started by: Steve Adcock
11 Replies
Login or Register to Ask a Question