LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-10-2011, 04:10 AM   #1
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Rep: Reputation: 45
client not accessing yum server .


hi,
I am using cent os 5 & I successfully configure my yum server on it.The problem is that the client machine is not accessing the yum server.

Following are my server configuration

Code:
1: First I Mount an ISO file
# mount -o loop /var/ftp/pub/centos.iso /mnt/iso/

2: Create a repository on that ISO 
# cd /mnt/iso
# createrepo /var/ftp/pub

Clean all previous repos.
# yum clean all

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

# vi /etc/yum.repos.d/iso.repo
[My ISO Repository]
name=Centos repository
baseurl=file:///mnt/iso
enabled=1
gpgcheck=1
I save my file & exit.

At my server using GUI interface when i click on Application...>Add/Remove Software I can see under brows all software applications .Even if i try to use
# yum install vim*
setting up install process

and it install vim

on Client side configuration i create

Code:
# vi /etc/yum.repos.d/iso.repo
[My ISO Repository]
name=Centos repository_client
baseurl=ftp://192.168.1.10/pub/centos5dvd/
enabled=1
gpgcheck=1
On server side vsftp is start,firewall is disable on both client & server and both can ping each other.

The problem is when I try to use yum commd on client side

Code:
# yum install vim*
ftp://192.168.1.10/pub/centos5dvd/repomd.xml: [Error 4] IoError:[Error ftp error] 550 Failed to change directory.
Trying other mirror.
Error:Cannot  retrive repository  metadata (repomd.xml) for repository: My ISO Repository.Please verify its path and try again.
Please help me how can I fix this issue ?

thanks in advance,
gardenair
 
Old 11-10-2011, 04:39 AM   #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
well you seem to have missed the bit out where you manually use an ftp client to do the same thing. Don't run before you can walk. use an ftp client and keep an eye on the vsftpd logs. Then again, you've not even mentioned that an FTP server exists...
 
Old 11-10-2011, 04:59 AM   #3
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
I agree with acid_kewpie

and it seems you are working on this issue from long time? here
last time you changed the topic and never got back with conclusion?

Well for now just copying your repository in
Code:
/var/ftp/pub
will not help your clients accessing your ftp server even if it exists

So kindly tell us if you have configured any ftp server and if yes which one?

And another thing which is surprising me is
you have mentioned in yum.conf
Code:
gpgcheck=1
But I don't see any gpgfile so how is yum working on your server?

__________________
Thanks and Regards
Deepak
 
Old 11-10-2011, 05:28 AM   #4
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
Thanks for the reply.Well ftp server does not exits. I just turn on ftp service on my yum server.

Code:
# service vsftp start
Should I first create a ftp server on a seperate machine.At the moment i am doing it on test bases.

My scenario is
I have one Yum server & vsftp service is start on same server.
One client machine to connect yum server.


thanks
gardenair
 
Old 11-10-2011, 05:32 AM   #5
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
you need a functional FTP server, doesn't matter where it is, but clearly you need to put the basics in place first.

Any reason you're using FTP? HTTP is much simpler and easier to troubleshoot.
 
Old 11-10-2011, 05:40 AM   #6
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 the reply.Well ftp server does not exits. I just turn on ftp service on my yum server.

Code:
# service vsftp start
Should I first create a ftp server on a seperate machine.At the moment i am doing it on test bases.

My scenario is
I have one Yum server & vsftp service is start on same server.
One client machine to connect yum server.


thanks
gardenair
Things you need to do

Quote:
1. create a vsftpd server on a machine

2. give the default location of your repository in vsftpd.conf

3. define the access for your clients in vsftpd.conf
but most importantly make sure your yum is configured properly on the server machine
as you didn't answered me about

Code:
gpgcheck=1
Are you able to install packages with yum on your server machine?
 
Old 11-10-2011, 05:41 AM   #7
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
Thanks for the prompt reply. Well i does not work on apache server that is why i am using ftp.
The ftp is functional How..! I open browser on my client machine & in the url i write

Code:
ftp://192.168.1.10/pub
It show me the share directories here which are

centos5dvd
repodata


I know there is a little mistake which i am doing..I do google but find no solution of my problem.

to troubleshoot it please let me know the steps which I check it one by one.

thanks
gardenair
 
Old 11-10-2011, 05:46 AM   #8
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
so can you grab the repo xml file then?
 
Old 11-10-2011, 05:50 AM   #9
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 the prompt reply. Well i does not work on apache server that is why i am using ftp.
The ftp is functional How..! I open browser on my client machine & in the url i write

Code:
ftp://192.168.1.10/pub
It show me the share directories here which are

centos5dvd
repodata


I know there is a little mistake which i am doing..I do google but find no solution of my problem.

to troubleshoot it please let me know the steps which I check it one by one.

thanks
gardenair
I am sorry I couldn't understand

the mistake you are talking is about "yum" if I am not wrong?
you have not yet configured yum?

before moving ahead to ftp we should clarify that everything is working fine on your machine especially "yum"
 
Old 11-10-2011, 06:51 AM   #10
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
HI

server side

cd /etc/yum.repos.d
mv C* /tmp
cat > create.repo
[rhel-server]
name=redhat
baseurl=ftp://10.200.xx.xx/pub/server ---- put ur server side ipaddress
enabled=1
gpgcheck=0

mount /dev/cdrom /mnt
mkdir -p /var/pub/server
cd /mnt/Centos

cp -rfrv * /var/pub/server
wait for it to finished it off
move all repositoryrpm to /var/pub/server

cd /var/pub/server
rpm -ivh create.repo --install these package
rpm -ivh vsftpd ---install these package


