Assignment 2 - RPM Installation + Tarball Installation of Lynx Browser on a Redhat 7.3 System
INLS 183 - Distributed Systems (new window)
September 30, 2002
Send comments to: bhayes@email.unc.edu

Assignments Index Page
nbsp;

Background

Since I am primarily using the command line instead of the GUI desktop to learn my way around Linux 7.3 at this point, it would be helpful to have a command line, text-based browser with which to consult web sites for documentation, packages and other information. Also, unlike many of the other Linux RPMs, Lynx is a program I've used before and so feel quite comfortable installing since I know what it does.

To see the differences between an RPM package installation and a tarball installation firsthand, I will first do the RPM installation and then configure, compile and install a zipped lynx tarball package. I will install the tarball in a separate directory location and hopefully be able to run both versions.

Part I: RPM Installation (see script)

CONFIRM LYNX NOT ALREADY INSTALLED
I first ran "which lynx" and "locate lynx" to see if lynx was already installed on my system. Results of these commands indicate that it was not installed.

LOCATE AND RETRIEVE LYNX RPM FILE
I used a graphical web browser on my Linux GNOME desktop to browse ibiblio for a Lynx RPM file. I used wget to download lynx-2.8.4-18.i386.rpm from the distro.ibiblio.org site into my home directory. See script above for specific URL.

CONSULT RPM MAN AND HELP PAGES
After consulting the man (man rpm) and help (rpm --help) pages and determining the version of rpm I was running, I elected to bypass query options and proceed with installation. Next time I would run rpm -qpi and rpm -qpl first to get info on the uninstalled rpm and a listing of all the files (path included) it would install. I ran these commands after the installation to try them out. To install I opted to run rpm -Uv since -U installs if there is no preexisting installation but updates the existing installation if one exists. I thought -v would give me a verbose version of any installation messages but the messages were brief; on rereading man pages i see that -v (verbose) is for use with the query option rather than the install/update options. The rpm installation/update has to be run as root (sudo). I ran the rpm install from my home directory (/home/barrie)

VERIFYING AND TESTING THE LYNX RPM INSTALLATION
The installation took only a few seconds. To verify successful installation I entered "which lynx" and this time was given the path /usr/bin/lynx instead of "lynx: command not found" as I did before the installation. Though I ran the RPM installation from my home directory the RedHat Package Manager installed the program executable in /usr/bin, config files in /etc/ and support files in /usr/share/docs/lynx-2.8.4/, /usr/share/man/ and /usr/share/locale/. I ran rpm -qpl against the original (uninstalled) rpm file after the install and that listing showed the locations that the RPM installed. Again, this would be useful to run before the install next time to anticipate where files would be installed by the RPM.

FUNCTIONALITY
I tested functionality by running lynx and browsing successfully to html files on the Health Sciences Library's website. Up and Down arrow keys are used to move from hyperlink to hyperlink on a page; the ENTER key or the right arrow key are is to follow/select a hyperlink. Lynx is an easy brower to use; instructions for navigating and getting help are readily available at the bottom of the brower screen.

CONFUSING FINDINGS
After I confirmed installation with "which lynx" and tested its use in browsing a web site, I also ran "locate lynx" as myself and as root. The resulting output did not show /usr/bin/lynx or the paths to the /usr/share/docs and other locations cited above (see script). This made me think that perhaps something was amiss with the install so I tried to install again (rpm -iv). I received the message that the package was already installed. The curious thing is that I can now run "locate lynx" and see all the file paths i mentioned and that rpm -qpl indicated. In between I have rebooted the computer and I have begun the tarball installation (through tar -xf) of lynx. I'm not sure which explains the ability to "locate" all the lynx file locations. *Note: I've since learned that the RPM database is not updated immediately and actually on the order of once per day; this explains why the locate command would not immediately find my lynx install and why it did the following day.

FINAL RPM INSTALLATION CONFIRMATION
As final proof to myself that the rpm install was successful, I ran rpm -qi today prior to completing the tarball installation. The result below confirm successful install at the date/time of the RPM installion (from script):

# Final verification that RPM install was successfull; rpm -qi
Script started on Mon Sep 30 13:37:15 2002
[barrie@magnolia ~]$ ESC[Krpm -qi lynx^M
Name        : lynx                         Relocations: (not relocateable)
Version     : 2.8.4                             Vendor: Red Hat, Inc.
Release     : 18                            Build Date: Fri 15 Mar 2002 12:11:29 PM GMT-5
Install date: Sun 29 Sep 2002 09:03:47 PM GMT-5      Build Host: asok.devel.redhat.com
Group       : Applications/Internet         Source RPM: lynx-2.8.4-18.src.rpm
Size        : 4028658                          License: GPL
Packager    : Red Hat, Inc. 
URL         : http://lynx.isc.org/
Summary     : A text-based Web browser.
Description :
Lynx is a text-based Web browser. Lynx does not display any images,
but it does support frames, tables, and most other HTML tags. One
advantage Lynx has over graphical browsers is speed; Lynx starts and
exits quickly and swiftly displays webpages.
After the installations, I will need to consult the lynx documentation further and consider editing the lynx configuration file (lynx.cfg).

Part II: Tarball Installation (see script)

RETRIEVE LYNX TARBALL AND PREPARE TO INSTALL
I located a gzipped tar file for Lynx 2.8.4 on the Lynx web site and ran wget from the command line of of my Linux server to download the file to my home directory.
$wget http://lynx.isc.org/release/lynx2.8.4.tar.gz

Since I want to install this copy of Lynx in /usr/local, I become root (sudo) and copy the lynx2.8.4.tar.gz file there for unzipping, detarring, configuration, compilation and install steps. /usr/local is the usual installation location for packages that Linux admins manually compile and install. This is also a different location than the /usr/bin location where RPM installed the Lynx RPM package. Installing them in separate locations should keep them from conflicting/overwriting each other.
$sudo cp lynx2.8.4.tar.gz /usr/local

Unzip the file:
$sudo gunzip lynx2.8.4.tar.gz

Check to make sure package will create its own directory for its unpacked files
$sudo tar tf lynx2.8.4.tar | head - (lynx will create directory lynx2-8-4 and put files there)

Since lynx will create its own directory, go ahead and detar the file
$sudo tar xf lynx2.8.4.tar

Since it will go ahead and detar the file
$sudo tar xf lynx2.8.4.tar

Since it will go ahead and detar the file
$sudo tar xf lynx2.8.4.tar

CONSULT LYNX README AND INSTALLATION FILES + ./configure --help
After consulting the README, INSTALLATION and configure help files, I proceeded to configure and compile (make) lynx for installation. The INSTALLATION file confirmed this was the proper process for compiling lynx. This file also noted that lynx require a curses library, preferably ncurses or slang. "locate ncurses" indicates that ncurses are installed on the system.

Based on ./configure --help options, I ran ./configure --prefix=/usr/local --exec-prefix=/usr/local to ensure that all package files would be installed in /usr/local and not conflict with the previous RPM installed package.

CONFIGURE, COMPILE (MAKE) AND INSTALL LYNX PACKAGE

Configure - this took about a minute
$ sudo ./configure --prefix=/usr/local --exec-prefix=/usr/local

Compile - this took about 1.5 minutes
$ sudo make

Test on local file per recommendations of INSTALLATION file
$ ./lynx samples/jumpsUnix.html - this failed to work

Test to see if Lynx can find lynx.cfg
$ ./lynx -cfg=/usr/local/lib/lynx.cfg . - this failed to work

INSTALLATION PROBLEMS, INITIAL TROUBLESHOOTING, REGROUP
At this point I have tried copying the lynx.cfg file into the lib directory and rerun tests above with no luck; lynx still cannot find the file. Also I have renamed the config.cache file to config.cache.TRY1 and rerun ./configure (without options this time) and make. Tests of /usr/local/lynx with reading a local html file and with finding lynx.cfg file in /usr/local/lib/ have both failed again. I will need to reconsult INSTALLATION and ./configure --help and perhaps additional documentation before I'll be able to get this 2nd Lynx install to work. The original Lynx installation (RPM) contiinues to work thankfully.

nbsp; Send comments to: bhayes@email.unc.edu