LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Configuring yum locally. (https://www.linuxquestions.org/questions/linux-newbie-8/configuring-yum-locally-911007/)

gardenair 10-31-2011 01:00 AM

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

EricTRA 10-31-2011 01:04 AM

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

gardenair 10-31-2011 01:28 AM

2 Attachment(s)
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.

EricTRA 10-31-2011 02:02 AM

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

gardenair 10-31-2011 04:22 AM

thanks a lot:cool: 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

EricTRA 10-31-2011 05:28 AM

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

gardenair 11-02-2011 03:52 AM

1 Attachment(s)
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

deep27ak 11-02-2011 07:20 AM

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/

gardenair 11-02-2011 11:45 AM

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

EricTRA 11-02-2011 12:22 PM

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

chrism01 11-02-2011 06:18 PM

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/

deep27ak 11-02-2011 11:12 PM

Quote:

Originally Posted by gardenair (Post 4514244)
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

gardenair 11-03-2011 12:58 AM

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


All times are GMT -5. The time now is 09:05 AM.