start vsftpd service

service vsftpd restart
chkconfig vsftpd on


client side
cd /etc/yum.repos.d
touch create.repo
vi create.repo
[rhel-server]
name=redhat
baseurl=ftp://10.200.xx.xx/pub/server MENTION UR SERVER IP HERE
enabled=1
gpgcheck=0

Last edited by jsaravana87; 11-10-2011 at 06:52 AM.
 
1 members found this post helpful.
Old 11-10-2011, 11:06 PM   #11
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
Thanks "acid_kewpie" & "arun5002" for guiding. I mount centos5 iso file.You can see in my 1st post. Some people copy the contents in a folder but i use iso file.Anyway i think that is not an issue.

Well I can see the "repomd.xml" file under /var/ftp/pub/repodata/repomd.xml

Here I can also see three files i.e "filelists.xml.gz,other.xml.gz,primary.xml.gz"

These files are in the yum server.The interesting thing is that yum server is functioning proper the issue is on client side.In both side iptables are disables,they can ping also.

I think that the client is unable to see repomd.xml file ?

It is for me that how can I fix the issue.

regards,
gardenair
 
Old 11-10-2011, 11:37 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

These files are in the yum server.The interesting thing is that yum server is functioning proper the issue is on client side.In both side iptables are disables,they can ping also.
This is what I was asking buddy.

always check for small things you will find the answer there if self.
yesterday i created my own ftp yum repository which is accessible by everyone on network, you can check attached file

Code:
1. all you need to do is mention the path of your repo in vsftpd.conf.
2. check the permissions on the directory
3. and check the authentications in vsftpd.conf
and you are done!

on server
Code:
#vi /etc/vsftpd/vsftpd.conf
anonymous_enable=YES
anon_root=/path/to/your/repository
(check the permmission on this dir)
go to your browser and check whether you can see all your repos like in the attached file.
Quote:
If yes proceed to client
If no check for the errors and logs
on client
Code:
#vi xxx.repo
[main]
name=abcd
baseurl=ftp://192.168.x.x
enabled=1
gpgcheck=0
Attached Thumbnails
Click image for larger version

Name:	ftp_yum.jpg
Views:	29
Size:	159.0 KB
ID:	8352  
 
1 members found this post helpful.
Old 11-11-2011, 12:42 AM   #13
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
On server side I do teh following

Code:
#vi /etc/vsftpd/vsftpd.conf
anonymous_enable=YES
anon_root=/var/ftp/pub
Here under pub there are two more folders i.e

centosdvd and repodata

By default the file permission was

-rw------- 1 root root 4429 Nov 10 21:30 vsftpd.conf
I give full permission to vsftpd file

-rwxrwxrwx 1 root root 4429 Nov 10 21:30 vsftpd.conf

On the client side when I open the browser it does not show the things as u show in your attachment.

I even change
Code:
anonymous_enable=YES
anon_root=/var/ftp/pub/centos5dvd
but no success.

selinux is also disable.I know there is a little mistake which i am doing but unable to fix it.
please see the attachments.

regards
gardenair
Attached Thumbnails
Click image for larger version

Name:	1.png
Views:	24
Size:	62.5 KB
ID:	8353   Click image for larger version

Name:	2.png
Views:	25
Size:	65.5 KB
ID:	8354   Click image for larger version

Name:	3.png
Views:	24
Size:	68.9 KB
ID:	8355  
 
Old 11-11-2011, 01:02 AM   #14
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
everything is just getting confusing without any reason or I guess I am unable to understand.

starting from the beginning of your yum server (This is how you can configure yum server as the steps you have followed is still a question mark for me and I dont wanna waste any more time in asking question)

This is the simplest method unless you don't wanna complicate it
Either you follow this or just as I explained I want you to explain the steps you followed unless you don't wanna waste others as well as yours time

Code:
#mkdir /yum
#mount /dev/cdrom /mnt
#cd /mnt
#cp -rvf /path/to/packages/in/cd/*  /yum/
#rpm -ivh /yum/createrepo-0.x.x.x
#createrepo /yum/
Code:
#vi /etc/yum.conf
[server]
name=CentOS repo
baseurl=file:///yum/
gpgcheck=0
enabled=1
Code:
#yum clean all
#yum update
#yum list
for ftp server
Code:
#vi vsftpd.conf
anon_root=/yum/
Code:
#service vsftpd restart

check on browser


on client
Code:
vi /etc/yum.conf
[client]
name=client
baseurl=ftp://your_ip
gpgcheck=0
enabled=1
 
1 members found this post helpful.
Old 11-11-2011, 01:07 AM   #15
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

Code:
#vi /etc/vsftpd/vsftpd.conf
anonymous_enable=YES
anon_root=/var/ftp/pub
Give the full path of the location of packages and try

Code:
anon_root=/var/ftp/pub/centos5dvd/repodata
I asked you to change the permission of the file you mentioned in vsftpd.conf i.e repodata, don't change the permission of vsftpd.conf, in that case any user will have permission to change or delete the file
 
  


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
how to get list of client if accessing server centos123 Linux - Server 4 05-23-2011 06:47 AM
Yum client package/updates installation and updates through local Yum Server gautamnarayan Linux - Server 1 03-11-2010 01:51 AM
Linux client accessing Samba Server waljure Linux - Networking 4 06-25-2005 07:20 PM
Configuration for a client accessing a proxy server darin3200 Linux - Networking 2 01-08-2005 12:48 PM
Problems accessing server using ssh client. rmc Linux - Networking 1 12-12-2002 02:01 PM

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

All times are GMT -5. The time now is 01:58 PM.

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