LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-31-2011, 01:00 AM   #1
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Rep: Reputation: 45
Configuring yum locally.


hi,
I am using Cent os 5. I want to configure Yum server locally.For that purpose i take the following steps.

1: First I Mount an ISO file
# mount -o loop /path/to/centos1.iso /mnt/iso/

2: Create a repository on that ISO
# cd /mnt/iso
//createrepo package should be installed
# createrepo .

Clean all previous repos.
# yum clean all

Step # 3: Create config file
I create an empty repo config file in /etc/yum.repos.d/ directory.
# vi /etc/yum.repos.d/iso.repo


Next steps i does not know how to do it. Kindly any one guide me.

thanks
gardenair
 
Old 10-31-2011, 01:04 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

The next step would be to update / upgrade / install from your local repository. But that doesn't make much sense if you don't download any security, or other updates from the web that provide bug fixes, newer versions etc... Also, software that isn't available from your DVD image will not be available for installation. Can you indicate the reasons why you want a local repository from DVD instead for example a local mirror of a repository from the web?

Kind regards,

Eric
 
Old 10-31-2011, 01:28 AM   #3
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
thanks for the reply.Some one guide me that i have to write an the following files in new create file i.e iso.repo


# vi /etc/yum.repos.d/iso.repo

[My ISO Repository]
baseurl=file:///mnt/iso
enabled=1


Here baseurl=file:///mnt/iso is confusing me that file is a key word & after there are /// forward slash three times !

Kinldy view the snaps here with my post.
Attached Thumbnails
Click image for larger version

Name:	snap1.png
Views:	12
Size:	61.9 KB
ID:	8276   Click image for larger version

Name:	snap2.png
Views:	15
Size:	71.7 KB
ID:	8277  
 
Old 10-31-2011, 02:02 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

OK, now I got understand. You didn't know what exactly to put in the .repo file? I thought you had that already configured. Here's one that I use with RHEL 5.6 and an NFS mounted under /mnt/source. You should be able to substitute the mount points I use for your local directories.
Code:
[rhel-local]
gpgcheck=1
name=Red Hat Linux $releasever - $basearch - DVD
baseurl=file:///mnt/source/Server
[rhel-cluster]
gpgcheck=1
name=Red Hat Linux $releasever - $basearch - DVD
baseurl=file:///mnt/source/Cluster
[rhel-clusterstorage]
gpgcheck=1
name=Red Hat Linux $releasever - $basearch - DVD
baseurl=file:///mnt/source/ClusterStorage
After that run:
Code:
yum update
to see if you've set it up right and yum can connect to your local repository.

Kind regards,

Eric
 
1 members found this post helpful.
Old 10-31-2011, 04:22 AM   #5
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
thanks a lot From my local computer i can easily install any softwares.using the following
baseurl=file:///mnt/iso

I case of client computer which want to install any software over LAN from my yum server it should be

Code:
baseurl=file:///mnt/source/Server
Example:-
Code:
baseurl=file:///mnt/client_computer_IP/server_IP
Please guide me.

2- When I install a software in my local system it show
Code:
"Unable to verify
Detail
Public key for epic -2.4.1.i386.rpm is not install
Though it is out of scop of my thread but being a part of yum server i face this issue. what is mean by public key in Linux?

Thanks
gardenair
 
Old 10-31-2011, 05:28 AM   #6
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

I think you're mixing things up. There's a difference between accessing a local repository from your local machine and using yum over the LAN to connect to a local (in your LAN) repository instead of using the internet. If you want your client computers to be able to use yum, you'll have to follow a different approach (HTTP, NFS) to publish your repository on your LAN. If that's what you want to do, do you want to synchronize your repo to one available on the internet (mirror it)?

Kind regards,

Eric
 
Old 11-02-2011, 03:52 AM   #7
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
Thanks a lot for your guidance "EricTRA". Well as you mentioned "using yum over the LAN to connect to a local (in your LAN) repository instead of
using the internet."
This is the thing which i have to impliment.

The yum server should get update from internet & the clients computers
which are running fedora should connect to yum server over LAN to download the updation instaed each client directly go to internet which will generate more trafic.

As you say "If you want your client computers to be able to use yum, you'll have to follow a different approach (HTTP, NFS) to publish your repository on your LAN." How can I publish my repository ?

