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.