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 05-21-2011, 02:10 AM   #1
nivedhitha
Member
 
Registered: Jul 2005
Posts: 32

Rep: Reputation: 0
ErrNo 14 and ErrNo 256 in yum server configuration


Hi All,
I have installed CentOS 5.6 guest in vmware. This machine has host-only networking. I would like to install vmware-tools, which requires that gcc be installed. (As vmware tools is not yet configured, I cannot copy paste the error. So I am typing it out). As gcc has dependancies, I thought of configuring a local yum repository via http. http is already up and running fine.

These are the steps I did:
I mounted the iso as loopback in /mnt/cdrom.

cd /var/www/html
mkdir -p yum/base-pkg


/var/www/html/yum/base-pkg is where all the rpm's going to be served via http will be present. I am changing the ownership of /var/www/html/yum/base-pkg to apache:apache, though not sure if this step is required.
chown -R apache:apache /var/www/html/yum/base-pkg

Now, cd /mnt/cdrom
ls CentOS | wc -l

shows 2684
I am copying these 2684 packages as follows:
cp -avr CentOS/* /var/www/html/yum/base-pkg

I am also copying the directory "repodata" as follows:
cp -R repodata/* /var/www/html/yum/base-pkg

Now, cd /etc/yum.repos.d
ls

shows the following files:
CentOS-Base.repo
CentOS-Debuginfo.repo
CentOS-Media.repo
CentOS-Vault.repo

I am renaming the .repo directories to something else. I hope this will ensure that yum will not look into the default repositories, rather will look only into my custom repository file.
for i in $(ls); do mv $i $i.org; done

Now I am creating my repository file named mylocal.repo (in /etc/yum.repos.d)
touch mylocal.repo
vi mylocal.repo
[base-local]
name=Centos $releasever - $basearch
failovermethod=priority
baseurl=http://192.168.17.128/yum/base-pkg/
enabed=1
gpgcheck=0
:wq

where 192.168.17.128 is my IP address.

Now coming to yum,
yum list
=>works fine

yum install createrepo
=>asks if I want to download a 59K createrepo package. And I say yes.
It says
Downloading packages:
http://192.168.17.128/yum/base-pkg/C...l5.noarch.rpm:[Errno 14]HTTP Error 404:Not Found

Trying other mirror
createrepo-0.4.11-3.el5.noarch.failure:CentOS/createrepo-0.4.11-3.el5.noarch.rpm from base-local:[Errno 256]
No more mirrors to try.


This error (Errno 256) appears when I try to install gcc also.

I checked the following two URL's.

http://www.linuxquestions.org/questi...6/#post4012404

http://www.linuxquestions.org/questi...-error-561670/

One of them says "If you try to hit your yum repo URL in your browser you'll see it returns an HTTP 404 indicating the page does not exist".

I logged in as a normal user viz apache_test
and did this
elinks
http://192.168.17.128/yum/base-pkg


and it does show the list of all rpm's.

What am I doing wrong? Please help me to solve the issue.

Thank you.
 
Old 05-21-2011, 06:17 AM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi there,

1. No need to change the ownership of /var/www/html/yum/base-pkg.
2. Instead of running yum install createrepo, install it using rpm -ivh createrepo
3. If there is already a repodata directory under /var/www/html/yum/base-pkg then remove it.
4. Run createrepo /var/www/html/yum/base-pkg
5. Restart the httpd services and then try to run yum install
6. Also check if your firewall is allowing httpd requests to be processed.
 
1 members found this post helpful.
Old 05-21-2011, 07:15 AM   #3
nivedhitha
Member
 
Registered: Jul 2005
Posts: 32

Original Poster
Rep: Reputation: 0
Great, T3RM1NVT0R!. It works fine!

Thanks for all the clarification. Just one more thing - does the first step of making yum install work - which is to install createrepo - be always installed via rpm -ivh and not via yum install?. If yes, is it because you need createrepo to install rpm's, but createrepo itself cannot be installed without a repository in place. Catch 22! Am I right?
 
Old 05-21-2011, 07:29 AM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Exactly!!!

You cannot install createrepo using yum (until and unless you have some external repository setup to facilitate this) because you have to first use createrepo to setup your own repository for yum.

So you have to use rpm -ivh createrepo

and then continue with the steps.

Last edited by T3RM1NVT0R; 05-21-2011 at 07:30 AM.
 
1 members found this post helpful.
Old 05-22-2011, 12:45 AM   #5
nivedhitha
Member
 
Registered: Jul 2005
Posts: 32

Original Poster
Rep: Reputation: 0
Thanks very much for the confirmation, T3RM1NVT0R!
 
  


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
[Errno 256] No more mirrors to try peace18 Linux - Newbie 1 03-17-2011 01:00 PM
[SOLVED] yum [Errno 4] IOError sulekha Fedora 3 10-16-2010 03:23 PM
FC5 - Anaconda install problem x86-64 [Errno 256] RottenMutt Fedora 31 09-25-2006 10:21 PM
errno 256 The Redneck Linux - Software 4 08-02-2006 10:21 PM
Yum Errno -1 after installing gimp2 from fedora.us - testing resiak Linux - Software 1 08-15-2005 05:40 PM

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

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