what changes should I do in

Quote:
# vi /etc/yum.repos.d/iso.repo

[My ISO Repository]
baseurl=file:///mnt/iso
enabled=1
You can view a simple diagram which would helpfull to you to reply me.

thanks.
gardenair
Attached Thumbnails
Click image for larger version

Name:	picyum.PNG
Views:	15
Size:	15.1 KB
ID:	8283  
 
Old 11-02-2011, 07:20 AM   #8
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
If you want to configure yum locally so that all the client machines can use the same

you need to configure yum on http or ftp which can be accessed by your clients



you can check this as I was also trying to do the same

http://www.linuxquestions.org/questi...server-909097/
 
Old 11-02-2011, 11:45 AM   #9
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
thanks for a nice link.Well as you mentioned in the post that "you need to configure yum on http or ftp which can be accessed by your clients" for that purpose I have to 1st make a yum server then i should configure apache or ftp server? Technically what you suggest ?

For http you give me the link but for ftp how can i do it ?

kindly just elabrate it
thanks,
gardenair
 
Old 11-02-2011, 12:22 PM   #10
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

I'm quite sure that you'll find whatever answers you need in this HowTo on the CentOS Wiki. Put the idea of using the ISO aside, since it's almost never up to date. Only use the ISO to populate the local repository before synchronizing, that will also save you bandwidth and time. The Wiki article I indicate is for a NFS setup but almost at the bottom of the article there's a link pointing to a howto that configures for HTTP and/or FTP, nl. this one.

Kind regards,

Eric
 
Old 11-02-2011, 06:18 PM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,361

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I think you;ll find this useful; either use RH Proxy as referenced herein, or use the (work-around) technique described http://kenfallon.com/how-to-mirror-r...your-firewall/
 
Old 11-02-2011, 11:12 PM   #12
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by gardenair View Post
thanks for a nice link.Well as you mentioned in the post that "you need to configure yum on http or ftp which can be accessed by your clients" for that purpose I have to 1st make a yum server then i should configure apache or ftp server? Technically what you suggest ?

For http you give me the link but for ftp how can i do it ?

kindly just elabrate it
thanks,
gardenair
Actually I have not tried local mirrors for repositories, even I use the packages in RHEL DVD
So you can simply copy all the packages in any directory which for mine is

Code:
#cd /sdb1/www/yum/
#rpm -ivh /sdb1/www/yum/createrepo-x.x.x.x
#createrepo /sdb1/www/yum/
rest you can check from the link how to use apache server for repositories
 
Old 11-03-2011, 12:58 AM   #13
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
thanks all of you for guiding me. I think at the moment i should only focus on the question.Things are mixing up in my mind so will discuss one by one .

At the moment my local repositary is working fine but there are few things which I want to share with you. In the following I try to point it with red text. what are the functionality of these things in creating a local repositary ? like [rhel-cluster] & [rhel-clusterstorage] .There are used which there is a cluster enviroment ?
What gpgcheck=1 means ?

Code:
[rhel-local]
gpgcheck=1
name=Red Hat Linux $releasever - $basearch - DVD
baseurl=file:///mnt/source/Server
[rhel-cluster]
gpgcheck=1
name=Red Hat Linux $releasever - $basearch - DVD
baseurl=file:///mnt/source/Cluster
[rhel-clusterstorage]
gpgcheck=1
name=Red Hat Linux $releasever - $basearch - DVD
baseurl=file:///mnt/source/ClusterStorage
2- I mount my iso image each time when i turn on my system.To add my iso permently can u help me how can I write in /etc/fstab file so even after reboot I can access my iso image ?

# mount -o loop /path/to/centos1.iso /mnt/iso/


Kinds Regards
gardenair
 
  


Reply



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
yum installation locally mlnm Linux - Newbie 1 07-05-2011 07:09 AM
[SOLVED] Help needed configuring iptables to locally translate some ports mgai7755 Linux - Networking 5 04-27-2011 08:20 AM
Need help configuring YUM zak4u Linux - Newbie 5 03-23-2009 06:32 AM
Can YUM be used to installed locally downloaded RPMs? Akhran Linux - Newbie 5 04-01-2006 10:24 AM
help configuring yum J0sep Fedora 1 01-13-2005 02:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration