RPM installation via http

Rick Stevens rstevens at vitalstream.com
Wed Sep 6 21:13:31 UTC 2006


On Wed, 2006-09-06 at 14:24 -0600, redhat at buglecreek.com wrote:
> On Wed, 06 Sep 2006 11:28:05 -0700, "Rick Stevens"
> <rstevens at vitalstream.com> said:
> > On Wed, 2006-09-06 at 11:36 -0600, redhat at buglecreek.com wrote:
> > > Is anyone aware of a way to install multiple rpm packages via a http
> > > server on a local lan.  For example, two systems running the same
> > > version of redhat os. One server has apache running on it and has all
> > > the packages in /var/www/html/up2date/ via a sym link to
> > > /var/spool/up2date.  When I try to do rpm -Fvh
> > > http://192.168.100.2/up2date/*.rpm I get the following error: "error:
> > > File not found by glob: http://192.168.100.2/up2date/*.rpm"  When I try
> > > this with a specific rpm package name it works fine.  When I connect a
> > > browser to the http server all the packages are there.  I know I could
> > > use a nfs mount to accomplish this, but would like to do this via http
> > > if possible.  We have all the entitlements to cover the various boxes,
> > > but due to bandwidth issues at field offices it would be nice to be able
> > > to share these updates between like boxes on local lans without having
> > > to hit rhn or
> > > our HQ rhn proxy.
> > 
> > You have to remember that globbing on a command is processed by the
> > shell BEFORE the command is executed.  The glob won't work on HTTP or
> > FTP operations since the shell doesn't know how to use HTTP or FTP to
> > get filelists.  I think rpm itself is smart enough to do what you need,
> > so you might try the command:
> > 
> > 	rpm -Fvh http://192.168.100.2/up2date
> > 
> > That way rpm will pick up the filelist.
> > 
> Tried your suggestion with the following results:
> > rpm -Fvh http://192.168.100.33/up2date/
> Retrieving http://192.168.100.33/up2date/
> /var/tmp/rpm-xfer.t8sHXB: not an rpm package (or package manifest):
> 
> Looking at /var/tmp/rpm-xfer.t8sHXB it appears to simply be a html page
> containing a directory listing of what is in /up2date.  Any other
> suggestions? 

Well, you can't do a wildcard (glob) thing and a pure http doesn't work
with rpm.  Hmmmm.  I see a couple of possibilities:

1. You could use nrh-up2date (http://nrh-up2date.sourceforge.net/)
to create a local up2date server on the HTTP server machine, then use
up2date and the nrh-up2date system as the repository.

2. To make globbing work, you could use wget to fetch all of the RPMs to
a local directory and use "rpm -Fvh /path/to/RPM/download/*.rpm" to do
the update.  A USB or firewire external drive is good for this.  A 20G
USB drive is only US $50 or so now and should be plenty large enough.

3. You could burn a CD or DVD with the RPMs on the server, mount it on
the client and run rpm against it ("rpm -Fvh /media/cdrom/*.rpm").

4. You could convert the http directory to a YUM-style repository,
download and install yum on the client machine (Fedora Core comes with
it) and update via "yum -y update".

The simplest one is number 2--if you have the spare disk space for it.
up2date is the standard updater for RHEL, yum is the standard for Fedora
Core and several others.  Both of them understand globbing and do it
internally.  rpm has the shell expand globs and obviously the shell
can't do it.

Sorry I don't have any other answers for you.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-    Overweight:  When you step on your dog's tail...and it dies.    - 
----------------------------------------------------------------------




More information about the Redhat-install-list mailing list