Forum archive 2000-2006

Arnold K. Pizer - Installing WeBWorK on Redhat Linux 8.0

Arnold K. Pizer - Installing WeBWorK on Redhat Linux 8.0

by Arnold Pizer -
Number of replies: 0
inactiveTopicInstalling WeBWorK on Redhat Linux 8.0 topic started 10/16/2002; 5:40:08 AM
last post 10/16/2002; 5:40:08 AM
userArnold K. Pizer - Installing WeBWorK on Redhat Linux 8.0  blueArrow
10/16/2002; 5:40:08 AM (reads: 12257, responses: 0)

Installing WeBWorK on a Red Hat Linux 8.0 System

For WeBWorK version 1.8
Samuel Hathaway <sh002i@math.rochester.edu>;
Arnold Pizer <apizer@math.rochester.edu>;


This document details the setup and configuration of Red Hat 8.0 for use with WeBWorK. Use it along with the Installing WeBWorK on a Linux System document. Before beginning the installation, you should also consult the Red Hat 8.0 Installation Guide at http://www.redhat.com/docs/.


Step 1: During the Red Hat installation

While installing Red Hat Linux, there are several options that are important to WeBWorK. These are listed below with recommended settings.

Install Type: This affects which packages we will need to install later. We recommend "Server".

Firewall Configuration: If you choose to install a firewall, keep in mind that WeBWorK requires incoming HTTP connections, and you may benefit from allowing other types of inconming connections (such as telnet, SSH, FTP, or SCP) for professors. SSH and SCP servers are installed by default on the "Server System" install type, so opening those ports in your firewall configuration will enable those services.

Account Configuration: Make sure you create at least one user account, in addition to the root account. You can use this user account as the "regular user account" in the setup of WeBWorK.

Package Group Selection: This option is only shown if you choose the "Server System" install type. Here are our recommended selections:

  • the "X Window System" package
  • the "GNOME Desktop Environment" package
  • the "Editors" package
  • mozilla in the "Graphical internet" package
  • the "Authoring and Publishing" package
  • the "Server Configuration Tools" package
  • the "Web Server" package
  • the "Development Tools" package
  • the "Administration Tools" package
Also check "Select individual packages" at the bottom. Install the following individual package.

packagedirectorypackage names
gd-develDevelopment->Librariesgd-devel

Also select any other packages you want to install at this time (e.g. your favorite editor if it wasn't listed in the "Editors" package). When RedHat checks for dependencies, accept the default of installing additional packages to resolve all dependencies (if any).

 

Step 2: system configuration

 

You can use RedHat's system configuration tools to replace several of the command-line operations in the Installing WeBWorK on a Linux System document. To access these tools, click Main Menu and then System or Server Settings (you will be asked for the root password). In the Red Hat User Manager, under Preferences, uncheck "Filter system users and groups" so you can see all users, e.g. apache.

shell taskconfiguration tool
useradd, usermod, userdelSystem Settings->Users and Groups->Add User
groupadd, groupmod, groupdelSystem Settings->Users and Groups->Add Group
/etc/init.d/httpd, adding apache to rc filesServer Settings->Services

 

Step 3: Starting apache

  1. Click Main Menu, Server Settings, Services (you will be asked for the root password).
  2. Select httpd from the list of services.
  3. Click "Start". It is at the top of the panel. After a moment, there should be a message that apache has started.
  4. Check the "Start at Boot" checkbox.
  5. Click "Save" and then close Service Configuration

Apache is now started, and will start whenever the computer is rebooted. To verify that apache is working, open Mozilla and open http://localhost/. You should see a page titled "Test Page".

 

Step 4: Read Installing WeBWorK on a Linux System

At this point, begin reading the Installing WeBWorK on a Linux System document. Keep the following in mind:

  • Perl is already compiled with GDBM database support.
  • See Step 5. for instructions for installing CGI.pm and Step 6. for instructions on installing GD.pm.
  • The full path to perl is /usr/bin/perl which you will need to enter when running the WeBWorK set up script.
  • You still have to configure LaTeX2HTML. The configuration file is: /usr/share/latex2html/l2hconf.pm. Edit it by setting
    $PK_GENERATION = 1
    $DVIPS_MODE = 'toshiba'
    $METAFONT_DPI = 180
  • You need to install TTH.
    Get the linux version, untar it
    > tar -xzf tth_linux.tar.gz
    and then as root copy it to /usr/bin/
    # cp tth_linux/tth /usr/bin
  • See Step 7. for instructions for installing dvipng.
  • Apache on Red Hat 8.0 runs as the user apache in the group apache. When the installaton instructions refer to the user wwserver and the group wwserver, you can substitute apache.
  • Apache's configuration file httpd.conf is located in the directory /etc/httpd/conf/ .
  • Apache's DocumentRoot is /var/www/html/ and cgi-bin directory is /var/www/cgi-bin/ .
  • You will want to use the "ScriptAlias" method of linking WeBWorK's cgi directory to the web server, rather than the symlink method. Be careful to put the ScriptAlias for WeBWorK before the ScriptAlias for cgi-bin in httpd.conf.

 

Step 5: Install CGI.pm

CGI.pm is a core module and is supposed to be contained in a stardard perl installation but it is not part of Red Hat's perl. To install it simply add CGI to the list of modules CPAN installs:
# perl -MCPAN -e shell
cpan> install HTML::Parser Net::SMTP MIME::Base64 CGI

 

Step 6: Install GD.pm

First if you missed installing gd-devel-1.8.4-9.i386.rpm in the initial set up, install it now. It's on the second installation diskette psyche-i386-disc2. Next link libpng and libjpeg. As root
# cd /usr/lib
# ln -s libpng.so.3 libpng.so
# ln -s libjpeg.so.62.0.0 libjpeg.so

Now we are ready to install the GD module. Currently (Fall 2002) if you use CPAN to install GD, it will install the 2.01 version of GD.pm which requires the beta 2.0.1 version of gd. Unfortunately there is a known bug in gd 2.0.1 which prevents it from drawing horizontal dashed lines. We recommend using gd 1.8.4 and GD 1.33. gd 1.8.4 is on your system. For GD, go to http://stein.cshl.org/WWW/software/GD/.

As a normal user, download the tar/gzip archive for version 1.33 (or 1.29) and untar it:

> tar -xzf GD.pm.tar.gz
then cd to the GD-1.33 subdirectory, make a copy of Makefile.PL, and then edit Makefile.PL replacing lines 6 and 7
my @INC     = qw(-I/usr/local/include -I/usr/local/include/gd);
my @LIBPATH = qw(-L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/local/lib );
by
my @INC     = qw(-I/usr/local/include  -I/usr/include -I/usr/local/include/gd);
my @LIBPATH = qw(-L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/local/lib -L/usr/lib);

Now run the commands:

> perl Makefile.PL (select JPEG but not FreeType or XPM support for WeBWorK))
> make

Then, as root, install it.

# make install
Note that we suggest you do not run make test as this will show all tests failing, but the installation is OK. You can test this by viewing graphs in WeBWorK or by running one of the sample perl scripts contained in the GD documentation.

 

Step 7: Install dvipng

First download dvipng from John Jones's site <a href="http://hobbes.la.asu.edu/webwork-stuff">http://hobbes.la.asu.edu/webwork-stuff . Then install it by running the following commands as root:
# tar -xzf for-dvipng.tar.gz
# cd for-dvipng/
# cd preview
# make install
# cd ../dvipng/
# cp dvipng /usr/bin/
# cd /usr/bin
# ldd dvipng

 

Good luck!

 

<| Post or View Comments |>