LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 02-19-2007, 07:44 AM   #1
vahid_p
LQ Newbie
 
Registered: Feb 2007
Posts: 4

Rep: Reputation: 0
how can i add a local Folder on local Hard Disk as Yum Repository ??


hi frinds ,

i have FC6 and for installing new package with yum , it get this package from internet .

i create a Folder in /root/Desktop/CD and copy all files in it .

how can i add this folder to yum repository , because i want yum install new package from this location not intarnet .

Vary Thanks
 
Old 02-19-2007, 08:06 AM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,488

Rep: Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956
You have to simply add the following entry in /etc/yum.repos.d/fedora-core.repo or create it if you don't have this file on your system:
Code:
[Local-Install]
name=Fedora Core $releasever - $basearch
baseurl=file:///root/Desktop/CD/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
 
Old 02-19-2007, 09:30 AM   #3
v00d00101
Member
 
Registered: Jun 2003
Location: UK
Distribution: Fedora 8, Centos 5.1
Posts: 480

Rep: Reputation: 30
Think about rsync as well for keeping it up to date.

I do similar due to having 3 machines running fedora, it consumes less bandwidth to rsync an update mirror, than for every machine to update on its own. The downside is the amount of space required (currently about 10GB on my ftp server.
 
Old 02-22-2007, 08:55 AM   #4
stormtracknole
Member
 
Registered: Aug 2005
Location: The Big Easy
Distribution: Slackware, RHEL
Posts: 817

Rep: Reputation: 104Reputation: 104
Quote:
Originally Posted by v00d00101
Think about rsync as well for keeping it up to date.

I do similar due to having 3 machines running fedora, it consumes less bandwidth to rsync an update mirror, than for every machine to update on its own. The downside is the amount of space required (currently about 10GB on my ftp server.
Or,you could use try using nfs to mount your /var/cache/yum directory to your other machines. That's what I do at home with my two fedora boxes. One will be the main server and I update that one first. After that one is done, the other machine does not have to download any files since it's already located in the server and I have mounted the yum directory on the second machine. Works well. I have never tried out rsync though. That is also a good way to do things.
 
Old 02-22-2007, 10:43 AM   #5
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 18, 19, RHL 5.2
Posts: 546

Rep: Reputation: 43
I agree with what the others have said, but also recommend checking out the createrepo command/package. It will create the repo metadata based on the rpms in the local directory. Placing this repository under /root is probably not the best idea. My preference would be to place it under /usr/local.

For example someone may not have access to the internet and want to copy all the RPMS from the installation CDs into a directory. Once that is completed you would follow up with createrepo and then adjust your configuration file under /etc/yum.repos.d. Creating the metadata and a cache will decrease your processing time on subsequent runs. It will be very easy to use yum to add packages rather than going through the CDs.

Bill
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
want to set up local yum repository linmix Linux - Software 4 04-23-2013 03:42 AM
can i create a local yum repository? Sharaz Linux - General 5 01-21-2008 01:51 PM
Can I create a local yum repository without copying DVDs? Charlie Spencer Linux - Newbie 3 09-22-2006 07:32 AM
how do I add a local folder as a repository? akudewan Ubuntu 2 09-05-2005 01:35 AM
install local dir as yum repository unixmad Linux - Newbie 2 10-01-2004 04:07 PM


All times are GMT -5. The time now is 11:40 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration