Installation Manual for 2.17 on Oracle (and related) Linux

From WeBWorK_wiki
Revision as of 14:45, 10 September 2022 by Alex Jordan (talk | contribs)
Jump to navigation Jump to search

Under Construction

These instructions cover the installation of WeBWorK 2.17 from scratch onto an Oracle Linux server. These instructions might work on related Linux distributions, but here and there the details may differ. It may help to cross-reference with other OS-specific installation guides at Manual Installation Guides.

If you are just upgrading WeBWorK, especially if you already have existing WeBWorK courses, see Upgrading WeBWorK from 2.16 to 2.17.

OS Users

These instructions reference four OS users.

  • You should have a personal account with sudo privileges. These instructions will use "myname" as the name of that user.
  • root
  • apache
  • wwadmin (we will create below)

It can be critical that you act as whatever user these instructions tell you to act as at each step. Do not act as root unless specifically instructed to.

Furthermore, when you will need to act as root, either use sudo su or sudo <command> as the instructions say. In certain places, actually switching users to root with sudo su or entering a root shell when a mere sudo someCommand was indicated will result in bad things that will not become apparent until later in the installation.


Now some comments on notation we will be using. We will use <key> to indicate that you should press a specific key (e.g. <Enter>, <Tab>, <F12>, etc.). Sometimes we will also use e.g. <wwadmin password> to indicate you have to enter the wwadmin password.

  • Code blocks that begin with $ should be run as myname.
  • Code blocks that begin with # should be run as root (via either a root shell or switching users to root with sudo su).
  • Code blocks that begin with @ should be run as wwadmin (for which you can use sudo su wwadmin).

You are not intended to type the $, or #, or @ characters as part of the provided commands.


We assume that you already have Oracle (or a closely related Linix distribution) installed, but that you haven't done much with yet.

We assume that you have a user account myname with sudo privileges.

Create wwadmin

$ sudo useradd wwadmin

Install MariaDB

After logging in to your server:

$ sudo yum install mariadb-server mariadb-connector-c mariadb-connector-c-devel

Answer y if it asks if this is OK. (For the remainder of these instructions, such trivial details might be omitted.) Now fire it up.

$ sudo systemctl enable mariadb
$ sudo systemctl start mariadb

Check that it is active with

$ sudo systemctl status mariadb

Now secure the server.

$ sudo mysql_secure_installation

This asks you for the database root password, which is nothing at this point. You should just hit <Enter>. Next there are five questions. Answer as indicated:

  • Set root password? n
  • Remove anonymous users? n
  • Disallow root login remotely? Y
  • Remove test database and access to it? Y
  • Reload privilege tables now? Y

Test that things work:

$ sudo mysql

You should see something close to:

Welcome to the MariaDB monitor.  Commands end with ; or \g.

MariaDB [(none)]> 

Now lets check the MariaDB users. To see the users, do the following

MariaDB> SELECT user,authentication_string,plugin,host FROM mysql.user;

You should see a table with only three users: root, root and root, each with a different host.

Now exit MariaDB

MariaDB> exit

Check perl version

The Oracle distribution used for this installation write-up has perl 5.26.3. Check if perl is installed and what its version is.

$ perl --version

Apache 2 and mod_perl

Install apache (httpd) and mod_perl.

$ sudo yum install httpd
$ sudo yum install mod_perl
$ sudo yum install libapreq2

Enable httpd service.

$ sudo systemctl enable httpd.service

Now enable the MPM-prefork module (and disable the MPM-event module)

$ sudo vim /etc/httpd/conf.modules.d/00-mpm.conf

Uncomment the mpm_prefork_module statement and comment out the mpm_event_module

LoadModule mpm_prefork_module modules/
#LoadModule mpm_event_module modules/

Next we add configuration files that will add the mod_perl and Apache request modules.

$ sudo vim /etc/httpd/conf.modules.d/02-perl.conf

Add the line LoadModule perl_module modules/ and save the file.

$ sudo vim /etc/httpd/conf.modules.d/apreq.conf

Add the line LoadModule apreq_module modules/ and save the file.

Then we configure Apache with our basic server info

$ sudo vim /etc/httpd/conf/httpd.conf

Uncomment and change the server name:


And finally, we need to make sure that the shared libraries have been properly identified

$ sudo ldconfig -v

You should now be able to start up the httpd service

$ sudo systemctl start httpd

Check its status just to confirm it's up.

$ sudo systemctl status httpd

For this installation write-up, the server's fully qualified domain name was already set up. You can confirm if this is the case for you by running:

$ hostname; hostname --fqdn

If your server's fully qualified domain name is not yet set up, run the command

$ sudo hostnamectl set-hostname <webwork>

where of course you should replace <webwork> by whatever your server's name is.

Again, you can check these settings by running the commands

$ hostname; hostname --fqdn

The first gives the server's fully qualified domain name (e.g. and the second the server's name (e.g. webwork).

Note that if your server can not find its fully qualified domain name, certain tools may not start.

Now restart Apache

$ sudo systemctl restart httpd

and test your server by connecting to your server from a web browser using the fully qualified domain name. You should see the Apache 2 Test Page indicating that Apache is running.

Install LaTeX

The Oracle/RHEL package for texlive is likely to be a few years out of date, so we will install texlive directly. At the time of this installation write-up, the current version is 2022. In the steps that follow, replace "2022" with whatever is current.

$ cd /tmp # working directory of your choice
$ sudo yum install wget
$ wget
$ zcat install-tl-unx.tar.gz | tar xf -
$ cd install-tl-*/
$ sudo perl ./install-tl --no-interaction

This could take a while because it is a full installation. A full installation is probably unnecessary, but now that WeBWorK can use LaTeX to make images, it's simpler to just go ahead and install everything so you are not surprised later by a missing package. When it is complete, you might want to change the default paper size from A4 to letter and/or clean up the installation files.

$ tlmgr paper letter
$ cd ..
$ rm -r install-tl* 

You should prepend /usr/local/texlive/YYYY/bin/PLATFORM to your PATH. But change YYYY appropriately, e.g., /usr/local/texlive/2022/bin/x86_64-linux. Later we will configure WeBWorK to know exactly where the latex executables are, so this may not be necessary. But it will let us use the check_latex script a bit later.

More to come; this page is under construction