LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-24-2010, 03:47 PM   #1
Zahir76
LQ Newbie
 
Registered: Feb 2010
Posts: 15
Blog Entries: 1

Rep: Reputation: 0
Question NFS works but Yum gives error


Installed Redhat5 using NFS-server, but when tried to install packages in the newly installed client using:

#yum install package

Client gives, ftp errno 4, error 500...can't change directory...

Edited:
/etc/yum.repos.d/rhel.debuginfo.repo
-------------
baseurl=ftp://192.168.0.5/inst
erased> enable=0
-------------

P.S. all CD copied to /inst directory in NFS-server, where all rpm's can be found in /inst/Server/

What am I missing to make YUM work, in my local repository?

Thanks, all Linux-People.

Last edited by Zahir76; 03-24-2010 at 04:13 PM.
 
Old 03-24-2010, 05:28 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Why are you asking about NFS when this is very clearly an FTP error, and you can clearly see that you're using an FTP based repository..??
 
Old 03-27-2010, 02:29 PM   #3
Zahir76
LQ Newbie
 
Registered: Feb 2010
Posts: 15

Original Poster
Blog Entries: 1

Rep: Reputation: 0
Sorry for delayed post, I messed-up my little-lab setup...
Thanks Chris, I guess the right question sometimes gives the right direction to a solution

My question now is, if I've configured NFS in a directory, for example:
#/inst/Server/*.rpm

Can I YUM from the same directory, making it a FTP-based repository? If so, which (.conf) file should I start with? OR I coping all the (rpm) to /var/ftp/pub is a way?

N.B. I can YUM in the local-server: as I used the command below.
#createrepo -v /inst/Server

But how to do YUM from a client-side?
Any clue?

Thanks, all Linux-People.

Last edited by Zahir76; 03-27-2010 at 03:43 PM.
 
Old 03-27-2010, 05:33 PM   #4
Zahir76
LQ Newbie
 
Registered: Feb 2010
Posts: 15

Original Poster
Blog Entries: 1

Rep: Reputation: 0
OK, solved!
After installing NFS server, copying all RHEL CDs to a directory, in my case, /inst, we need to edit, /etc/exports file, followed by NFS service reload.
Here are the steps:

###Server Side:
01#mkdir /inst
02#cp -ar /source/. /inst
[note the (.) after /source/]
03#vi /etc/exports
Add line:
/inst *(ro,sync)

04#exportfs -a
05#service nfs restart
06#chkconfig nfs on

07#rpm -ivh createrepo
08#createrepo -v /inst/Server

[/inst/Server => this is the directory where local copy of RPM packages can be found.]

09#vi /etc/yum.repo.d/file.repo
[Server]
name= redhat
baseurl=file:///inst/Server

10#yum clean all
11#yum update (to check)

###Client Side:
Check NFS connection
01#showmount -e [server-IP]
if it shows '/inst' (the shared directory), it's working.
Then we need to mount the directory locally.
02#mount server-IP:/inst/Server /var/yum
Create /var/yum, if it doesn't exist, also notice, /inst/Server at server-side is where all the rpm files are.
Now, edit /etc/yum.repos.d/file.repo
(file.repo or you filename with .repo extension)
03#vi /etc/yum.repos.d/file.repo
baseurl=file:///var/yum
enable=1

04#yum install package
Should work now!

Finally, to make this work after reboot.
#yum install autofs
#vi /etc/auto.master
/misc /etc/auto.misc --timeout=60
(timeout prevents system hanging due to network-error etc.)

#vi /etc/auto.misc
Add line:
yum -ro,soft,intr server-IP:/inst/Server

#service autofs restart
To test the result
#ls /misc/yum
(try few times if in weak network connections)

#yum update
Should now give normal YUM output.

Hope this works for you. Just showed the steps, you may need to do your man-page research for detail.

Thanks, all Linux-People.

Last edited by Zahir76; 03-29-2010 at 05:02 PM.
 
  


Reply

Tags
nfs, yum



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 config error parsing file failed - yum won't run emuub Linux - Software 9 11-04-2008 05:48 AM
NFS error: sometimes unable to find the files at NFS-client machines samengr Linux - Server 0 09-01-2008 11:26 AM
Strangest FTP error on RHEL5. gFTP works. RHEL4 works too. GuitsBoy Linux - Software 1 04-10-2008 08:29 AM
how yum works . Ayman.mashal Linux - Software 1 02-08-2006 04:14 AM
update openoffice.org via yum on FC3 report error, and the fan works not well. upsun Fedora 0 01-31-2005 09:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:30 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