[tools] Trouble connecting clients (0.8.4, RHEL4) via apt and yum
Chris Waltham
cwaltham at bowdoin.edu
Thu Nov 29 19:56:31 CET 2007
I've successfully installed 0.8.4 & downloaded an 'updates' and
'extras' set from RHN with my credentials. I would like to have a
rhel4as-i386 server serve RPMs to rhel4as-i386 clients; however I am
struggling a lot in terms of getting the clients to communicate with
the server. My preference is to use apt on the clients (I am very
inexperienced with yum, and I think I prefer apt).
I can successfully browse to http://host.name/mrepo/rhel4as-i386 on
the server; when I do I see the following directories that are all
populated with files:
RPMS.all, RPMS.extras, RPMS.os, RPMS.rhnlogin (this one is actually
empty), RPMS.updates, disc1, disc2, disc3, disc4, iso
If I point a browse to http://server.host.name/repo, I see the
following banner on how I may want to configure my client:
Network installation: Select "HTTP installation method" »
"server.host.name" » "/mrepo/rhel4as-i386/" during installation
Apt configuration: Add "rpm http://server.host.name /mrepo/rhel4as-
i386/ os updates repo1 repo2 ..." to /etc/apt/sources.list
Yum configuration: Add "baseurl=http://server.host.name/mrepo/rhel4as-i386/RPMS.repo
" to /etc/yum.conf
I believe that the name of my repository is simply "rhel4as"; here is
the contents of /etc/mrepo.conf on the mrepo server:
[main]
srcdir = /var/mrepo
wwwdir = /var/www/mrepo
confdir = /etc/mrepo.conf.d
arch = i386
mailto = root at localhost
smtp-server = localhost
rhnlogin = username:secretpass
[rhel4as]
name = Red Hat Enterprise Server $release U3 ($arch)
release = 4
rhnrelease = 4AS
arch = i386
metadata = apt yum
iso = RHEL$release-U3-$arch-AS-disc?.iso
updates = rhn:///rhel-$arch-as-$release
extras = rhn:///rhel-$arch-as-$release-extras
#dag = rsync://apt.sw.be/pub/freshrpms/pub/dag/redhat/el$release/en/
$arch/RPMS.$repo/
Given that my preference is to use apt, here is the contents of /etc/
apt/sources.list on one of my clients:
rpm http://server.host.name /mrepo/rhel4as-i386/ os updates rhel4as
Now, when I try and run a simple "apt-get update" on the client, this
is what I get:
[root at client.host.name apt]# apt-get update
E: Malformed line 1 in source list /etc/apt/sources.list (Absolute dist)
Am I not actually able to point apt-get at a mrepo server? Should I be
changing the /etc/sysconfig/rhn/sources file instead? I am not sure
which one I would prefer to change. I tried to guess at what the error
message from apt-get meant, I thought that perhaps it wants to
automatically determine the architecture of the machine, instead of
letting me hard-code it. Because the name of my repo is simply
"rhel4as", I tried this as a line in /etc/apt/sources.list:
rpm http://server.host.name/mrepo/ rhel$(VERSION)as-$(ARCH) os updates
extras
Unfortunately, that didn't work either:
[root at client.host.name apt]# apt-get update
Ign http://server.host.name rhel4as-i386 release
25% [Connecting to apt.sw.be]
^C^C^C^C
To be honest, I am confused about one thing: should I be using up2date
combined with an _apt repository_ to update my clients, or should I be
using apt-get directly? Or is either one possible? Moving on to using
up2date (with apt or yum), I encountered more fatal errors. Using the
following line in my client's /etc/sysconfig/rhn/sources:
apt all http://server.host.name/mrepo rhel4as-i386 os extras updates
local
Was unsuccessful, as it produced this error:
[root at client ~]# up2date -u
There was a fatal error communicating with the server. The message was:
An HTTP error occurred:
URL: http://server.host.name/mrepo/rhel4as-i386/base/pkglist.os.bz2
Status Code: 404
Error Message: Not Found
After updating and then forcefully re-generating the repositories on
my server, I still cannot find pkglist.os.bz2 anywhere on the server's
filesystem. My next step was to try using yum, with /etc/sysconfig/rhn/
sources on my client looking like this:
yum base http://server.host.name/mrepo/rhel4as-$ARCH/RPMS.os/
yum updates http://server.host.name/mrepo/rhel4as-$ARCH/RPMS.updates/
yum extras http://server.host.name/mrepo/rhel4as-$ARCH/RPMS.extras/
Now, I get a different error:
[root at client.host.name ~]# up2date --showall
An error has occurred:
An HTTP error occurred:
URL: http://server.host.name/mrepo/rhel4as-i386/RPMS.os//headers/header.info
Status Code: 404
Error Message: Not Found
See /var/log/up2date for more information
Like before, header.info does not exist anywhere on the mrepo server's
filesystem. At this point, I am simply out of ideas. Could someone
please help get me moving in the right direction? For me, the simplest
solution would be to have the client's up2date point at an apt
repository, or have the client run apt-get update directly.
Thanks,
Chris
More information about the tools
mailing list