Difference between revisions of "Installation Manual for 2.3 on Debian 4.0"
(New page: {{Historical}} These instructions cover the installation of the Debain Linux 4.0 operating system and %WW% 2.3 from scratch. They are more detailed (but offer fewer choices and often l...) |
(tag as Historical & Deprecated, add link to Github page) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Historical}} |
{{Historical}} |
||
− | These instructions cover the installation of the Debain Linux 4.0 operating system and %WW% 2.3 from scratch. |
||
+ | |||
+ | {{Deprecated|2.6. For up-to-date information view [[Github]]}} |
||
+ | |||
+ | |||
+ | ''See also:'' [[History of WeBWorK version control]] |
||
+ | |||
+ | |||
+ | These instructions cover the installation of the Debain Linux 4.0 operating system and WeBWorK 2.3 from scratch. |
||
They are more detailed (but offer fewer choices and often less background information) than the general InstallationManualV2pt3 and are aimed at non unix experts. Readers may want to quickly scan InstallationManualV2pt3 to get an overview of the installation process and then carefully read and follow these instructions. |
They are more detailed (but offer fewer choices and often less background information) than the general InstallationManualV2pt3 and are aimed at non unix experts. Readers may want to quickly scan InstallationManualV2pt3 to get an overview of the installation process and then carefully read and follow these instructions. |
||
− | + | == Notation == |
|
First some short comments on notation we will be using. |
First some short comments on notation we will be using. |
||
− | We will use |
+ | We will use <code><key></code> to indicate that you should press a specific key (e.g. |
− | + | <code><Enter></code>, <code><Tab></code>, <code><F12></code>, etc.). Sometimes we will also use e.g. |
|
− | + | <code><root password></code> to indicate you have to enter the root password. |
|
− | + | <code>^</code> will indicate the <code><Ctrl></code> key so e.g. <code>^X</code> is really shorthand for |
|
− | + | <code><Ctrl> <X></code>, i.e. press the Ctrl key and hit the X key. |
|
We will give references to specific versions of software, e.g. httpd-2.2.4.tar.gz rather than |
We will give references to specific versions of software, e.g. httpd-2.2.4.tar.gz rather than |
||
the more general httpd-2.x.x.tar.gz. In most cases you should be able to use the latest stable version but we have only tested the versions listed. |
the more general httpd-2.x.x.tar.gz. In most cases you should be able to use the latest stable version but we have only tested the versions listed. |
||
− | + | == Installing the Debian 4.0 rev0 Linux Operating System == |
|
− | + | ===Installation DVD === |
|
− | Obtain the installation DVD/CD set. Connect to [[http://www.debian.org/distrib/]] for information. For example you can use |
+ | Obtain the installation DVD/CD set. Connect to [[http://www.debian.org/distrib/|http://www.debian.org/distrib/]] for information. For example you can use wxDownload Fast or BitTorrent to download ISO images of the installation DVD's and then burn your own installation DVD's. If you download ISO images, make sure that you verify the integrity of the downloaded files by comparing the MD5 checksums of the downloaded files with the MD5 checksums listed at www.debian.org. wxDownload Fast automatically calculates the MD5 checksums which is convenient. I have had good luck downloading from mirrors.kernel.org but your experience may differ. These instructions will assume you have the three installation DVD's but installing from a commercial DVD/CD set or a downloaded CD set or from the net should be essentially identical. |
Place the first installation DVD in your DVD drive, turn the computer off and then back on, and boot your computer from the DVD drive. You may have to press <F12> during the boot process to bring up a boot menu which will allow you to select booting from the DVD. Or you many have to edit the BIOS to select the DVD as the first boot device. Note that with version 3.1 I had to physically turn the computer off and then turn it back on (not just reboot it) in order for the network card to be recognized by Debian but version 4.0 worked OK with just rebooting. |
Place the first installation DVD in your DVD drive, turn the computer off and then back on, and boot your computer from the DVD drive. You may have to press <F12> during the boot process to bring up a boot menu which will allow you to select booting from the DVD. Or you many have to edit the BIOS to select the DVD as the first boot device. Note that with version 3.1 I had to physically turn the computer off and then turn it back on (not just reboot it) in order for the network card to be recognized by Debian but version 4.0 worked OK with just rebooting. |
||
Line 26: | Line 33: | ||
You will see a list of options. |
You will see a list of options. |
||
− | + | # If you want hit <code><F1></code> to obtain help and see additional boot methods |
|
− | + | # You can just hit <code><Enter></code> to accept the default install method except in the following situation |
|
− | + | # If your network has DHCP enabled but you want to setup your server with a static IP address, then after the <code>boot:</code> prompt type <code>install netcfg/disable_dhcp=true</code> and then hit <code><Enter></code> |
|
− | + | # A succession of pages follow, for each select the obvious option and hit <code><Enter></code>. For example my obvious options are <code>English</code>, <code>United States</code>, and <code>American English</code> |
|
− | + | # The system will than scan your DVD and load various components |
|
− | + | # If your system has multiple network interfaces, you will be asked to select the one to be used during the installation (which will usually be a hard wired ethernet connection) |
|
− | + | # Unless you entered the <code>netcfg/disable_dhcp=true</code> boot option above, the system will try to configure your network using DHCP. If you have DHCP, your network interface will be set up automatically. If you don't have DHCP, automatic network configuration will fail quickly (or just hit <code><Enter></code> to <code>Cancel</code> if you are impatient). Then hit <code><Enter></code> to <code>Continue</code> |
|
Manual network configuration. If your network interface was set up automatically by DHCP, you can skip the rest of this paragraph. Otherwise you will have to enter your machine's static ip address, etc. To do this |
Manual network configuration. If your network interface was set up automatically by DHCP, you can skip the rest of this paragraph. Otherwise you will have to enter your machine's static ip address, etc. To do this |
||
− | + | # Select <code>Configure network manually</code> |
|
− | + | # Enter your computer's IP address and <code>Continue</code> |
|
− | + | # The <code>netask</code> is probably OK as it but another possibility may be 255.255.0.0 |
|
− | + | # Enter the ip address of your gateway router. Debian makes a good guess at this, but your network may be set up differently. |
|
− | + | # Next enter the ip address(es) of up to 3 nameservers separated by spaces (at a minimum you have to enter the ip address one nameserver) |
|
− | + | # Enter the name of your server and then |
|
− | + | # Enter the domain name (e.g. mine is math.rochester.edu but yours is obviously different) |
|
− | + | # This completes the static ip address setup |
|
− | Next comes the |
+ | Next comes the <code>Partition disks</code> pages. You should be able to accept the defaults (unless you are dual booting operating systems, etc. but then you are not a novice user and you are on your own for that part) |
− | + | # Select your time zone and wait for the clock to be configured |
|
− | + | # Enter the password for the root user and confirm it. '''Do not forget what you enter here''' |
|
− | + | # Choose to create a <code>normal user</code> and enter yourself as a user (with user name and password) |
|
− | + | # Now the base installation will take place --- this may take a short time |
|
− | + | # Choose to set up a network mirror. Select your country and a mirror. In the US I have found that mirrors.kernel.org works well |
|
− | + | # You should be able to leave the proxy information blank |
|
− | + | # I chose not to participate in the package usage survey |
|
Next we come to software selection. Since it is much easier for a non unix expert to use a graphical user interface (GUI), we will install this. We will put off installing the necessary web server software until later. |
Next we come to software selection. Since it is much easier for a non unix expert to use a graphical user interface (GUI), we will install this. We will put off installing the necessary web server software until later. |
||
− | + | # Under <code>Software selection</code> select <code>Desktop environment</code> and <code>Standard system</code> and then hit <code>Continue</code> |
|
− | + | # Now sit back and relax while the installation takes place --- this may take awhile |
|
− | + | # The last step is to install the boot loader. I have a non standard setup and for some reason I had trouble installing the Grub boot loader but Lilo worked fine. Almost certainly, Grub will work fine for you |
|
− | + | ===Continue Installation === |
|
After this finishes the system will eject the DVD and ask you to reboot. Note that with version 3.1 I had to physically turn off the computer off and then turn it back on (not just reboot it) in order for the network card to be recognized but version 4.0 worked OK with just rebooting. |
After this finishes the system will eject the DVD and ask you to reboot. Note that with version 3.1 I had to physically turn off the computer off and then turn it back on (not just reboot it) in order for the network card to be recognized but version 4.0 worked OK with just rebooting. |
||
− | + | # Log into your regular account |
|
− | + | # Accept any available updates (you will see a popup window). You will have to enter the <code><root password></code> but (if you keep the defaults checked) it will be saved for this session. Then click <code>install Updates</code>. Follow any instructions, e.g. if you install a new kernel, you may be told to reboot as soon as the installation is completed (to reboot, select <code>Desktop</code>, <code>Shut Down...</code> and then <code>Restart</code>) |
|
− | + | ===Debian Software Packages === |
|
Our next task is to install a number of Debian software packages. |
Our next task is to install a number of Debian software packages. |
||
− | + | # Select <code>Desktop</code>, <code>Administration</code> and then <code>Synaptic Package Manager</code>. You will have to enter the <code><root password></code> if you rebooted above. The <code>Synaptic Package Manager</code> window will open |
|
− | + | # First we make sure the package information is current. Select <code>Edit</code> and then <code>Add CD-ROM...</code> |
|
− | + | # Place the second Debian DVD/CD in the DVD drive and it will be scanned for index files (the first one has already been scanned) |
|
− | + | # Continue until you have scanned all of your remaining DVD/CD's and then select <code><No></code> to the <code>Scan another CD</code> question |
|
− | Now we will actually select and install a large number of packages. The process is the same for all packages. I'll give an example of installing |
+ | Now we will actually select and install a large number of packages. The process is the same for all packages. I'll give an example of installing <code>libapache-authnetldap-perl</code> and then just give the list of required packages. |
− | + | # Select <code>Search</code> |
|
− | + | # Under <code>Look in:</code> select <code>Name</code>. The default <code>Description and Name</code> sometimes returns too many possibilities |
|
− | + | # We are searching for <code>libapache-authnetldap-perl</code> so enter <code>ldap-perl</code> (or something similar) and click on <code>Search</code> |
|
− | + | # This should result in 3 possibilities. Select and Mark for Installation (by double clicking or checking and then selecting <code>Mark for Installation</code>) <code>libapache-authnetldap-perl</code>. You will see a pop up window <code>Mark additional required changes?</code> and you should always click <code>Mark</code> to accept the requirements. |
|
− | + | # Follow this basic procedure for all the packages listed below |
|
Here is the list of Debian packages that need to be installed. See InstallationManualV2pt3 for a short explanation of what most of these packages do. |
Here is the list of Debian packages that need to be installed. See InstallationManualV2pt3 for a short explanation of what most of these packages do. |
||
− | + | # <code>apache2</code> |
|
− | + | # <code>apache2-mpm-prefork</code> |
|
− | + | # <code>cvs</code> |
|
− | + | # <code>dvipng</code> |
|
− | + | # <code>libapache-authnetldap-perl</code> |
|
− | + | # <code>libapache2-request-perl</code> |
|
− | + | # <code>libdatetime-perl</code> |
|
− | + | # <code>libdbd-mysql-perl</code> |
|
− | + | # <code>libemail-address-perl</code> |
|
− | + | # <code>libextutils-xsbuilder-perl</code> |
|
− | + | # <code>libgd-gd2-perl</code> |
|
− | + | # <code>libmail-sender-perl</code> |
|
− | + | # <code>libossp-uuid-perl</code> |
|
− | + | # <code>libstring-shellquote-perl</code> |
|
− | + | # <code>libtimedate-perl</code> |
|
− | + | # <code>libxml-parser-perl</code> |
|
− | + | # <code>libxml-writer-perl</code> |
|
− | + | # <code>mysql-server-5.0</code> |
|
− | + | # <code>netpbm</code> |
|
− | + | # <code>openssh-server</code> |
|
− | + | # <code>preview-latex-style</code> |
|
− | + | # <code>tetex-bin</code> |
|
− | + | # <code>tetex-extra</code> |
|
− | When I do this I see on the bottom of |
+ | When I do this I see on the bottom of <code>Synaptic Package Manager</code> window <code>61 to install/upgrade</code> (note that I didn't install <code>libapache-authnetldap-perl</code> separately; if you did your number will differ). |
− | Now click |
+ | Now click <code>Apply</code> and <code>Apply</code> again to confirm the changes. You will be prompted to insert DVD's. |
− | After the packages are successfully installed, you can close the |
+ | After the packages are successfully installed, you can close the <code>Synaptic Package Manager</code> and remove your last DVD. |
Line 118: | Line 125: | ||
− | + | ===Test Browser and Keyboard === |
|
− | After your desktop reappears, click on |
+ | After your desktop reappears, click on <code>Applications</code>, <code>Internet</code>, <code>Icewease Web Browser</code> and you should be connected to the world. |
Goto |
Goto |
||
− | [[http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt3forDebian4pt0]] |
+ | [[http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt3forDebian4pt0|http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt3forDebian4pt0]] |
where you can view this document and, if you want, copy commands that you need (see below). |
where you can view this document and, if you want, copy commands that you need (see below). |
||
− | Here's an aside on keystroke delay and repetition rate. If you are like me and find the keystroke delay too short (so that you often type "geeet" when you want to type "get"), do the following. Click |
+ | Here's an aside on keystroke delay and repetition rate. If you are like me and find the keystroke delay too short (so that you often type "geeet" when you want to type "get"), do the following. Click <code>Desktop</code>, <code>Preferences</code>, <code>Keyboard</code> and then increase the delay time interval and hit <code>Close</code>. |
− | + | == Terminal Window Notation and Use == |
|
Before installing and configuring additional software, we need to talk about terminal windows. |
Before installing and configuring additional software, we need to talk about terminal windows. |
||
− | To open a terminal window click |
+ | To open a terminal window click <code>Applications</code>, <code>Accessories</code> and then select <code>Terminal</code> for a normal user or |
− | + | <code>Root Terminal</code> for root. |
|
In a terminal window some commands will have to be run as root whereas |
In a terminal window some commands will have to be run as root whereas |
||
others should be run as a regular user. We will use # to indicate |
others should be run as a regular user. We will use # to indicate |
||
that the command is to be run as root e.g. |
that the command is to be run as root e.g. |
||
− | <verbatim> |
||
+ | |||
− | # visudo |
+ | # visudo |
− | </verbatim> |
||
and $ to indicate that the command is to be run as a normal user e.g. |
and $ to indicate that the command is to be run as a normal user e.g. |
||
− | <verbatim> |
||
− | $ cp .bashrc .bashrc.bak1 |
||
− | </verbatim> |
||
− | To execute the above commands you have to hit =<Enter>=. We'll just assume this. |
||
+ | $ cp .bashrc .bashrc.bak1 |
||
+ | |||
+ | To execute the above commands you have to hit <code><Enter></code>. We'll just assume this. |
||
After executing a command, often the system will respond with text (sometimes a lot of text!) which we will usually not repeat below. We only give the commands that you should execute. |
After executing a command, often the system will respond with text (sometimes a lot of text!) which we will usually not repeat below. We only give the commands that you should execute. |
||
Line 152: | Line 158: | ||
One is command and file name completion. If you are typing (e.g. |
One is command and file name completion. If you are typing (e.g. |
||
− | + | <code>ch</code>) and hit <code><tab></code> bash will complete the command or filename if it is |
|
unambiguous (or more precisely it will complete as much as possible). |
unambiguous (or more precisely it will complete as much as possible). |
||
− | If there are multiple possibilities (as in the case of |
+ | If there are multiple possibilities (as in the case of <code>ch</code>) nothing will |
− | happen (except you may hear a beep) and you can type more letter(s) and hit |
+ | happen (except you may hear a beep) and you can type more letter(s) and hit <code><tab></code> again. Or you can |
− | hit |
+ | hit <code><tab></code> a second time and you will see a list of all possible |
− | completions. E.g. entering |
+ | completions. E.g. entering <code>ch<tab><tab></code> gives a list of possible |
− | completions and |
+ | completions and <code>ch<tab>g<tab></code> (or <code>chg<tab></code>) gives <code>chgrp</code>, the change group command. This |
is very fast and convenient and it also leads to fewer typing errors. |
is very fast and convenient and it also leads to fewer typing errors. |
||
Line 166: | Line 172: | ||
is similar to a previous one, this is very useful. |
is similar to a previous one, this is very useful. |
||
− | You can copy commands from these instructions (with |
+ | You can copy commands from these instructions (with <code>copy</code> from the Edit dropdown list or <code>^C</code>) and paste them into a terminal window |
− | (with |
+ | (with <code>paste</code> from the Edit dropdown list or <code><Shift> <Ctrl> <V></code>). However typing yourself using command completion is probably just as fast except if a command is long. |
− | Finally perhaps a safer way to run commands as |
+ | Finally perhaps a safer way to run commands as <code>root</code> is to use the <code>sudo</code> command |
− | <verbatim> |
||
− | $ sudo <command> |
||
− | password: <your password> |
||
− | </verbatim> |
||
− | After you enter the password the command is executed. For a certain period (maybe 5 minutes) you can execute additional =sudo= commands without reentering =<your password>=. A log of all =sudo= commands is kept (I don't know where). In these instructions for the most part we will not use =sudo=, but keep it in mind for other times that you have to become =root= in order to execute a few commands (e.g. restarting =apache=). |
||
− | Note that in order to use sudo, you must be listed in the =sudoers= file. To do this open a =Root Terminal= and then |
||
− | <verbatim> |
||
− | # visudo |
||
− | </verbatim> |
||
− | A nano editing window will open up and you will be editing =/etc/sudoers.tmp= . At the end of this file add the line |
||
− | <verbatim> |
||
− | your_user_name ALL=(ALL) ALL |
||
− | </verbatim> |
||
− | where of course you replace =your_user_name= with your user name. Then hit =^X= to exit, =Y= to save changes and =<Enter>= to save changes to =/etc/sudoers.tmp=. Then =visudo= will automatically update the real =sudoers= file. It's a good practice to close the =Root Terminal= window so that you don't accidentally enter a command as root that you meant to run as a regular user. |
||
− | For our next terminal window task open a (standard) terminal window and create a =downloads= directory where we will keep copies of downloaded software. |
||
+ | $ sudo <command> |
||
+ | password: <your password> |
||
− | <verbatim> |
||
+ | After you enter the password the command is executed. For a certain period (maybe 5 minutes) you can execute additional <code>sudo</code> commands without reentering <code><your password></code>. A log of all <code>sudo</code> commands is kept (I don't know where). In these instructions for the most part we will not use <code>sudo</code>, but keep it in mind for other times that you have to become <code>root</code> in order to execute a few commands (e.g. restarting <code>apache</code>). |
||
− | $ cd |
||
+ | Note that in order to use sudo, you must be listed in the <code>sudoers</code> file. To do this open a <code>Root Terminal</code> and then |
||
− | $ mkdir downloads |
||
− | </verbatim> |
||
+ | # visudo |
||
+ | A nano editing window will open up and you will be editing <code>/etc/sudoers.tmp</code> . At the end of this file add the line |
||
− | ---++ Installing Perl Modules |
||
+ | your_user_name ALL=(ALL) ALL |
||
− | We now have to install one additional Perl module (=XML::Parser::EasyTree=) which is unfortunately not available from the Debian package system. |
||
− | ---+++ Testing Perl Modules |
||
+ | where of course you replace <code>your_user_name</code> with your user name. Then hit <code>^X</code> to exit, <code>Y</code> to save changes and <code><Enter></code> to save changes to <code>/etc/sudoers.tmp</code>. Then <code>visudo</code> will automatically update the real <code>sudoers</code> file. It's a good practice to close the <code>Root Terminal</code> window so that you don't accidentally enter a command as root that you meant to run as a regular user. |
||
− | To test if a Perl module is installed and working on your system, issue the following command, replacing =Module= with the name of the module: |
||
− | <verbatim> |
||
− | $ perl -MModule -e 'print "installed!\n"' |
||
− | </verbatim> |
||
− | If the module is installed you will see =installed!=. If not you will see at lot of gibberish. E.g. at this stage in our installation process =CPAN= is installed and =MXML::Parser::EasyTree= is not so |
||
+ | For our next terminal window task open a (standard) terminal window and create a <code>downloads</code> directory where we will keep copies of downloaded software. |
||
+ | |||
+ | $ cd |
||
+ | $ mkdir downloads |
||
+ | |||
+ | == Installing Perl Modules == |
||
+ | We now have to install one additional Perl module (<code>XML::Parser::EasyTree</code>) which is unfortunately not available from the Debian package system. |
||
+ | |||
+ | === Testing Perl Modules === |
||
+ | To test if a Perl module is installed and working on your system, issue the following command, replacing <code>Module</code> with the name of the module: |
||
+ | |||
+ | $ perl -MModule -e 'print "installed!\n"' |
||
+ | |||
+ | If the module is installed you will see <code>installed!</code>. If not you will see at lot of gibberish. E.g. at this stage in our installation process <code>CPAN</code> is installed and <code>MXML::Parser::EasyTree</code> is not so |
||
+ | |||
+ | $ perl -MCPAN -e 'print "installed!\n"' |
||
− | <verbatim> |
||
− | $ perl -MCPAN -e 'print "installed!\n"' |
||
− | </verbatim> |
||
yields |
yields |
||
− | <verbatim> |
||
+ | |||
− | installed! |
+ | installed! |
− | + | ||
and |
and |
||
− | <verbatim> |
||
+ | |||
− | $ perl -MXML::Parser::EasyTree -e 'print "installed!\n"' |
+ | $ perl -MXML::Parser::EasyTree -e 'print "installed!\n"' |
− | + | ||
yields |
yields |
||
− | <verbatim> |
||
− | Can't locate XML/Parser/EasyTree.pm in @INC (@INC contains: |
||
− | /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 |
||
− | ... |
||
− | </verbatim> |
||
+ | Can't locate XML/Parser/EasyTree.pm in @INC (@INC contains: |
||
+ | /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 |
||
+ | ... |
||
− | + | === Installing Additional Perl Modules from CPAN === |
|
Be aware that in rare cases you might have to |
Be aware that in rare cases you might have to |
||
as root run |
as root run |
||
− | <verbatim> |
||
+ | $ su |
||
− | $ su |
||
+ | <root password> |
||
− | <root password> |
||
+ | # unset LANG |
||
− | # unset LANG |
||
+ | # exit |
||
− | # exit |
||
+ | $ |
||
− | $ |
||
+ | |||
− | </verbatim> |
||
since otherwise the installation of some modules (Module::Build is an example) may fail. |
since otherwise the installation of some modules (Module::Build is an example) may fail. |
||
First we will set up CPAN. For this you have to be root. |
First we will set up CPAN. For this you have to be root. |
||
− | <verbatim> |
||
− | $ su |
||
− | <root password> |
||
− | # perl -MCPAN -e shell |
||
− | </verbatim> |
||
− | Since this is the first time you are using CPAN it will ask you =Are you ready for manual configuration?= |
||
− | Respond =no= and that should be it. |
||
− | Next we add at least one mirror and reload the index. A list of mirrors can be found at [[http://mirrors.cpan.org]]. To add the mirror ftp://mirrors.kernel.org/pub/CPAN and reload the index do the following. For me, a slow and inaccurate typist, copying (=^C=) and pasting (=<Shift> <Ctrl> <V>=) is much faster. |
||
+ | $ su |
||
− | <verbatim> |
||
+ | <root password> |
||
− | cpan> o conf urllist push ftp://mirrors.kernel.org/pub/CPAN |
||
+ | # perl -MCPAN -e shell |
||
− | cpan> reload index |
||
+ | |||
− | </verbatim> |
||
+ | Since this is the first time you are using CPAN it will ask you <code>Are you ready for manual configuration?</code> |
||
+ | Respond <code>no</code> and that should be it. |
||
+ | |||
+ | Next we add at least one mirror and reload the index. A list of mirrors can be found at [[http://mirrors.cpan.org|http://mirrors.cpan.org]]. To add the mirror ftp://mirrors.kernel.org/pub/CPAN and reload the index do the following. For me, a slow and inaccurate typist, copying (<code>^C</code>) and pasting (<code><Shift> <Ctrl> <V></code>) is much faster. |
||
+ | |||
+ | cpan> o conf urllist push ftp://mirrors.kernel.org/pub/CPAN |
||
+ | cpan> reload index |
||
Note that one time this failed when I tried to do it in the evening but when I tried again the next morning it worked fine. Now we update CPAN itself |
Note that one time this failed when I tried to do it in the evening but when I tried again the next morning it worked fine. Now we update CPAN itself |
||
− | <verbatim> |
||
+ | cpan> install Bundle::CPAN |
||
− | cpan> install Bundle::CPAN |
||
+ | |||
− | </verbatim> |
||
+ | and always hit <code><Enter></code> to accept the defaults when prompted. This can be a long process with many long pauses. Please be patient. |
||
− | and always hit =<Enter>= to accept the defaults when prompted. This can be a long process with many long pauses. Please be patient. |
||
When you again see the |
When you again see the |
||
− | <verbatim> |
||
+ | |||
− | cpan> |
+ | cpan> |
− | + | ||
prompt enter |
prompt enter |
||
− | <verbatim> |
||
+ | cpan> reload cpan |
||
− | cpan> |
+ | cpan> o conf commit |
− | cpan> o conf commit |
||
− | </verbatim> |
||
Now install XML::Parser::EasyTree |
Now install XML::Parser::EasyTree |
||
− | <verbatim> |
||
+ | |||
− | cpan> install XML::Parser::EasyTree |
+ | cpan> install XML::Parser::EasyTree |
− | + | ||
− | and in case you are prompted accept all defaults by just hitting |
+ | and in case you are prompted accept all defaults by just hitting <code><Enter></code>. |
− | Note that if you have more than one module to install, you can just list them after |
+ | Note that if you have more than one module to install, you can just list them after <code>install</code> separated by spaces. |
When you again see the |
When you again see the |
||
− | <verbatim> |
||
+ | |||
− | cpan> |
+ | cpan> |
− | + | ||
prompt enter |
prompt enter |
||
− | <verbatim> |
||
− | cpan> exit |
||
− | </verbatim> |
||
− | ---+++ Installing Additional Perl Modules from Source |
||
+ | cpan> exit |
||
− | At one point in time (August 2006), the installation of =DateTime= using CPAN was broken. Currently =DateTime= can be installed using CPAN. However it is useful to show you how to install perl modules from source in case one of the perl modules we installed above gets updated and its installation from CPAN becomes broken. If that happens you can follow the procedures outlined here to install the module from source. |
||
− | *IMPORTANT:* With Debian we have already installed =DateTime= so you don't have to install it as outlined below. We are just using this as an example of installing a module from source which hopefully you will never have to do. You can skip this section and go directly to the Apache 2 and mod_perl section. |
||
+ | === Installing Additional Perl Modules from Source === |
||
+ | At one point in time (August 2006), the installation of <code>DateTime</code> using CPAN was broken. Currently <code>DateTime</code> can be installed using CPAN. However it is useful to show you how to install perl modules from source in case one of the perl modules we installed above gets updated and its installation from CPAN becomes broken. If that happens you can follow the procedures outlined here to install the module from source. |
||
− | Now we give the example of installing =DateTime= from source. As we said you can skip this part. |
||
+ | '''IMPORTANT:''' With Debian we have already installed <code>DateTime</code> so you don't have to install it as outlined below. We are just using this as an example of installing a module from source which hopefully you will never have to do. You can skip this section and go directly to the Apache 2 and mod_perl section. |
||
− | Goto [[http://search.cpan.org/]], |
||
+ | Now we give the example of installing <code>DateTime</code> from source. As we said you can skip this part. |
||
− | search for =DateTime= and click on =DateTime=. Then near the top right download =DateTime-0.36.tar.gz= and save it to disk. Move it to your =downloads= directory. Then |
||
− | <verbatim> |
||
+ | Goto [[http://search.cpan.org/|http://search.cpan.org/]], |
||
− | $ cd |
||
+ | search for <code>DateTime</code> and click on <code>DateTime</code>. Then near the top right download <code>DateTime-0.36.tar.gz</code> and save it to disk. Move it to your <code>downloads</code> directory. Then |
||
− | $ cd downloads |
||
− | $ tar -zvxf DateTime-0.36.tar.gz |
||
− | $ cd DateTime-0.36/ |
||
+ | $ cd |
||
+ | $ cd downloads |
||
+ | $ tar -zvxf DateTime-0.36.tar.gz |
||
+ | $ cd DateTime-0.36/ |
||
+ | |||
+ | |||
+ | $ perl Makefile.PL |
||
+ | $ make |
||
+ | $ make test |
||
+ | |||
+ | If <code>make test</code> indicates something is missing you will have to install that. In fact in the case of <code>DateTime</code>, you would see that quite a few things are missing. |
||
+ | <code>DateTime</code> requires the additional modules <code>version</code> , <code>Module::Build</code> , <code>Class::Singleton</code> , <code>DateTime::TimeZone</code> and <code>DateTime::Locale</code> . We could install these using CPAN |
||
− | + | # perl -MCPAN -e shell |
|
− | + | cpan> install version Module::Build Class::Singleton DateTime::TimeZone DateTime::Locale |
|
− | + | cpan> exit |
|
− | + | # exit |
|
− | + | $ |
|
− | =DateTime= requires the additional modules =version= , =Module::Build= , =Class::Singleton= , =DateTime::TimeZone= and =DateTime::Locale= . We could install these using CPAN |
||
− | <verbatim> |
||
− | # perl -MCPAN -e shell |
||
− | cpan> install version Module::Build Class::Singleton DateTime::TimeZone DateTime::Locale |
||
− | cpan> exit |
||
− | # exit |
||
− | $ |
||
− | </verbatim> |
||
If you see anything that looks suspicious during this process, you can always test to see if the perl module in question was in fact installed. If it was not installed |
If you see anything that looks suspicious during this process, you can always test to see if the perl module in question was in fact installed. If it was not installed |
||
− | try CPAN first and if CPAN fails then install it from source. The great thing about CPAN (if it works) is that it will trace down and automatically install all required components. Note that if you get a message indicating that |
+ | try CPAN first and if CPAN fails then install it from source. The great thing about CPAN (if it works) is that it will trace down and automatically install all required components. Note that if you get a message indicating that <code>package/file.pm</code> was not found, you should serach for and install <code>package::file</code> since perl modules use a double colon (<code>::</code>) as a directory separator. |
Assuming all is OK |
Assuming all is OK |
||
− | <verbatim> |
||
+ | $su |
||
− | $su |
||
+ | <root password> |
||
− | <root password> |
||
+ | # make install |
||
− | # make install |
||
+ | # exit |
||
− | # exit |
||
+ | $ |
||
− | $ |
||
+ | |||
− | </verbatim> |
||
+ | Finally you should definitely test that the module (e.g. <code>DateTime</code>) was installed sucessfully |
||
− | Finally you should definitely test that the module (e.g. =DateTime=) was installed sucessfully |
||
+ | |||
− | <verbatim> |
||
+ | $ perl -MDateTime -e 'print "installed!\n"' |
||
− | $ perl -MDateTime -e 'print "installed!\n"' |
||
+ | |||
− | </verbatim> |
||
If you see |
If you see |
||
− | <verbatim> |
||
+ | |||
− | installed! |
+ | installed! |
− | + | ||
you can celebrate. |
you can celebrate. |
||
− | + | == Apache 2 and mod_perl == |
|
− | First we have to enable a couple apache modules. Open a |
+ | First we have to enable a couple apache modules. Open a <code>Root terminal</code> or keep acting as <code>root</code> in a standard terminal and |
− | < |
+ | <nowiki> |
# a2enmod apreq |
# a2enmod apreq |
||
# a2enmod info |
# a2enmod info |
||
− | </ |
+ | </nowiki> |
− | Next we make a copy of the apache configuration file for safekeeping. In the |
+ | Next we make a copy of the apache configuration file for safekeeping. In the <code>Root terminal</code> |
− | < |
+ | <nowiki> |
# cd /etc/apache2/ |
# cd /etc/apache2/ |
||
# cp apache2.conf apache2.conf.bak1 |
# cp apache2.conf apache2.conf.bak1 |
||
− | </ |
+ | </nowiki> |
− | Next we will edit the apache configuration file |
+ | Next we will edit the apache configuration file <code>apache2.conf</code> to allow us to view information about the setup and performance of the web server. Note that this is not absolutely necessary but it can be very useful. You can use your favorite editor but we will give instructions assuming you are using <code>gedit</code>. Note that you have to be root to edit <code>apache2.conf</code>. In the <code>Root terminal</code> |
− | < |
+ | <nowiki> |
# cd /etc/apache2/ |
# cd /etc/apache2/ |
||
# gedit apache2.conf |
# gedit apache2.conf |
||
− | </ |
+ | </nowiki> |
− | In the |
+ | In the <code>gedit</code> edit window near the end of the file uncomment (i.e. remove the <code>#</code> 's from) the operational lines below. Leave the obvious comment lines (<code># Allow server status reports ... domain to enable.</code> and <code># Allow remote server configuration reports... domain to enable.</code>) commented. |
The original lines are |
The original lines are |
||
− | <verbatim> |
||
− | #<IfModule mod_status.c> |
||
− | # |
||
− | # Allow server status reports generated by mod_status, |
||
− | # with the URL of http://servername/server-status |
||
− | # Change the ".example.com" to match your domain to enable. |
||
− | # |
||
− | #<Location /server-status> |
||
− | # SetHandler server-status |
||
− | # Order deny,allow |
||
− | # Deny from all |
||
− | # Allow from .example.com |
||
− | #</Location> |
||
− | #</IfModule> |
||
− | #<IfModule |
+ | #<IfModule mod_status.c> |
− | # |
+ | # |
− | # Allow |
+ | # Allow server status reports generated by mod_status, |
− | # http://servername/server- |
+ | # with the URL of http://servername/server-status |
− | # Change the ".example.com" to match your domain to enable. |
+ | # Change the ".example.com" to match your domain to enable. |
− | # |
+ | # |
− | #<Location /server- |
+ | #<Location /server-status> |
− | # SetHandler server- |
+ | # SetHandler server-status |
− | # Order deny,allow |
+ | # Order deny,allow |
− | # Deny from all |
+ | # Deny from all |
− | # Allow from .example.com |
+ | # Allow from .example.com |
− | #</Location> |
+ | #</Location> |
− | #</IfModule> |
+ | #</IfModule> |
− | + | ||
+ | #<IfModule mod_info.c> |
||
+ | # |
||
+ | # Allow remote server configuration reports, with the URL of |
||
+ | # http://servername/server-info (requires that mod_info.c be loaded). |
||
+ | # Change the ".example.com" to match your domain to enable. |
||
+ | # |
||
+ | #<Location /server-info> |
||
+ | # SetHandler server-info |
||
+ | # Order deny,allow |
||
+ | # Deny from all |
||
+ | # Allow from .example.com |
||
+ | #</Location> |
||
+ | #</IfModule> |
||
− | Now in both places replace |
+ | Now in both places replace <code>Allow from .example.com</code> by <code>Allow from localhost</code>. If in addition you want to allow access to server information from e.g. your department domain, add new lines <code>Allow from .math.yourschool.edu</code> |
− | below the two |
+ | below the two <code>Allow from</code> lines where of course you should edit <code>.math.yourschool.edu</code> appropriately. The code (except for <code>yourschool</code>) should look like |
− | <verbatim> |
||
+ | <IfModule mod_status.c> |
||
− | <IfModule mod_status.c> |
||
+ | # |
||
− | # |
||
+ | # Allow server status reports generated by mod_status, |
||
− | # Allow server status reports generated by mod_status, |
||
+ | # with the URL of http://servername/server-status |
||
− | # with the URL of http://servername/server-status |
||
+ | # Change the ".example.com" to match your domain to enable. |
||
− | # Change the ".example.com" to match your domain to enable. |
||
+ | # |
||
− | # |
||
+ | <Location /server-status> |
||
− | + | SetHandler server-status |
|
− | + | Order deny,allow |
|
− | + | Deny from all |
|
− | + | Allow from localhost |
|
− | Allow from |
+ | Allow from .math.yourschool.edu |
− | + | </Location> |
|
− | + | </IfModule> |
|
− | + | ||
+ | <IfModule mod_info.c> |
||
+ | # |
||
+ | # Allow remote server configuration reports, with the URL of |
||
+ | # http://servername/server-info (requires that mod_info.c be loaded). |
||
+ | # Change the ".example.com" to match your domain to enable. |
||
+ | # |
||
+ | <Location /server-info> |
||
+ | SetHandler server-info |
||
+ | Order deny,allow |
||
+ | Deny from all |
||
+ | Allow from localhost |
||
+ | Allow from .math.yourschool.edu |
||
+ | </Location> |
||
+ | </IfModule> |
||
− | <IfModule mod_info.c> |
||
+ | Then save the file and quit (<code>File</code>, <code>Save</code> and <code>File</code>, <code>Quit</code>. |
||
− | # |
||
− | # Allow remote server configuration reports, with the URL of |
||
− | # http://servername/server-info (requires that mod_info.c be loaded). |
||
− | # Change the ".example.com" to match your domain to enable. |
||
− | # |
||
− | <Location /server-info> |
||
− | SetHandler server-info |
||
− | Order deny,allow |
||
− | Deny from all |
||
− | Allow from localhost |
||
− | Allow from .math.yourschool.edu |
||
− | </Location> |
||
− | </IfModule> |
||
− | </verbatim> |
||
− | |||
− | Then save the file and quit (=File=, =Save= and =File=, =Quit=. |
||
Just to be sure you changed what you wanted do run |
Just to be sure you changed what you wanted do run |
||
− | <verbatim> |
||
+ | |||
− | # diff apache2.conf apache2.conf.bak1 |
+ | # diff apache2.conf apache2.conf.bak1 |
− | # exit |
+ | # exit |
− | $ |
+ | $ |
− | + | ||
− | + | <code>diff</code> should report the changes you made and only those. |
|
Now we have to set your server's fully qualified domain name. |
Now we have to set your server's fully qualified domain name. |
||
− | + | # Select <code>Desktop</code>, <code>Administration</code>, <code>Networking</code> |
|
− | + | # Click on <code>Hosts</code> |
|
− | + | # Select the entry with IP Address 127.0.0.1 and click <code>Properties</code> |
|
− | + | # Under Aliases first enter your server's fully qualified domain name, something like <code>your_server_name.department.school.edu</code> |
|
− | + | # Next separated by a space or newline enter <code>localhost</code> |
|
− | + | # And finally, again separated by a space or newline, enter <code>your_server_name</code> (it's important that <code>localhost</code> comes first) |
|
− | + | # Note that <code>localhost</code> and <code>your_server_name</code> are probably already listed in which case you only have to enter your server's fully qualified domain name as the first entry |
|
− | + | # Then click <code>OK</code> |
|
There should also be an entry with your server's IP address (if not you should add one) |
There should also be an entry with your server's IP address (if not you should add one) |
||
− | + | # Select the entry with your server's IP address and click <code>Properties</code> |
|
− | + | # Under Aliases you should see first your server's fully qualified domain name, something like <code>your_server_name.department.school.edu</code> |
|
− | + | # And next, separated by a space or newline, <code>your_server_name</code> |
|
− | + | # Add or edit these entries if they are not correct |
|
− | + | # Then click <code>OK</code> |
|
− | + | # And click <code>OK</code> again to close <code>Network settings</code> |
|
You can check these settings by running the commands |
You can check these settings by running the commands |
||
− | <verbatim> |
||
+ | |||
− | # exit |
+ | # exit |
− | exit |
+ | exit |
− | $ hostname --fqdn |
+ | $ hostname --fqdn |
− | + | ||
and |
and |
||
− | <verbatim> |
||
+ | |||
− | $ hostname |
+ | $ hostname |
− | + | ||
− | The first respond with the fully qualified domain name and the second with just |
+ | The first respond with the fully qualified domain name and the second with just <code>your_server_name</code>. |
Now restart Apache |
Now restart Apache |
||
− | <verbatim> |
||
+ | |||
− | $su |
+ | $su |
− | <root password> |
+ | <root password> |
− | # apache2ctl graceful |
+ | # apache2ctl graceful |
− | # exit |
+ | # exit |
− | $ |
+ | $ |
− | + | ||
and test your server by connecting to |
and test your server by connecting to |
||
"http://localhost/" and/or connecting to your |
"http://localhost/" and/or connecting to your |
||
− | server from a browser on a remote machine. You should see the page |
+ | server from a browser on a remote machine. You should see the page '''It works!''' indicating that apache is running. |
You can check Apache's status by connecting to |
You can check Apache's status by connecting to |
||
Line 461: | Line 444: | ||
Further test Apache by connecting to |
Further test Apache by connecting to |
||
"http://localhost/server-info" using a browser on your machine (or or from a browser on a remote machine in the math.yourschool.edu domain) and you will see a page listing various |
"http://localhost/server-info" using a browser on your machine (or or from a browser on a remote machine in the math.yourschool.edu domain) and you will see a page listing various |
||
− | information about apache. In particular under |
+ | information about apache. In particular under <code>Server Settings</code> you should see |
− | <verbatim> |
||
− | Server Version: Apache/2.2.3 (Debian) mod_apreq2-20051231/2.6.0 mod_perl/2.0.2 Perl/v5.8.8 |
||
− | </verbatim> |
||
− | indicating that both =mod_apreq2= and =mod_perl= are installed. |
||
− | ---++ Checking <nop>MySQL |
||
+ | Server Version: Apache/2.2.3 (Debian) mod_apreq2-20051231/2.6.0 mod_perl/2.0.2 Perl/v5.8.8 |
||
− | First check that <nop>MySQL is running by |
||
+ | indicating that both <code>mod_apreq2</code> and <code>mod_perl</code> are installed. |
||
− | <verbatim> |
||
+ | == Checking MySQL == |
||
− | $ mysql -u root |
||
+ | |||
− | </verbatim> |
||
+ | First check that MySQL is running by |
||
+ | |||
+ | $ mysql -u root |
||
You should see |
You should see |
||
− | <verbatim> |
||
− | Welcome to the MySQL monitor. Commands end with ; or \g. |
||
− | Your MySQL connection id is 1 to server version: 5.0.26 |
||
− | Type 'help;' or '\h' for help. Type '\c' to clear the buffer. |
||
+ | Welcome to the MySQL monitor. Commands end with ; or \g. |
||
+ | Your MySQL connection id is 1 to server version: 5.0.26 |
||
+ | |||
+ | Type 'help;' or '\h' for help. Type '\c' to clear the buffer. |
||
+ | |||
+ | mysql> |
||
− | mysql> |
||
+ | Enter <code>exit</code> to exit |
||
− | </verbatim> |
||
− | Enter =exit= to exit |
||
− | <verbatim> |
||
− | mysql> exit |
||
− | Bye |
||
− | $ |
||
− | </verbatim> |
||
− | ---++ Reboot and Test |
||
+ | mysql> exit |
||
+ | Bye |
||
+ | $ |
||
− | Now remove your DVD and reboot the system (=Desktop=, =Shut Down...=, =Restart=). |
||
+ | == Reboot and Test == |
||
+ | |||
+ | Now remove your DVD and reboot the system (<code>Desktop</code>, <code>Shut Down...</code>, <code>Restart</code>). |
||
Now connect to |
Now connect to |
||
"http://localhost/" using a browser on your machine and/or to your |
"http://localhost/" using a browser on your machine and/or to your |
||
− | server from a browser on a remote machine. You should see the page |
+ | server from a browser on a remote machine. You should see the page '''It works!''' indicating that apache is running. |
− | This is also a good time to check that you can login your server from a remote location using SSH (non secure telnet and FTP are not allowed but secure SSH and SFTP are). If you are using "SSH Secure Shell" (now called "SSH Tectia"), a popular SSH client for PC's, you will have to add |
+ | This is also a good time to check that you can login your server from a remote location using SSH (non secure telnet and FTP are not allowed but secure SSH and SFTP are). If you are using "SSH Secure Shell" (now called "SSH Tectia"), a popular SSH client for PC's, you will have to add <code>Keyboard Interactive</code> to the list of "Authentication methods" under "Authentication" if it's not already there. |
− | Finally test that |
+ | Finally test that MySQL is running. |
− | <verbatim> |
||
+ | $ mysql -u root |
||
− | $ mysql -u root |
||
+ | ... |
||
− | ... |
||
+ | mysql> |
||
− | mysql> |
+ | mysql> exit |
− | + | Bye |
|
− | + | $ |
|
− | + | ||
− | + | Currently the MySQL password is empty so we didn't need a password. |
|
− | Currently the <nop>MySQL password is empty so we didn't need a password. |
||
We will take care of that now. |
We will take care of that now. |
||
− | + | == MySQL Security Issuses == |
|
− | As initially set up, |
+ | As initially set up, MySQL is an open system. The root accounts are not password protected. See e.g. [[http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html|http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html]] for information on this. We recommend giving passwords to the root accounts. There are two root accounts, one is <code>root@localhost</code> and the other is <code>root@host_name</code> where <code>host_name</code> is the name of your server. To find this name, do the following |
− | <verbatim> |
||
+ | $ mysql -u root |
||
− | $ mysql -u root |
||
+ | mysql> SELECT Host, User, Password FROM mysql.user; |
||
− | mysql> SELECT Host, User, Password FROM mysql.user; |
||
+ | |||
− | </verbatim> |
||
+ | You will see a table with three entries. For <code>localhost</code> you will see two Users, <code>root</code> and <code>debian-sys-maint</code>. The other listed Host (with only the <code>root</code> user) is the name of your server which we will denote by <code>host_name</code>. |
||
− | You will see a table with three entries. For =localhost= you will see two Users, =root= and =debian-sys-maint=. The other listed Host (with only the =root= user) is the name of your server which we will denote by =host_name=. |
||
+ | Now we will assign a password to these <code>root</code> accounts. |
||
− | Now we will assign a password to these =root= accounts. |
||
− | In the second command below, replace |
+ | In the second command below, replace <code>host_name</code> with the name of the server host. In both commands replace <code>newpwd</code> with your choosen MySQL <code>root</code> password. As was said above, "Do not forget what you enter here". Also remember that this is the password for the MySQL <code>root</code> user, not the Debian linux system <code>root</code> user. Below we refer to this as <code><mysql root password></code> |
− | <verbatim> |
||
+ | mysql> UPDATE mysql.user SET password=PASSWORD('newpwd') WHERE host='localhost' and user='root'; |
||
− | mysql> UPDATE mysql.user SET password=PASSWORD('newpwd') WHERE host=' |
+ | mysql> UPDATE mysql.user SET password=PASSWORD('newpwd') WHERE host='host_name' and user='root'; |
− | mysql> |
+ | mysql> FLUSH PRIVILEGES; |
− | mysql> FLUSH PRIVILEGES; |
||
− | </verbatim> |
||
Now use your up arrow key to run the command |
Now use your up arrow key to run the command |
||
− | <verbatim> |
||
+ | |||
− | mysql> SELECT Host, User, Password FROM mysql.user; |
+ | mysql> SELECT Host, User, Password FROM mysql.user; |
− | + | ||
and you should see that all three users now have passwords. |
and you should see that all three users now have passwords. |
||
− | Then exit |
+ | Then exit MySQL |
− | + | ||
− | mysql> exit |
+ | mysql> exit |
− | Bye |
+ | Bye |
− | $ |
+ | $ |
− | + | ||
and test that all is well: |
and test that all is well: |
||
− | <verbatim> |
||
+ | |||
− | $ mysql -u root -p |
+ | $ mysql -u root -p |
− | Enter Password: <mysql root password> |
+ | Enter Password: <mysql root password> |
− | + | ||
You should see |
You should see |
||
− | <verbatim> |
||
+ | |||
− | Welcome to the MySQL monitor ... |
+ | Welcome to the MySQL monitor ... |
− | mysql> |
+ | mysql> |
− | + | ||
Enter |
Enter |
||
− | < |
+ | <nowiki> |
mysql> SELECT Host, User, Password FROM mysql.user; |
mysql> SELECT Host, User, Password FROM mysql.user; |
||
− | </ |
+ | </nowiki> |
− | and you should see encrypted passwords for all three accounts. Note that the way |
+ | and you should see encrypted passwords for all three accounts. Note that the way MySQL is set up, you can only gain access to the <code>localhost</code> account, not to the <code>host_name</code> account but setting a password for the <code>host_name</code> account is a safer thing to do in case the set up gets changed. Now exit MySQL |
− | < |
+ | <nowiki> |
mysql> exit |
mysql> exit |
||
Bye |
Bye |
||
$ |
$ |
||
− | </ |
+ | </nowiki> |
− | and congratulate yourself. You are now ready for the next and hopefully easy part, installing |
+ | and congratulate yourself. You are now ready for the next and hopefully easy part, installing WeBWorK. |
− | + | == Downloading the WeBWorK System Software and Problem Libraries == |
|
− | We are finally at the point where we can start downloading and installing |
+ | We are finally at the point where we can start downloading and installing WeBWorK. We will use CVS to download WeBWorK. This is easy and it will also make it easy to update the system in the future. General instructions can be found in the WeBWorKCVSReadOnly topic but the following will get the job done. Note that the following are rather long commands; it is much easier to copy (<code>^C</code>) them from this document and paste (<code><Shift> <Ctrl> <V></code>) them in a terminal window |
− | <verbatim> |
||
− | $ cd |
||
− | $ cd downloads |
||
− | $ cvs -d :pserver:anoncvs@cvs.webwork.rochester.edu:/webwork/cvs/system checkout -r rel-2-3-dev webwork2 pg |
||
+ | $ cd |
||
− | $ cvs -d :pserver:anoncvs@cvs.webwork.rochester.edu:/webwork/cvs/rochester checkout rochester_problib |
||
+ | $ cd downloads |
||
− | $ cvs -d :pserver:anoncvs@cvs.webwork.rochester.edu:/webwork/cvs/union checkout union_problib |
||
+ | |||
− | $ cvs -d :pserver:anoncvs@cvs.webwork.rochester.edu:/webwork/cvs/ |
+ | $ cvs -d :pserver:anoncvs@cvs.webwork.rochester.edu:/webwork/cvs/system checkout -r rel-2-3-dev webwork2 pg |
− | + | $ cvs -d :pserver:anoncvs@cvs.webwork.rochester.edu:/webwork/cvs/rochester checkout rochester_problib |
|
− | + | $ cvs -d :pserver:anoncvs@cvs.webwork.rochester.edu:/webwork/cvs/union checkout union_problib |
|
− | + | $ cvs -d :pserver:anoncvs@cvs.webwork.rochester.edu:/webwork/cvs/asu checkout database_problems |
|
+ | The first download gives you the latest released version with patches (don't be misled by the <code>dev</code> extension --- this is not a development version). |
||
+ | The last download contains the WeBWorK National Problem Library. This now includes the Rochester and Union Libraries along with others but some people still find it convenient to use the Rochester and Union Libraries separately. There is quite a bit of overlap between these libraries but now you system is loaded with many thousands of WeBWorK problems (over 13,000 in the National Problem Library alone). |
||
− | ---++ Installing %WW% |
||
− | ---+++ Move the System into the Required Directories |
||
− | As =root= create a =webwork= directory under =/opt= and move directories there. |
||
− | <verbatim> |
||
− | $ su |
||
− | <root password> |
||
− | # mkdir /opt/webwork |
||
− | # mv webwork2 /opt/webwork/ |
||
− | # mv pg /opt/webwork/ |
||
− | </verbatim> |
||
− | Now create the =courses= and =libraries= directories under =webwork= and copy and move content there. |
||
+ | == Installing WeBWorK == |
||
− | <verbatim> |
||
+ | === Move the System into the Required Directories === |
||
− | # mkdir /opt/webwork/courses |
||
+ | As <code>root</code> create a <code>webwork</code> directory under <code>/opt</code> and move directories there. |
||
− | # mkdir /opt/webwork/libraries |
||
− | # mv database_problems/ /opt/webwork/libraries/ |
||
− | # mv rochester_problib/ /opt/webwork/libraries/ |
||
− | # mv union_problib/ /opt/webwork/libraries/ |
||
− | # cd /opt/webwork/webwork2/courses.dist |
||
− | # cp *.lst /opt/webwork/courses/ |
||
− | # cp -r modelCourse/ /opt/webwork/courses/ |
||
− | </verbatim> |
||
+ | $ su |
||
+ | <root password> |
||
+ | # mkdir /opt/webwork |
||
+ | # mv webwork2 /opt/webwork/ |
||
+ | # mv pg /opt/webwork/ |
||
− | ---+++ Setting Permissions |
||
+ | Now create the <code>courses</code> and <code>libraries</code> directories under <code>webwork</code> and copy and move content there. |
||
+ | |||
+ | # mkdir /opt/webwork/courses |
||
+ | # mkdir /opt/webwork/libraries |
||
+ | # mv database_problems/ /opt/webwork/libraries/ |
||
+ | # mv rochester_problib/ /opt/webwork/libraries/ |
||
+ | # mv union_problib/ /opt/webwork/libraries/ |
||
+ | # cd /opt/webwork/webwork2/courses.dist |
||
+ | # cp *.lst /opt/webwork/courses/ |
||
+ | # cp -r modelCourse/ /opt/webwork/courses/ |
||
+ | |||
+ | |||
+ | === Setting Permissions === |
||
The PG installation directory and files should be owned by root and not writeable by other users: |
The PG installation directory and files should be owned by root and not writeable by other users: |
||
− | <verbatim> |
||
− | # cd /opt/webwork/pg |
||
− | # chown -R root:root . |
||
− | # chmod -R u+rwX,go+rX . |
||
− | </verbatim> |
||
− | Most %WW% directories and files should also be owned by root and not writeable by other users: |
||
+ | # cd /opt/webwork/pg |
||
− | <verbatim> |
||
+ | # chown -R root:root . |
||
− | # cd /opt/webwork/webwork2 |
||
+ | # chmod -R u+rwX,go+rX . |
||
− | # chown -R root:root . |
||
− | # chmod -R u+rwX,go+rX . |
||
− | </verbatim> |
||
− | Certain data directories need to be writable by the web server. These are =DATA=, =courses=, =htdocs/tmp=, =logs=, and =tmp=. It is convenient to give %WW% administrators access to these directories as well, so they can perform administrative tasks such as removing temporary files, creating and editing courses from the command line, managing logs, and so on. We will create a new group called =wwdata=, containing both the %WW% administrators and the web server. |
||
+ | Most WeBWorK directories and files should also be owned by root and not writeable by other users: |
||
− | 1. Select =Desktop=, =Administration= and then =Users and Groups= |
||
+ | # cd /opt/webwork/webwork2 |
||
− | 1. Select =Groups= |
||
+ | # chown -R root:root . |
||
− | 1. Click =Add Group= |
||
+ | # chmod -R u+rwX,go+rX . |
||
− | 1. For =Group name= enter =wwdata= |
||
− | 1. Under =Group Members= select yourself and click =Add= |
||
− | 1. Under =Group Members= select =www-data= and click =Add= (=www-data= is the Apache2 webserver) |
||
− | 1. Click =OK= |
||
− | 1. Click =OK= again |
||
− | If there are other users who will also be administering %WW% files, |
||
+ | Certain data directories need to be writable by the web server. These are <code>DATA</code>, <code>courses</code>, <code>htdocs/tmp</code>, <code>logs</code>, and <code>tmp</code>. It is convenient to give WeBWorK administrators access to these directories as well, so they can perform administrative tasks such as removing temporary files, creating and editing courses from the command line, managing logs, and so on. We will create a new group called <code>wwdata</code>, containing both the WeBWorK administrators and the web server. |
||
− | now is a good time to add them. And remember to add them to the =wwdata= group as above. |
||
+ | |||
+ | # Select <code>Desktop</code>, <code>Administration</code> and then <code>Users and Groups</code> |
||
+ | # Select <code>Groups</code> |
||
+ | # Click <code>Add Group</code> |
||
+ | # For <code>Group name</code> enter <code>wwdata</code> |
||
+ | # Under <code>Group Members</code> select yourself and click <code>Add</code> |
||
+ | # Under <code>Group Members</code> select <code>www-data</code> and click <code>Add</code> (<code>www-data</code> is the Apache2 webserver) |
||
+ | # Click <code>OK</code> |
||
+ | # Click <code>OK</code> again |
||
+ | |||
+ | If there are other users who will also be administering WeBWorK files, |
||
+ | now is a good time to add them. And remember to add them to the <code>wwdata</code> group as above. |
||
You can check that this suceeded in a terminal window by entering |
You can check that this suceeded in a terminal window by entering |
||
− | <verbatim> |
||
+ | # exit |
||
− | # exit |
||
+ | $ id <your userid> |
||
− | $ id <your userid> |
||
− | </verbatim> |
||
− | and then you should see =wwdata= listed under groups. Also |
||
− | <verbatim> |
||
− | $ id www-data |
||
− | </verbatim> |
||
− | should show wwdata listed under groups. Now we make the %WW% directories that need to be writable by the web server have =wwdata= as their group. The following are rather long commands; you might want to copy them and paste them into your terminal window rather than typing them. |
||
− | <verbatim> |
||
− | $ su |
||
− | <root password> |
||
− | # cd /opt/webwork/webwork2/ |
||
− | # chgrp -R wwdata DATA ../courses htdocs/tmp logs tmp |
||
− | # chmod -R g+w DATA ../courses htdocs logs tmp |
||
− | # find DATA/ ../courses/ htdocs/ logs/ tmp/ -type d -a ! -name CVS -exec chmod g+s {} \; |
||
− | # exit |
||
− | $ |
||
− | </verbatim> |
||
− | ---++ Configuring the Shell |
||
+ | and then you should see <code>wwdata</code> listed under groups. Also |
||
− | To make working with %WW% easier, there are a couple of changes you can make to your shell environment. |
||
+ | $ id www-data |
||
− | Add the %WW% =bin= directory to your path. This will allow you to run %WW% command-line utilities without typing the full path to the utility. Goto your home directory and backup your =.bashrc= file |
||
+ | should show wwdata listed under groups. Now we make the WeBWorK directories that need to be writable by the web server have <code>wwdata</code> as their group. The following are rather long commands; you might want to copy them and paste them into your terminal window rather than typing them. |
||
− | <verbatim> |
||
+ | $ su |
||
− | $ cd |
||
+ | <root password> |
||
− | $ cp .bashrc .bashrc.bak1 |
||
+ | # cd /opt/webwork/webwork2/ |
||
− | </verbatim> |
||
+ | # chgrp -R wwdata DATA ../courses htdocs/tmp logs tmp |
||
+ | # chmod -R g+w DATA ../courses htdocs logs tmp |
||
+ | # find DATA/ ../courses/ htdocs/ logs/ tmp/ -type d -a ! -name CVS -exec chmod g+s {} \; |
||
+ | # exit |
||
+ | $ |
||
− | Now edit =.bashrc= |
||
+ | == Configuring the Shell == |
||
− | <verbatim> |
||
+ | To make working with WeBWorK easier, there are a couple of changes you can make to your shell environment. |
||
− | $ gedit .bashrc |
||
+ | |||
− | </verbatim> |
||
+ | Add the WeBWorK <code>bin</code> directory to your path. This will allow you to run WeBWorK command-line utilities without typing the full path to the utility. Goto your home directory and backup your <code>.bashrc</code> file |
||
+ | |||
+ | $ cd |
||
+ | $ cp .bashrc .bashrc.bak1 |
||
+ | |||
+ | Now edit <code>.bashrc</code> |
||
+ | |||
+ | $ gedit .bashrc |
||
After the last line add the two lines: |
After the last line add the two lines: |
||
− | <verbatim> |
||
+ | |||
− | export PATH=$PATH:/opt/webwork/webwork2/bin |
+ | export PATH=$PATH:/opt/webwork/webwork2/bin |
− | export WEBWORK_ROOT=/opt/webwork/webwork2 |
+ | export WEBWORK_ROOT=/opt/webwork/webwork2 |
− | + | ||
Then save the file and Quit. |
Then save the file and Quit. |
||
Close your Terminal Window and open a new one so the above changes |
Close your Terminal Window and open a new one so the above changes |
||
take effect. You can check that they have by |
take effect. You can check that they have by |
||
− | <verbatim> |
||
− | $ echo $PATH |
||
− | $ echo $WEBWORK_ROOT |
||
− | </verbatim> |
||
− | ---++ Checking Module Dependancies |
||
+ | $ echo $PATH |
||
+ | $ echo $WEBWORK_ROOT |
||
+ | == Checking Module Dependancies == |
||
− | %WW% includes a script called =check_modules.pl= that verifies that the needed programs and Perl modules are installed on your system. Run this script to make sure you have installed the required programs and Perl modules. |
||
− | <verbatim> |
||
+ | WeBWorK includes a script called <code>check_modules.pl</code> that verifies that the needed programs and Perl modules are installed on your system. Run this script to make sure you have installed the required programs and Perl modules. |
||
− | $ check_modules.pl apache2 |
||
− | </verbatim> |
||
− | Scroll up and look through the listing. It should find everything except =PHP::Serialization= which is only required if you plan to use %WW% with Moodle and =tth= which is a deprecated display mode. If something is missing (flagged by =**=), look back through these instructions to find where it should have been installed and install it. |
||
+ | $ check_modules.pl apache2 |
||
− | ---++ Configuring %WW% |
||
− | ---+++ Making Copies of the Distribution Configuration Files |
||
+ | Scroll up and look through the listing. It should find everything except <code>PHP::Serialization</code> which is only required if you plan to use WeBWorK with Moodle and <code>tth</code> which is a deprecated display mode. If something is missing (flagged by <code>**</code>), look back through these instructions to find where it should have been installed and install it. |
||
+ | == Configuring WeBWorK == |
||
− | Before configuring the system, you must make local copies of the =global.conf= and =database.conf= configuration files, located in =/opt/webwork/webwork2/conf/= . Since these are owned by =root= |
||
+ | === Making Copies of the Distribution Configuration Files === |
||
− | <verbatim> |
||
− | $ su |
||
− | <root password> |
||
− | # cd /opt/webwork/webwork2/conf |
||
− | # cp global.conf.dist global.conf |
||
− | # cp database.conf.dist database.conf |
||
− | </verbatim> |
||
− | ---+++ Global Configuration |
||
+ | Before configuring the system, you must make local copies of the <code>global.conf</code> and <code>database.conf</code> configuration files, located in <code>/opt/webwork/webwork2/conf/</code> . Since these are owned by <code>root</code> |
||
− | Most %WW% configuration is done in the file =/opt/webwork2/conf/global.conf=. This file provides system-wide configuration settings, and defaults for course settings. Any setting in this file can be overridden in the =course.conf= file for a particular course. To override a setting for a course, just put the new setting (using the same syntax as is in =global.conf=) in the course.conf= file. |
||
+ | $ su |
||
+ | <root password> |
||
+ | # cd /opt/webwork/webwork2/conf |
||
+ | # cp global.conf.dist global.conf |
||
+ | # cp database.conf.dist database.conf |
||
− | There are several options that must be set for %WW% to work with your system. The rest of the file consists of customization options. Now edit =global.conf= |
||
+ | === Global Configuration === |
||
− | <verbatim> |
||
+ | Most WeBWorK configuration is done in the file <code>/opt/webwork2/conf/global.conf</code>. This file provides system-wide configuration settings, and defaults for course settings. Any setting in this file can be overridden in the <code>course.conf</code> file for a particular course. To override a setting for a course, just put the new setting (using the same syntax as is in <code>global.conf</code>) in the course.conf= file. |
||
− | # cd /opt/webwork/webwork2/conf |
||
− | # gedit global.conf |
||
− | </verbatim> |
||
− | 1.Search for =$externalPrograms{tar} =<nop> "/usr/bin/tar";= and replace this by <br /> =$externalPrograms{tar} =<nop> "/bin/tar";= |
||
+ | There are several options that must be set for WeBWorK to work with your system. The rest of the file consists of customization options. Now edit <code>global.conf</code> |
||
− | 1.Now directly below this add the new line <br /> =$externalPrograms{gzip} =<nop> "/bin/gzip";= <br />or edit it appropriately if it's already there. |
||
− | %WW% uses the <nop>DateTime module. <nop>DateTime is supposed to be able to determine the local timezone itself without you having to enter it but this often fails so it is best to just set it here. For is a list of timezones recognized by <nop>DateTime go to |
||
+ | # cd /opt/webwork/webwork2/conf |
||
− | [[http://search.cpan.org/dist/DateTime-TimeZone/]] . These timezones are more refined than standard timezone usage in that they include switches to daylight savings time (e.g. some parts of a time zone may make the switch and others may not). For example if your server is in the eastern US, on the list you will see =DateTime::TimeZone::America::New_York= and you should replace =$siteDefaults{timezone} =<nop> "";= by =$siteDefaults{timezone} =<nop> "America/New_York";= |
||
+ | # gedit global.conf |
||
− | 1.Search for =$siteDefaults{timezone} =<nop> "";= and enter your local timezone. |
||
+ | # Search for <code>$externalPrograms{tar} = "/usr/bin/tar";</code> and replace this by <br /> <code>$externalPrograms{tar} = "/bin/tar";</code> |
||
+ | # Now directly below this add the new line <br /> <code>$externalPrograms{gzip} = "/bin/gzip";</code> <br />or edit it appropriately if it's already there. |
||
− | At this point =TtH= is a deprecated display mode which we didn't install so we have to remove it from the listof possible display modes. |
||
+ | WeBWorK uses the DateTime module. DateTime is supposed to be able to determine the local timezone itself without you having to enter it but this often fails so it is best to just set it here. For is a list of timezones recognized by DateTime go to |
||
+ | [[http://search.cpan.org/dist/DateTime-TimeZone/|http://search.cpan.org/dist/DateTime-TimeZone/]] . These timezones are more refined than standard timezone usage in that they include switches to daylight savings time (e.g. some parts of a time zone may make the switch and others may not). For example if your server is in the eastern US, on the list you will see <code>DateTime::TimeZone::America::New_York</code> and you should replace <code>$siteDefaults{timezone} = "";</code> by <code>$siteDefaults{timezone} = "America/New_York";</code> |
||
− | 1. Search for =formattedText= and comment out the line = "formattedText", # format math expressions using <nop>TtH= |
||
+ | # Search for <code>$siteDefaults{timezone} = "";</code> and enter your local timezone. |
||
+ | |||
+ | At this point <code>TtH</code> is a deprecated display mode which we didn't install so we have to remove it from the listof possible display modes. |
||
+ | |||
+ | # Search for <code>formattedText</code> and comment out the line = "formattedText", # format math expressions using TtH= |
||
so it becomes |
so it becomes |
||
− | <verbatim> |
||
− | # "formattedText", # format math expressions using TtH |
||
− | </verbatim> |
||
− | We need to set a password that %WW% uses when it communicates with the <nop>MySQL database. |
||
+ | # "formattedText", # format math expressions using TtH |
||
− | 1.Search for =$database_password =<nop> "";= and replace this by <br /> =$database_password =<nop> "database_password";= |
||
+ | |||
+ | We need to set a password that WeBWorK uses when it communicates with the MySQL database. |
||
+ | # Search for <code>$database_password = "";</code> and replace this by <br /> <code>$database_password = "database_password";</code> |
||
where of course you should replace 'database_password' with your own password. Remember this password as we will need it below. |
where of course you should replace 'database_password' with your own password. Remember this password as we will need it below. |
||
− | + | WeBWorK sends mail in three instances. The PG system sends mail to report answers to questionnaires and free-response problems. The mail merge module is used to send mail to course participants, i.e. to report scores. The feedback module allows participants to send mail to course instructors. |
|
− | To send mail, |
+ | To send mail, WeBWorK needs the address of an SMTP server. Normally you will use the address of your school's SMTP server. If the local machine is running an SMTP server, use <code>localhost</code>. IMPORTANT: Our instructions above did not install an SMTP server so you will have to install and configue one if you do not use your school's SMTP server. When connecting to the SMTP server, WeBWorK must also send an email address representing the sender of the email (this has nothing to do with the <code>From</code> address on the mail message). |
− | + | # Edit the lines <code>$mail{smtpServer} = 'mail.yourschool.edu';</code> and |
|
− | + | # <code>$mail{smtpSender} = 'webwork@yourserver.yourschool.edu';</code> |
|
entering the appropiate information |
entering the appropiate information |
||
− | If you want |
+ | If you want WeBWorK questionnaires or similar things from different courses to be mailed to a central person or persons (e.g. the WeBWorK administrator), edit the lines |
− | + | ||
− | $mail{allowedRecipients} = [ |
+ | $mail{allowedRecipients} = [ |
− | #'prof1@yourserver.yourdomain.edu', |
+ | #'prof1@yourserver.yourdomain.edu', |
− | #'prof2@yourserver.yourdomain.edu', |
+ | #'prof2@yourserver.yourdomain.edu', |
− | ]; |
+ | ]; |
− | + | ||
appropriately. In order to have professors from individual courses receive such email, this |
appropriately. In order to have professors from individual courses receive such email, this |
||
should be set in course.conf to the addresses of professors of each course. |
should be set in course.conf to the addresses of professors of each course. |
||
Line 760: | Line 729: | ||
Now become a regular user again |
Now become a regular user again |
||
− | <verbatim> |
||
+ | # exit |
||
− | # exit |
||
+ | $ |
||
− | $ |
||
− | </verbatim> |
||
− | + | WeBWorK uses a single database, called <code>webwork</code>, for all courses. We will create the <code>webwork</code> database now. |
|
− | To do this do the following (before you just copy, paste and hit |
+ | To do this do the following (before you just copy, paste and hit <code><Enter></code> notice that you have to replace <code>database_password</code> with the password you set when editing <code>global.conf</code> above): |
− | + | ||
− | $ mysql -u root -p mysql |
+ | $ mysql -u root -p mysql |
− | Enter password: <mysql root password> |
+ | Enter password: <mysql root password> |
− | mysql> CREATE DATABASE webwork; |
+ | mysql> CREATE DATABASE webwork; |
− | mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, LOCK TABLES ON webwork.* TO webworkWrite@localhost IDENTIFIED BY 'database_password'; |
+ | mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, LOCK TABLES ON webwork.* TO webworkWrite@localhost IDENTIFIED BY 'database_password'; |
− | mysql> exit |
+ | mysql> exit |
− | Bye |
+ | Bye |
− | $ |
+ | $ |
− | </verbatim> |
||
− | where as we said replace |
+ | where as we said replace <code>database_password</code> with the password you set when editing <code>global.conf</code> above. |
− | + | WeBWorK 2.3.0 introduces an automatic database upgrade system. Rather than manually issuing SQL commands to make changes to the database, or using ad-hoc scripts like wwdb_addgw, there is a single script called <code>wwdb_upgrade</code> that applies any necessary updates. It should be run when creating a new database, and any time you upgrade WeBWorK. |
|
$ /opt/webwork/webwork2/bin/wwdb_upgrade -v |
$ /opt/webwork/webwork2/bin/wwdb_upgrade -v |
||
You will get the error message |
You will get the error message |
||
− | <verbatim> |
||
− | An error occured while running the course upgrade code for version 2 on course modelCourse: |
||
− | ... |
||
− | Ignore this error and go on to the next course? [y/N] |
||
− | </verbatim> |
||
− | You should enter =Y= to ignore the error. This error occurs because =wwdb_upgrade= isn't smart enough to realize =<nop>modelCourse= isn't a real course as we explain below. |
||
+ | An error occured while running the course upgrade code for version 2 on course modelCourse: |
||
+ | ... |
||
+ | Ignore this error and go on to the next course? [y/N] |
||
− | ---+++ jsMath Settings |
||
+ | You should enter <code>Y</code> to ignore the error. This error occurs because <code>wwdb_upgrade</code> isn't smart enough to realize <code>modelCourse</code> isn't a real course as we explain below. |
||
− | Version 2.0 of jsMath introduced a new fallback method for when the <nop>TeX fonts are not available on the student's computer. This uses images of the individual <nop>TeX characters in place of the <nop>TeX fonts. These are distributed in =webwork2/htdocs/jsMath/jsMath-fonts.tar.gz=, and you need to unpack this tarball before jsMath will work properly. Use the command |
||
− | <verbatim> |
||
− | $ su |
||
− | <root password> |
||
− | # cd /opt/webwork/webwork2/htdocs/jsMath |
||
− | # tar vfxz jsMath-fonts.tar.gz |
||
− | </verbatim> |
||
− | This will unpack the archive. Since there are 20,000 tiny files, it can take a little while, so the =v= option is used to show you the names as they are unpacked so that you know the command is actually doing something. Once the images are unpacked, jsMath's image mode fallback (the default fallback method) will work properly. |
||
+ | === jsMath Settings === |
||
+ | Version 2.0 of jsMath introduced a new fallback method for when the TeX fonts are not available on the student's computer. This uses images of the individual TeX characters in place of the TeX fonts. These are distributed in <code>webwork2/htdocs/jsMath/jsMath-fonts.tar.gz</code>, and you need to unpack this tarball before jsMath will work properly. Use the command |
||
− | ---++ Configuring Apache |
||
+ | $ su |
||
− | %WW% ships with an Apache config file that needs to linked into your Apache configuration process. The file is named =webwork.apache2-config.dist= and located in the =conf= directory. First, copy the file to =webwork.apache2-config=: |
||
+ | <root password> |
||
− | <verbatim> |
||
+ | # cd /opt/webwork/webwork2/htdocs/jsMath |
||
− | # cd /opt/webwork/webwork2/conf |
||
+ | # tar vfxz jsMath-fonts.tar.gz |
||
− | # cp webwork.apache2-config.dist webwork.apache2-config |
||
− | </verbatim> |
||
− | and now link it into your Apache configuration process |
||
− | <verbatim> |
||
− | # cd /etc/apache2/conf.d |
||
− | # ln -s /opt/webwork/webwork2/conf/webwork.apache2-config webwork.conf |
||
− | </verbatim> |
||
− | Then restart Apache |
||
+ | This will unpack the archive. Since there are 20,000 tiny files, it can take a little while, so the <code>v</code> option is used to show you the names as they are unpacked so that you know the command is actually doing something. Once the images are unpacked, jsMath's image mode fallback (the default fallback method) will work properly. |
||
− | <verbatim> |
||
− | # apache2ctl graceful |
||
− | </verbatim> |
||
− | If this doesn't work and you see the error |
||
− | <verbatim> |
||
− | Syntax error on line 29 of /opt/webwork/webwork2/conf/webwork.apache2-config: |
||
− | $parms->add_config() has failed: Option FollowSymLinks not allowed here at /usr/lib/perl5/Apache2/PerlSections.pm line 203.\n |
||
− | </verbatim> |
||
− | we have to do some more work. If you don't get this error, you can skip this section and go on to Test your configuration. At the time these instructions are being written Debian has packaged mod_perl version 2.0.2 which has a small bug which seems to be fixed in version 2.0.3. However we have a pretty easy work around for version 2.0.2. Edit =webwork.apache2-config= as follows: |
||
− | <verbatim> |
||
+ | == Configuring Apache == |
||
− | # cd /opt/webwork/webwork2/conf |
||
+ | WeBWorK ships with an Apache config file that needs to linked into your Apache configuration process. The file is named <code>webwork.apache2-config.dist</code> and located in the <code>conf</code> directory. First, copy the file to <code>webwork.apache2-config</code>: |
||
− | # gedit webwork.apache2-config |
||
− | </verbatim> |
||
− | Replace the end of the file (starting with =# Provide access to system-wide resources.=) with the section below. What we are doing is commenting out the two =Directory= blocks within the main =Perl= block, moving them below (i.e. outside) the |
||
+ | # cd /opt/webwork/webwork2/conf |
||
− | main =Perl= block and then replacing perl variables =$webwork_htdocs_dir= and =$webwork_courses_dir= with the actual directories. |
||
+ | # cp webwork.apache2-config.dist webwork.apache2-config |
||
+ | and now link it into your Apache configuration process |
||
− | <verbatim> |
||
+ | # cd /etc/apache2/conf.d |
||
− | # Provide access to system-wide resources. |
||
+ | # ln -s /opt/webwork/webwork2/conf/webwork.apache2-config webwork.conf |
||
− | # |
||
− | push @Alias, [ $webwork_htdocs_url => $webwork_htdocs_dir ]; |
||
− | #$Directory{$webwork_htdocs_dir} = { |
||
− | # Order => "allow,deny", |
||
− | # Allow => [qw/from all/], |
||
− | # Options => "FollowSymLinks", |
||
− | # AllowOverride => "None", |
||
− | #}; |
||
− | # Provide access to course-specific resources. |
||
+ | Then restart Apache |
||
− | # |
||
− | push @AliasMatch, [ "$webwork_courses_url/([^/]*)/(.*)", "$webwork_courses_dir/\$1/html/\$2" ]; |
||
− | #$Directory{"$webwork_courses_dir/*/html"} = { |
||
− | # Order => "allow,deny", |
||
− | # Allow => [qw/from all/], |
||
− | # Options => "FollowSymLinks", |
||
− | # AllowOverride => "None", |
||
− | #}; |
||
− | # If WeBWorK is on the root, exempt the static directories from being handled |
||
+ | # apache2ctl graceful |
||
− | # by Apache::WeBWorK. |
||
− | # |
||
− | if ($webwork_url eq "") { |
||
− | $Location{$webwork_courses_url} = { SetHandler => "None" }; |
||
− | $Location{$webwork_htdocs_url} = { SetHandler => "None" }; |
||
− | } |
||
− | </Perl> |
||
+ | If this doesn't work and you see the error |
||
− | + | Syntax error on line 29 of /opt/webwork/webwork2/conf/webwork.apache2-config: |
|
− | + | $parms->add_config() has failed: Option FollowSymLinks not allowed here at /usr/lib/perl5/Apache2/PerlSections.pm line 203.\n |
|
− | AllowOverride None |
||
− | Options FollowSymLinks |
||
− | Order allow,deny |
||
− | </Directory> |
||
− | <Directory /opt/webwork/courses/*/html> |
||
+ | we have to do some more work. If you don't get this error, you can skip this section and go on to Test your configuration. At the time these instructions are being written Debian has packaged mod_perl version 2.0.2 which has a small bug which seems to be fixed in version 2.0.3. However we have a pretty easy work around for version 2.0.2. Edit <code>webwork.apache2-config</code> as follows: |
||
− | Allow from all |
||
− | AllowOverride None |
||
− | Options FollowSymLinks |
||
− | Order allow,deny |
||
− | </Directory> |
||
− | </verbatim> |
||
+ | # cd /opt/webwork/webwork2/conf |
||
+ | # gedit webwork.apache2-config |
||
+ | |||
+ | Replace the end of the file (starting with <code># Provide access to system-wide resources.</code>) with the section below. What we are doing is commenting out the two <code>Directory</code> blocks within the main <code>Perl</code> block, moving them below (i.e. outside) the |
||
+ | main <code>Perl</code> block and then replacing perl variables <code>$webwork_htdocs_dir</code> and <code>$webwork_courses_dir</code> with the actual directories. |
||
+ | |||
+ | # Provide access to system-wide resources. |
||
+ | # |
||
+ | push @Alias, [ $webwork_htdocs_url => $webwork_htdocs_dir ]; |
||
+ | #$Directory{$webwork_htdocs_dir} = { |
||
+ | # Order => "allow,deny", |
||
+ | # Allow => [qw/from all/], |
||
+ | # Options => "FollowSymLinks", |
||
+ | # AllowOverride => "None", |
||
+ | #}; |
||
+ | |||
+ | # Provide access to course-specific resources. |
||
+ | # |
||
+ | push @AliasMatch, [ "$webwork_courses_url/([^/]*)/(.*)", "$webwork_courses_dir/\$1/html/\$2" ]; |
||
+ | #$Directory{"$webwork_courses_dir/*/html"} = { |
||
+ | # Order => "allow,deny", |
||
+ | # Allow => [qw/from all/], |
||
+ | # Options => "FollowSymLinks", |
||
+ | # AllowOverride => "None", |
||
+ | #}; |
||
+ | |||
+ | # If WeBWorK is on the root, exempt the static directories from being handled |
||
+ | # by Apache::WeBWorK. |
||
+ | # |
||
+ | if ($webwork_url eq "") { |
||
+ | $Location{$webwork_courses_url} = { SetHandler => "None" }; |
||
+ | $Location{$webwork_htdocs_url} = { SetHandler => "None" }; |
||
+ | } |
||
+ | |||
+ | </Perl> |
||
+ | |||
+ | <Directory /opt/webwork/webwork2/htdocs> |
||
+ | Allow from all |
||
+ | AllowOverride None |
||
+ | Options FollowSymLinks |
||
+ | Order allow,deny |
||
+ | </Directory> |
||
+ | |||
+ | <Directory /opt/webwork/courses/*/html> |
||
+ | Allow from all |
||
+ | AllowOverride None |
||
+ | Options FollowSymLinks |
||
+ | Order allow,deny |
||
+ | </Directory> |
||
Then save the file and Quit. |
Then save the file and Quit. |
||
Restart Apache |
Restart Apache |
||
− | <verbatim> |
||
+ | |||
− | # apache2ctl graceful |
+ | # apache2ctl graceful |
− | </verbatim> |
||
and all should be well. |
and all should be well. |
||
− | <verbatim> |
||
+ | # exit |
||
− | # exit |
||
+ | $ |
||
− | $ |
||
− | </verbatim> |
||
− | + | == Test your configuration == |
|
− | + | # Test the <code>/webwork2</code> location by visiting <code>http://yourserver.yourschool.edu/webwork2</code>. You should see the WeBWorK home page with no courses listed. Actually the directory <code>/opt/webwork/courses/</code> does contain the <code>modelCourse</code> but the <code>modelCourse</code> is not a real course so you will get an error message if you try to log into it. It will be used a as model for setting up other courses. For this reason <code>/opt/webwork/courses/modelCourse/</code> contains a file named <code>hide_directory</code> and so the <code>modelCourse</code> is not visible. |
|
− | + | # Test the <code>/webwork2_files</code> location by visiting <code>http://yourserver.yourschool.edu/webwork2_files</code>. You should see the "WeBWorK Placeholder Page". |
|
− | + | # You cannot test the <code>/webwork2_course_files</code> location until you have created a course. |
|
− | + | ==If Something is Wrong == |
|
− | If something is wrong one of the first things to check is that the config files have been edited correctly (e.g. one time a wrapped line in |
+ | If something is wrong one of the first things to check is that the config files have been edited correctly (e.g. one time a wrapped line in <code>global.conf</code> caused me problems). A quick way to check this is to do a <code>diff</code> between the edited and distributed versions and check that <code>diff</code> reports the changes you made and only those. |
− | <verbatim> |
||
+ | # exit |
||
− | # exit |
||
+ | $ |
||
− | $ |
||
+ | $ cd /etc/apache2/ |
||
− | $ cd /etc/apache2/ |
||
+ | $ diff apache2.conf apache2.conf.bak1 |
||
− | $ diff apache2.conf apache2.conf.bak1 |
||
+ | $ cd /opt/webwork/webwork2/conf/ |
||
− | $ cd /opt/webwork/webwork2/conf/ |
||
+ | $ diff global.conf global.conf.dist |
||
− | $ diff |
+ | $ diff database.conf database.conf.dist |
− | $ diff |
+ | $ diff webwork.apache2-config webwork.apache2-config.dist |
− | $ diff webwork.apache2-config webwork.apache2-config.dist |
||
− | </verbatim> |
||
If something is wrong and you fix it, you will have to restart Apache for the changes to take effect |
If something is wrong and you fix it, you will have to restart Apache for the changes to take effect |
||
− | <verbatim> |
||
+ | |||
− | $ su |
+ | $ su |
− | <root password> |
+ | <root password> |
− | # apache2ctl graceful |
+ | # apache2ctl graceful |
− | # exit |
+ | # exit |
− | $ |
+ | $ |
− | + | ||
--- |
--- |
||
− | + | == Create the admin Course == |
|
The CourseAdministrationManual gives information about creating courses. Here we will give explicit instructions for doing this. |
The CourseAdministrationManual gives information about creating courses. Here we will give explicit instructions for doing this. |
||
− | <verbatim> |
||
+ | $ su |
||
− | $ su |
||
+ | <root password> |
||
− | <root password> |
||
+ | # newgrp wwdata |
||
− | # newgrp wwdata |
||
+ | # umask 2 |
||
− | # umask 2 |
||
+ | # cd /opt/webwork/courses |
||
− | # cd /opt/webwork/courses |
||
+ | # /opt/webwork/webwork2/bin/addcourse admin --db-layout=sql_single --users=adminClasslist.lst --professors=admin |
||
− | # /opt/webwork/webwork2/bin/addcourse admin --db-layout=sql_single --users=adminClasslist.lst --professors=admin |
||
+ | # exit |
||
− | # exit |
+ | # exit |
− | + | $ |
|
− | $ |
||
− | </verbatim> |
||
− | Now goto |
+ | Now goto <code>http://yourserver.yourschool.edu/webwork2</code> and should see the WeBWorK home page with <code>Course Adninistration</code> listed at the top. Click on it and login with Username <code>admin</code> and Password <code>admin</code> . This first thing you should do is to click on <code>Password/Email</code> and change <code>admin</code> 's password to something more secure than <code>admin</code> . |
− | Unless you choose oherwise, users with |
+ | Unless you choose oherwise, users with <code>professor</code> privilges in the <code>admin</code> course (i.e. WeBWorK administrators) will automatically be added to new courses with <code>professor</code> privilges and the same password as in the <code>admin</code> course. Initially the only such user is <code>admin</code> (hopefully you are not confused by the fact that the course <code>admin</code> has a user named <code>admin</code>). It's usually convenient make yourself a WeBWorK administrator. To do this (assuming you are logged in as <code>admin</code> to the <code>admin</code> course at <code>http://yourserver.yourschool.edu/webwork2/admin</code> ) |
− | + | # Click on <code>Classlist Editor</code> in the left panel |
|
− | + | # Check <code>Add 1 student(s)</code> and click <code>Take Action!</code> |
|
− | + | # Enter the appropiate information (you can leave the last three items blank) and click <code>Add Students</code> |
|
− | + | # Click on <code>Classlist Editor</code> in the left panel again |
|
− | + | # When you enter a new student, by default their <code>Student ID</code> is used as their password. We'll change this now. |
|
− | + | # Select yourself with a check mark and then check <code>Give new password to Selected users</code> or just check <code>Give new password to All users</code> (as a safely mechanism you can not change the password for the user you are logged in as, currently <code>admin</code>, this way) and then click <code>Take Action!</code> |
|
− | + | # Enter the password, check <code>Save changes</code> and then click <code>Take Action!</code> |
|
− | + | # Finally give yourself <code>professor</code> privilges by selecting yourself with a check mark, checking <code>Edit Selected users</code> and then clicking <code>Take Action!</code> (or by just clicking on the "pencil" next to your login name which is a much faster way to edit classlist data for a single user) |
|
− | + | # Now at the far right change <code>Permission Level</code> from 0 (an ordinary student) to 10 (an esteemed professor) |
|
− | + | # Check <code>Save changes</code> and then click <code>Take Action!</code> |
|
− | At some point you will probably want to hide the |
+ | At some point you will probably want to hide the <code>admin</code> course so that it is not listed on the WeBWorK home page. As we noted above the <code>modelCourse</code>, which is already hidden, is not a real course so you will get an error message if you try to log into it. This is a good reason to hide it. The <code>modelCourse</code> is very useful as a model (hence its name) for setting up other courses. The <code>admin</code> course is used for administering WeBWorK and even though regular users can not log into it (you did change the <code>admin</code> password, didn't you!!), it a little bit cleaner and safer to hide it from prying eyes. |
− | To hide a course place a file named |
+ | To hide a course place a file named <code>hide_directory</code> in the course directory and it will not show up in the courses list on the WeBWorK home page. It will still appear in the Course Administration listing. If you do this you will still be able to access the <code>admin</code> course using the URL <code>http://yourserver.yourschool.edu/webwork2/admin</code> but you will not see a link for it on the WeBWorK home page <code>http://yourserver.yourschool.edu/webwork2</code> . Let's hide the <code>admin</code> course. |
− | <verbatim> |
||
+ | $ cd |
||
− | $ cd |
||
+ | $ gedit hide_directory |
||
− | $ gedit hide_directory |
||
− | </verbatim> |
||
Now you don't really have to put any verbiage in the file but I suggest you put: |
Now you don't really have to put any verbiage in the file but I suggest you put: |
||
− | <verbatim> |
||
− | Place a file named "hide_directory" in a course or other directory |
||
− | and it will not show up in the courses list on the WeBWorK home page. |
||
− | It will still appear in the Course Administration listing. |
||
− | </verbatim> |
||
− | Save the file and quit. Now copy the file to the =admin= course. |
||
+ | Place a file named "hide_directory" in a course or other directory |
||
+ | and it will not show up in the courses list on the WeBWorK home page. |
||
+ | It will still appear in the Course Administration listing. |
||
− | <verbatim> |
||
+ | Save the file and quit. Now copy the file to the <code>admin</code> course. |
||
− | $ sudo cp hide_directory /opt/webwork/courses/admin |
||
− | password:<your password> |
||
− | </verbatim> |
||
− | Now goto =http://yourserver.yourschool.edu/webwork2= and no course will be listed. |
||
+ | $ sudo cp hide_directory /opt/webwork/courses/admin |
||
+ | password:<your password> |
||
− | ---++ Starting and Stoping Apache, <nop>MySQL and the GNOME desktop GUI |
||
+ | Now goto <code>http://yourserver.yourschool.edu/webwork2</code> and no course will be listed. |
||
− | If you make changes to the system, you will have to restart =apache2= before the changes take effect. On rare ocassions you may need to restart =<nop>MySQL=. |
||
− | ---+++ Starting and Stoping Apache |
||
− | You have to run these commands as =root=. |
||
− | To start or restart (i.e. stop and then start) the =apache2= webserver run the command |
||
+ | == Starting and Stoping Apache, MySQL and the GNOME desktop GUI == |
||
− | <verbatim> |
||
+ | If you make changes to the system, you will have to restart <code>apache2</code> before the changes take effect. On rare ocassions you may need to restart <code>MySQL</code>. |
||
− | $ sudo apache2ctl graceful |
||
+ | === Starting and Stoping Apache === |
||
− | password:<your password> |
||
+ | You have to run these commands as <code>root</code>. |
||
− | </verbatim> |
||
+ | |||
− | To stop the |
+ | To start or restart (i.e. stop and then start) the <code>apache2</code> webserver run the command |
− | + | ||
− | $ sudo apache2ctl |
+ | $ sudo apache2ctl graceful |
− | password:<your password> |
+ | password:<your password> |
− | + | ||
+ | To stop the <code>apache</code> webserver run the command |
||
+ | |||
+ | $ sudo apache2ctl stop |
||
+ | password:<your password> |
||
You can also start or stop apache2 by using the GUI interface. |
You can also start or stop apache2 by using the GUI interface. |
||
− | + | # Select <code>Desktop</code>, <code>Administration</code> and then <code>Services</code> |
|
− | + | # If <code>apache2</code> is running, uncheck its check box and click <code>OK</code> to stop it |
|
− | + | # If <code>apache2</code> is stopped, check its check box and click <code>OK</code> to start it |
|
+ | |||
+ | Note that I found using <code>apache2ctl</code> a more robust way to start and stop <code>apache2</code>. |
||
+ | |||
+ | === Starting and Stoping MySQL === |
||
+ | You have to run these commands as <code>root</code>. |
||
+ | |||
+ | To start the <code>MySQL</code> server run the command |
||
+ | |||
+ | $ sudo /etc/init.d/mysql start |
||
+ | root's password:<root password> |
||
+ | |||
+ | To stop the <code>MySQL</code> server run the command |
||
− | Note that I found using =apache2ctl= a more robust way to start and stop =apache2=. |
||
+ | $ sudo /etc/init.d/mysql stop |
||
+ | root's password:<root password> |
||
− | ---+++ Starting and Stoping <nop>MySQL |
||
+ | To restart the <code>MySQL</code> server run the command |
||
− | You have to run these commands as =root=. |
||
− | To start the =<nop>MySQL= server run the command |
||
+ | $ sudo /etc/init.d/mysql restart |
||
− | <verbatim> |
||
+ | root's password:<root password> |
||
− | $ sudo /etc/init.d/mysql start |
||
− | root's password:<root password> |
||
− | </verbatim> |
||
− | To stop the =<nop>MySQL= server run the command |
||
− | <verbatim> |
||
− | $ sudo /etc/init.d/mysql stop |
||
− | root's password:<root password> |
||
− | </verbatim> |
||
− | To restart the =<nop>MySQL= server run the command |
||
− | <verbatim> |
||
− | $ sudo /etc/init.d/mysql restart |
||
− | root's password:<root password> |
||
− | </verbatim> |
||
− | You can also start or stop |
+ | You can also start or stop MySQL by using the GUI interface. |
− | + | # Select <code>Desktop</code>, <code>Administration</code> and then <code>Services</code> |
|
− | + | # If <code>mysql</code> is running, uncheck its check box and click <code>OK</code> to stop it |
|
− | + | # If <code>mysql</code> is stopped, check its check box and click <code>OK</code> to start it |
|
− | + | === Starting and stopping the GNOME desktop GUI === |
|
The GNOME desktop is automatically started when the system boots. |
The GNOME desktop is automatically started when the system boots. |
||
− | To stop |
+ | To stop <code>GNOME</code> so that you only have a standard terminal window run the following in a standard terminal window |
− | <verbatim> |
||
+ | $ sudo /etc/init.d/gdm stop |
||
− | $ sudo /etc/init.d/gdm stop |
||
+ | password:<password> |
||
− | password:<password> |
||
− | </verbatim> |
||
+ | If you stopped <code>GNOME</code> and want to restart it run the following in a standard terminal window |
||
− | If you stopped =GNOME= and want to restart it run the following in a standard terminal window |
||
+ | $ sudo /etc/init.d/gdm start |
||
− | <verbatim> |
||
+ | password:<password> |
||
− | $ sudo /etc/init.d/gdm start |
||
− | password:<password> |
||
− | </verbatim> |
||
− | + | ==Install the WeBWorK Problem Libraries == |
|
− | Before we create a real course we will install the |
+ | Before we create a real course we will install the WeBWorK Problem Libraries. |
− | + | ===Install the National Problem Library === |
|
− | The |
+ | The <code>National Problem Library</code> consists of both WeBWorK problems and methods for searching and selecting problems. Also it contains as sub libraries many of the other standard libraries. Normally this library is referred to as the <code>ProblemLibrary</code> but the downloaded CVS directory for it is named <code>database_problems</code>. So the first thing we do is to link <code>ProblemLibrary</code> to <code>database_problems</code>. |
− | <verbatim> |
||
+ | $ cd /opt/webwork/libraries/ |
||
− | $ cd /opt/webwork/libraries/ |
||
+ | $ sudo ln -s database_problems ProblemLibrary |
||
− | $ sudo ln -s database_problems ProblemLibrary |
||
+ | password:<password> |
||
− | password:<password> |
||
− | </verbatim> |
||
+ | Next we have to edit <code>global.conf</code>. |
||
− | Next we have to edit =global.conf=. |
||
+ | $ cd /opt/webwork/webwork2/conf |
||
+ | $ su |
||
+ | Password: <root password> |
||
+ | # gedit global.conf |
||
− | <verbatim> |
||
+ | # Search for <code>problemLibrary</code> and replace <code>$problemLibrary{root} = "";</code> by <br /> <code>$problemLibrary{root} = "/opt/webwork/libraries/ProblemLibrary";</code> |
||
− | $ cd /opt/webwork/webwork2/conf |
||
− | $ su |
||
− | Password: <root password> |
||
− | # gedit global.conf |
||
− | </verbatim> |
||
− | 1.Search for =problemLibrary= and replace =$problemLibrary{root} =<nop> "";= by <br /> =$problemLibrary{root} =<nop> "/opt/webwork/libraries/ProblemLibrary";= |
||
Then save the file and quit. And return to a regular user |
Then save the file and quit. And return to a regular user |
||
− | <verbatim> |
||
− | #exit |
||
− | $ |
||
− | </verbatim> |
||
− | We now create a database, called =ProblemLibrary=, for for the Problem Library. |
||
+ | #exit |
||
+ | $ |
||
+ | |||
+ | We now create a database, called <code>ProblemLibrary</code>, for for the Problem Library. |
||
To do this do the following: |
To do this do the following: |
||
− | <verbatim> |
||
− | $ mysql -u root -p mysql |
||
− | Enter password: <mysql root password> |
||
− | mysql> CREATE DATABASE ProblemLibrary; |
||
− | mysql> GRANT SELECT ON ProblemLibrary.* TO webworkWrite@localhost; |
||
− | mysql> exit |
||
− | Bye |
||
− | $ |
||
− | </verbatim> |
||
− | Run the installation script making sure you are in the =/opt/webwork/libraries/ProblemLibrary= directory. This directory |
||
+ | $ mysql -u root -p mysql |
||
− | contains the files =loadDB2= and =create_tables2.sql=. |
||
+ | Enter password: <mysql root password> |
||
+ | mysql> CREATE DATABASE ProblemLibrary; |
||
+ | mysql> GRANT SELECT ON ProblemLibrary.* TO webworkWrite@localhost; |
||
+ | mysql> exit |
||
+ | Bye |
||
+ | $ |
||
− | <verbatim> |
||
+ | Run the installation script making sure you are in the <code>/opt/webwork/libraries/ProblemLibrary</code> directory. This directory |
||
− | $ cd /opt/webwork/libraries/ProblemLibrary |
||
+ | contains the files <code>loadDB2</code> and <code>create_tables2.sql</code>. |
||
− | $ ./loadDB2 <mysql root password> |
||
+ | |||
− | </verbatim> |
||
+ | $ cd /opt/webwork/libraries/ProblemLibrary |
||
+ | $ ./loadDB2 <mysql root password> |
||
This has to convert a lot of data so please be patient; it can take a long time. |
This has to convert a lot of data so please be patient; it can take a long time. |
||
Line 1,096: | Line 1,021: | ||
library, unpack the new copy in the same place, and run loadDB.pl. |
library, unpack the new copy in the same place, and run loadDB.pl. |
||
− | + | ===Set up the Rochester and Union Libraries === |
|
− | First we need to edit |
+ | First we need to edit <code>global.conf</code> one last time |
− | <verbatim> |
||
+ | $ cd /opt/webwork/webwork2/conf |
||
− | $ cd /opt/webwork/webwork2/conf |
||
+ | $ su |
||
− | $ su |
||
+ | Password: <root password> |
||
− | Password: <root password> |
||
+ | # gedit global.conf |
||
− | # gedit global.conf |
||
+ | |||
− | </verbatim> |
||
+ | # Search for <code>courseFiles{problibs}</code> and scroll down several lines to the line <br /> <code># rochesterLibrary => "Rochester",</code> |
||
− | 1.Search for =courseFiles{problibs}= and scroll down several lines to the line <br /> =# rochesterLibrary =<nop>> "Rochester",= |
||
+ | # Uncomment this line (i.e. remove the <code>#</code>) so it becomes <br /> |
||
− | 1.Uncomment this line (i.e. remove the =#=) so it becomes <br /> |
||
+ | <code>rochesterLibrary => "Rochester",</code> |
||
− | =rochesterLibrary =<nop>> "Rochester",= |
||
+ | # Directly below this line add the line <br /> |
||
− | 1.Directly below this line add the line <br /> |
||
+ | <code>unionLibrary => "Union",</code> |
||
− | =unionLibrary =<nop>> "Union",= |
||
+ | # Search for <code>macrosPath</code> and scroll down several lines to the line <br /> <code>$pg{directories}{macros},</code> |
||
− | 1.Search for =macrosPath= and scroll down several lines to the line <br /> =$pg{directories}{macros},= |
||
+ | # After this line add the two lines: <br /> <code>'/opt/webwork/libraries/union_problib/macros',</code> <br /> <code>'/opt/webwork/libraries/union_problib/parserOrientation',</code> |
||
− | 1.After this line add the two lines: <br /> ='/opt/webwork/libraries/union_problib/macros',= <br /> ='/opt/webwork/libraries/union_problib/parserOrientation',= |
||
Then save the file and quit. |
Then save the file and quit. |
||
− | Since we have edited |
+ | Since we have edited <code>global.conf</code> a lot and this is a very critical file, it would be a good idea to run |
− | <verbatim> |
||
+ | |||
− | $ diff global.conf global.conf.dist |
+ | $ diff global.conf global.conf.dist |
− | + | ||
and check that you haven't made any mistakes (e.g. by introducing an inadvertant line break, etc). |
and check that you haven't made any mistakes (e.g. by introducing an inadvertant line break, etc). |
||
− | We next put links to the Rochester and Union Libraries in the |
+ | We next put links to the Rochester and Union Libraries in the <code>modelCourse</code> so that when we create courses copying templates from the <code>modelCourse</code>, these libraries will be available. Skip this step if you usually only want to use National Problem Library. |
− | <verbatim> |
||
+ | $ cd /opt/webwork/courses/modelCourse/templates/ |
||
− | $ cd /opt/webwork/courses/modelCourse/templates/ |
||
+ | $ sudo ln -s /opt/webwork/libraries/union_problib/ unionLibrary |
||
− | $ sudo ln -s /opt/webwork/libraries/union_problib/ unionLibrary |
||
+ | Password:<your password> |
||
− | Password:<your password> |
||
+ | $ sudo ln -s /opt/webwork/libraries/rochester_problib/ rochesterLibrary |
||
− | $ sudo ln -s /opt/webwork/libraries/rochester_problib/ rochesterLibrary |
||
− | </verbatim> |
||
− | + | ==Create Your First Actual Course == |
|
− | Now log into the |
+ | Now log into the <code>admin</code> course ( <code>http://yourserver.yourschool.edu/webwork2/admin</code> ) as yourself or <code>admin</code> and |
− | + | # click on <code>Add Course</code> |
|
− | + | # For <code>Course ID</code> enter <code>myTestCourse</code> |
|
− | + | # For <code>Course Title</code> enter <code>My Test Course</code> |
|
− | + | # Enter your institution |
|
− | + | # Leave <code>Add WeBWorK administrators to new course</code> checked |
|
− | + | # Add an additional instructor if you wish |
|
− | + | # Copy templates from: <code>modelCourse</code> (the default action) |
|
− | + | # Select sql_single for the database layout. |
|
− | + | # Click on <code>Add Course</code> |
|
− | + | # Click <code>Log into myTestCourse</code> |
|
− | and log in either as |
+ | and log in either as <code>admin</code> or yourself. |
− | At some point you will probably want to "hide" |
+ | At some point you will probably want to "hide" <code>myTestCourse</code> from general view but you already know how to do that. |
− | + | ==Where to go From Here == |
|
− | You should play around with |
+ | You should play around with <code>myTestCourse</code> e.g. click on <code>Library Browser</code> and browse the <code>Problem Library</code> and also the <code>Rochester</code> and <code>Union</code> libraries. |
− | Look at [[http://webhost.math.rochester.edu/webworkdocs/docs/courseadmin/usingwebwork]] |
+ | Look at [[http://webhost.math.rochester.edu/webworkdocs/docs/courseadmin/usingwebwork|http://webhost.math.rochester.edu/webworkdocs/docs/courseadmin/usingwebwork]] |
Read the CourseAdministrationManual for more information about creating courses. |
Read the CourseAdministrationManual for more information about creating courses. |
||
− | |||
+ | Consult the WeBWorKDocs topic for other WeBWorK documentation. |
||
− | Consult the WeBWorKDocs topic for other %WW% documentation. |
||
− | |||
− | |||
− | |||
− | --- |
||
-- Main.ArnoldPizer - 21 June 2007 Initial version based on Sam Hathaway's InstallationManualV2pt3<br /> |
-- Main.ArnoldPizer - 21 June 2007 Initial version based on Sam Hathaway's InstallationManualV2pt3<br /> |
||
[[Category:Installation Manuals]] |
[[Category:Installation Manuals]] |
||
+ | [[Category:Bad TWiki Conversions]] |
Latest revision as of 16:30, 3 June 2013
This feature was deprecated in version 2.6. For up-to-date information view Github. 9
See also: History of WeBWorK version control
These instructions cover the installation of the Debain Linux 4.0 operating system and WeBWorK 2.3 from scratch.
They are more detailed (but offer fewer choices and often less background information) than the general InstallationManualV2pt3 and are aimed at non unix experts. Readers may want to quickly scan InstallationManualV2pt3 to get an overview of the installation process and then carefully read and follow these instructions.
Contents
- 1 Notation
- 2 Installing the Debian 4.0 rev0 Linux Operating System
- 3 Terminal Window Notation and Use
- 4 Installing Perl Modules
- 5 Apache 2 and mod_perl
- 6 Checking MySQL
- 7 Reboot and Test
- 8 MySQL Security Issuses
- 9 Downloading the WeBWorK System Software and Problem Libraries
- 10 Installing WeBWorK
- 11 Configuring the Shell
- 12 Checking Module Dependancies
- 13 Configuring WeBWorK
- 14 Configuring Apache
- 15 Test your configuration
- 16 If Something is Wrong
- 17 Create the admin Course
- 18 Starting and Stoping Apache, MySQL and the GNOME desktop GUI
- 19 Install the WeBWorK Problem Libraries
- 20 Create Your First Actual Course
- 21 Where to go From Here
Notation
First some short 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.
<root password>
to indicate you have to enter the root password.
^
will indicate the <Ctrl>
key so e.g. ^X
is really shorthand for
<Ctrl> <X>
, i.e. press the Ctrl key and hit the X key.
We will give references to specific versions of software, e.g. httpd-2.2.4.tar.gz rather than the more general httpd-2.x.x.tar.gz. In most cases you should be able to use the latest stable version but we have only tested the versions listed.
Installing the Debian 4.0 rev0 Linux Operating System
Installation DVD
Obtain the installation DVD/CD set. Connect to [[1]] for information. For example you can use wxDownload Fast or BitTorrent to download ISO images of the installation DVD's and then burn your own installation DVD's. If you download ISO images, make sure that you verify the integrity of the downloaded files by comparing the MD5 checksums of the downloaded files with the MD5 checksums listed at www.debian.org. wxDownload Fast automatically calculates the MD5 checksums which is convenient. I have had good luck downloading from mirrors.kernel.org but your experience may differ. These instructions will assume you have the three installation DVD's but installing from a commercial DVD/CD set or a downloaded CD set or from the net should be essentially identical.
Place the first installation DVD in your DVD drive, turn the computer off and then back on, and boot your computer from the DVD drive. You may have to press <F12> during the boot process to bring up a boot menu which will allow you to select booting from the DVD. Or you many have to edit the BIOS to select the DVD as the first boot device. Note that with version 3.1 I had to physically turn the computer off and then turn it back on (not just reboot it) in order for the network card to be recognized by Debian but version 4.0 worked OK with just rebooting.
You will see a list of options.
- If you want hit
<F1>
to obtain help and see additional boot methods - You can just hit
<Enter>
to accept the default install method except in the following situation - If your network has DHCP enabled but you want to setup your server with a static IP address, then after the
boot:
prompt typeinstall netcfg/disable_dhcp=true
and then hit<Enter>
- A succession of pages follow, for each select the obvious option and hit
<Enter>
. For example my obvious options areEnglish
,United States
, andAmerican English
- The system will than scan your DVD and load various components
- If your system has multiple network interfaces, you will be asked to select the one to be used during the installation (which will usually be a hard wired ethernet connection)
- Unless you entered the
netcfg/disable_dhcp=true
boot option above, the system will try to configure your network using DHCP. If you have DHCP, your network interface will be set up automatically. If you don't have DHCP, automatic network configuration will fail quickly (or just hit<Enter>
toCancel
if you are impatient). Then hit<Enter>
toContinue
Manual network configuration. If your network interface was set up automatically by DHCP, you can skip the rest of this paragraph. Otherwise you will have to enter your machine's static ip address, etc. To do this
- Select
Configure network manually
- Enter your computer's IP address and
Continue
- The
netask
is probably OK as it but another possibility may be 255.255.0.0 - Enter the ip address of your gateway router. Debian makes a good guess at this, but your network may be set up differently.
- Next enter the ip address(es) of up to 3 nameservers separated by spaces (at a minimum you have to enter the ip address one nameserver)
- Enter the name of your server and then
- Enter the domain name (e.g. mine is math.rochester.edu but yours is obviously different)
- This completes the static ip address setup
Next comes the Partition disks
pages. You should be able to accept the defaults (unless you are dual booting operating systems, etc. but then you are not a novice user and you are on your own for that part)
- Select your time zone and wait for the clock to be configured
- Enter the password for the root user and confirm it. Do not forget what you enter here
- Choose to create a
normal user
and enter yourself as a user (with user name and password) - Now the base installation will take place --- this may take a short time
- Choose to set up a network mirror. Select your country and a mirror. In the US I have found that mirrors.kernel.org works well
- You should be able to leave the proxy information blank
- I chose not to participate in the package usage survey
Next we come to software selection. Since it is much easier for a non unix expert to use a graphical user interface (GUI), we will install this. We will put off installing the necessary web server software until later.
- Under
Software selection
selectDesktop environment
andStandard system
and then hitContinue
- Now sit back and relax while the installation takes place --- this may take awhile
- The last step is to install the boot loader. I have a non standard setup and for some reason I had trouble installing the Grub boot loader but Lilo worked fine. Almost certainly, Grub will work fine for you
Continue Installation
After this finishes the system will eject the DVD and ask you to reboot. Note that with version 3.1 I had to physically turn off the computer off and then turn it back on (not just reboot it) in order for the network card to be recognized but version 4.0 worked OK with just rebooting.
- Log into your regular account
- Accept any available updates (you will see a popup window). You will have to enter the
<root password>
but (if you keep the defaults checked) it will be saved for this session. Then clickinstall Updates
. Follow any instructions, e.g. if you install a new kernel, you may be told to reboot as soon as the installation is completed (to reboot, selectDesktop
,Shut Down...
and thenRestart
)
Debian Software Packages
Our next task is to install a number of Debian software packages.
- Select
Desktop
,Administration
and thenSynaptic Package Manager
. You will have to enter the<root password>
if you rebooted above. TheSynaptic Package Manager
window will open - First we make sure the package information is current. Select
Edit
and thenAdd CD-ROM...
- Place the second Debian DVD/CD in the DVD drive and it will be scanned for index files (the first one has already been scanned)
- Continue until you have scanned all of your remaining DVD/CD's and then select
<No>
to theScan another CD
question
Now we will actually select and install a large number of packages. The process is the same for all packages. I'll give an example of installing libapache-authnetldap-perl
and then just give the list of required packages.
- Select
Search
- Under
Look in:
selectName
. The defaultDescription and Name
sometimes returns too many possibilities - We are searching for
libapache-authnetldap-perl
so enterldap-perl
(or something similar) and click onSearch
- This should result in 3 possibilities. Select and Mark for Installation (by double clicking or checking and then selecting
Mark for Installation
)libapache-authnetldap-perl
. You will see a pop up windowMark additional required changes?
and you should always clickMark
to accept the requirements. - Follow this basic procedure for all the packages listed below
Here is the list of Debian packages that need to be installed. See InstallationManualV2pt3 for a short explanation of what most of these packages do.
apache2
apache2-mpm-prefork
cvs
dvipng
libapache-authnetldap-perl
libapache2-request-perl
libdatetime-perl
libdbd-mysql-perl
libemail-address-perl
libextutils-xsbuilder-perl
libgd-gd2-perl
libmail-sender-perl
libossp-uuid-perl
libstring-shellquote-perl
libtimedate-perl
libxml-parser-perl
libxml-writer-perl
mysql-server-5.0
netpbm
openssh-server
preview-latex-style
tetex-bin
tetex-extra
When I do this I see on the bottom of Synaptic Package Manager
window 61 to install/upgrade
(note that I didn't install libapache-authnetldap-perl
separately; if you did your number will differ).
Now click Apply
and Apply
again to confirm the changes. You will be prompted to insert DVD's.
After the packages are successfully installed, you can close the Synaptic Package Manager
and remove your last DVD.
That completes the set up of your base Debian system.
Test Browser and Keyboard
After your desktop reappears, click on Applications
, Internet
, Icewease Web Browser
and you should be connected to the world.
Goto
[[2]]
where you can view this document and, if you want, copy commands that you need (see below).
Here's an aside on keystroke delay and repetition rate. If you are like me and find the keystroke delay too short (so that you often type "geeet" when you want to type "get"), do the following. Click Desktop
, Preferences
, Keyboard
and then increase the delay time interval and hit Close
.
Terminal Window Notation and Use
Before installing and configuring additional software, we need to talk about terminal windows.
To open a terminal window click Applications
, Accessories
and then select Terminal
for a normal user or
Root Terminal
for root.
In a terminal window some commands will have to be run as root whereas others should be run as a regular user. We will use # to indicate that the command is to be run as root e.g.
# visudo
and $ to indicate that the command is to be run as a normal user e.g.
$ cp .bashrc .bashrc.bak1
To execute the above commands you have to hit <Enter>
. We'll just assume this.
After executing a command, often the system will respond with text (sometimes a lot of text!) which we will usually not repeat below. We only give the commands that you should execute.
The bash shell which you will be using has a number of very convenient features.
One is command and file name completion. If you are typing (e.g.
ch
) and hit <tab>
bash will complete the command or filename if it is
unambiguous (or more precisely it will complete as much as possible).
If there are multiple possibilities (as in the case of ch
) nothing will
happen (except you may hear a beep) and you can type more letter(s) and hit <tab>
again. Or you can
hit <tab>
a second time and you will see a list of all possible
completions. E.g. entering ch<tab><tab>
gives a list of possible
completions and ch<tab>g<tab>
(or chg<tab>
) gives chgrp
, the change group command. This
is very fast and convenient and it also leads to fewer typing errors.
Another useful shortcut is the command history. Using the up and down arrow keys will bring up previous commands which can be edited and then executed. If you are repeating a command or entering a command which is similar to a previous one, this is very useful.
You can copy commands from these instructions (with copy
from the Edit dropdown list or ^C
) and paste them into a terminal window
(with paste
from the Edit dropdown list or <Shift> <Ctrl> <V>
). However typing yourself using command completion is probably just as fast except if a command is long.
Finally perhaps a safer way to run commands as root
is to use the sudo
command
$ sudo <command> password: <your password>
After you enter the password the command is executed. For a certain period (maybe 5 minutes) you can execute additional sudo
commands without reentering <your password>
. A log of all sudo
commands is kept (I don't know where). In these instructions for the most part we will not use sudo
, but keep it in mind for other times that you have to become root
in order to execute a few commands (e.g. restarting apache
).
Note that in order to use sudo, you must be listed in the sudoers
file. To do this open a Root Terminal
and then
# visudo
A nano editing window will open up and you will be editing /etc/sudoers.tmp
. At the end of this file add the line
your_user_name ALL=(ALL) ALL
where of course you replace your_user_name
with your user name. Then hit ^X
to exit, Y
to save changes and <Enter>
to save changes to /etc/sudoers.tmp
. Then visudo
will automatically update the real sudoers
file. It's a good practice to close the Root Terminal
window so that you don't accidentally enter a command as root that you meant to run as a regular user.
For our next terminal window task open a (standard) terminal window and create a downloads
directory where we will keep copies of downloaded software.
$ cd $ mkdir downloads
Installing Perl Modules
We now have to install one additional Perl module (XML::Parser::EasyTree
) which is unfortunately not available from the Debian package system.
Testing Perl Modules
To test if a Perl module is installed and working on your system, issue the following command, replacing Module
with the name of the module:
$ perl -MModule -e 'print "installed!\n"'
If the module is installed you will see installed!
. If not you will see at lot of gibberish. E.g. at this stage in our installation process CPAN
is installed and MXML::Parser::EasyTree
is not so
$ perl -MCPAN -e 'print "installed!\n"'
yields
installed!
and
$ perl -MXML::Parser::EasyTree -e 'print "installed!\n"'
yields
Can't locate XML/Parser/EasyTree.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 ...
Installing Additional Perl Modules from CPAN
Be aware that in rare cases you might have to as root run
$ su <root password> # unset LANG # exit $
since otherwise the installation of some modules (Module::Build is an example) may fail.
First we will set up CPAN. For this you have to be root.
$ su <root password> # perl -MCPAN -e shell
Since this is the first time you are using CPAN it will ask you Are you ready for manual configuration?
Respond no
and that should be it.
Next we add at least one mirror and reload the index. A list of mirrors can be found at [[3]]. To add the mirror ftp://mirrors.kernel.org/pub/CPAN and reload the index do the following. For me, a slow and inaccurate typist, copying (^C
) and pasting (<Shift> <Ctrl> <V>
) is much faster.
cpan> o conf urllist push ftp://mirrors.kernel.org/pub/CPAN cpan> reload index
Note that one time this failed when I tried to do it in the evening but when I tried again the next morning it worked fine. Now we update CPAN itself
cpan> install Bundle::CPAN
and always hit <Enter>
to accept the defaults when prompted. This can be a long process with many long pauses. Please be patient.
When you again see the
cpan>
prompt enter
cpan> reload cpan cpan> o conf commit
Now install XML::Parser::EasyTree
cpan> install XML::Parser::EasyTree
and in case you are prompted accept all defaults by just hitting <Enter>
.
Note that if you have more than one module to install, you can just list them after install
separated by spaces.
When you again see the
cpan>
prompt enter
cpan> exit
Installing Additional Perl Modules from Source
At one point in time (August 2006), the installation of DateTime
using CPAN was broken. Currently DateTime
can be installed using CPAN. However it is useful to show you how to install perl modules from source in case one of the perl modules we installed above gets updated and its installation from CPAN becomes broken. If that happens you can follow the procedures outlined here to install the module from source.
IMPORTANT: With Debian we have already installed DateTime
so you don't have to install it as outlined below. We are just using this as an example of installing a module from source which hopefully you will never have to do. You can skip this section and go directly to the Apache 2 and mod_perl section.
Now we give the example of installing DateTime
from source. As we said you can skip this part.
Goto [[4]],
search for DateTime
and click on DateTime
. Then near the top right download DateTime-0.36.tar.gz
and save it to disk. Move it to your downloads
directory. Then
$ cd $ cd downloads $ tar -zvxf DateTime-0.36.tar.gz $ cd DateTime-0.36/ $ perl Makefile.PL $ make $ make test
If make test
indicates something is missing you will have to install that. In fact in the case of DateTime
, you would see that quite a few things are missing.
DateTime
requires the additional modulesversion
,Module::Build
,Class::Singleton
,DateTime::TimeZone
andDateTime::Locale
. We could install these using CPAN
# perl -MCPAN -e shell cpan> install version Module::Build Class::Singleton DateTime::TimeZone DateTime::Locale cpan> exit # exit $
If you see anything that looks suspicious during this process, you can always test to see if the perl module in question was in fact installed. If it was not installed
try CPAN first and if CPAN fails then install it from source. The great thing about CPAN (if it works) is that it will trace down and automatically install all required components. Note that if you get a message indicating that package/file.pm
was not found, you should serach for and install package::file
since perl modules use a double colon (::
) as a directory separator.
Assuming all is OK
$su <root password> # make install # exit $
Finally you should definitely test that the module (e.g. DateTime
) was installed sucessfully
$ perl -MDateTime -e 'print "installed!\n"'
If you see
installed!
you can celebrate.
Apache 2 and mod_perl
First we have to enable a couple apache modules. Open a Root terminal
or keep acting as root
in a standard terminal and
# a2enmod apreq
# a2enmod info
Next we make a copy of the apache configuration file for safekeeping. In the Root terminal
# cd /etc/apache2/
# cp apache2.conf apache2.conf.bak1
Next we will edit the apache configuration file apache2.conf
to allow us to view information about the setup and performance of the web server. Note that this is not absolutely necessary but it can be very useful. You can use your favorite editor but we will give instructions assuming you are using gedit
. Note that you have to be root to edit apache2.conf
. In the Root terminal
# cd /etc/apache2/
# gedit apache2.conf
In the gedit
edit window near the end of the file uncomment (i.e. remove the #
's from) the operational lines below. Leave the obvious comment lines (# Allow server status reports ... domain to enable.
and # Allow remote server configuration reports... domain to enable.
) commented.
The original lines are
#<IfModule mod_status.c> # # Allow server status reports generated by mod_status, # with the URL of http://servername/server-status # Change the ".example.com" to match your domain to enable. # #<Location /server-status> # SetHandler server-status # Order deny,allow # Deny from all # Allow from .example.com #</Location> #</IfModule> #<IfModule mod_info.c> # # Allow remote server configuration reports, with the URL of # http://servername/server-info (requires that mod_info.c be loaded). # Change the ".example.com" to match your domain to enable. # #<Location /server-info> # SetHandler server-info # Order deny,allow # Deny from all # Allow from .example.com #</Location> #</IfModule>
Now in both places replace Allow from .example.com
by Allow from localhost
. If in addition you want to allow access to server information from e.g. your department domain, add new lines Allow from .math.yourschool.edu
below the two Allow from
lines where of course you should edit .math.yourschool.edu
appropriately. The code (except for yourschool
) should look like
<IfModule mod_status.c> # # Allow server status reports generated by mod_status, # with the URL of http://servername/server-status # Change the ".example.com" to match your domain to enable. # <Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from localhost Allow from .math.yourschool.edu </Location> </IfModule> <IfModule mod_info.c> # # Allow remote server configuration reports, with the URL of # http://servername/server-info (requires that mod_info.c be loaded). # Change the ".example.com" to match your domain to enable. # <Location /server-info> SetHandler server-info Order deny,allow Deny from all Allow from localhost Allow from .math.yourschool.edu </Location> </IfModule>
Then save the file and quit (File
, Save
and File
, Quit
.
Just to be sure you changed what you wanted do run
# diff apache2.conf apache2.conf.bak1 # exit $
diff
should report the changes you made and only those.
Now we have to set your server's fully qualified domain name.
- Select
Desktop
,Administration
,Networking
- Click on
Hosts
- Select the entry with IP Address 127.0.0.1 and click
Properties
- Under Aliases first enter your server's fully qualified domain name, something like
your_server_name.department.school.edu
- Next separated by a space or newline enter
localhost
- And finally, again separated by a space or newline, enter
your_server_name
(it's important thatlocalhost
comes first) - Note that
localhost
andyour_server_name
are probably already listed in which case you only have to enter your server's fully qualified domain name as the first entry - Then click
OK
There should also be an entry with your server's IP address (if not you should add one)
- Select the entry with your server's IP address and click
Properties
- Under Aliases you should see first your server's fully qualified domain name, something like
your_server_name.department.school.edu
- And next, separated by a space or newline,
your_server_name
- Add or edit these entries if they are not correct
- Then click
OK
- And click
OK
again to closeNetwork settings
You can check these settings by running the commands
# exit exit $ hostname --fqdn
and
$ hostname
The first respond with the fully qualified domain name and the second with just your_server_name
.
Now restart Apache
$su <root password> # apache2ctl graceful # exit $
and test your server by connecting to "http://localhost/" and/or connecting to your server from a browser on a remote machine. You should see the page It works! indicating that apache is running.
You can check Apache's status by connecting to "http://localhost/server-status" using a browser on your machine or from a browser on a remote machine in the math.yourschool.edu domain.
Further test Apache by connecting to
"http://localhost/server-info" using a browser on your machine (or or from a browser on a remote machine in the math.yourschool.edu domain) and you will see a page listing various
information about apache. In particular under Server Settings
you should see
Server Version: Apache/2.2.3 (Debian) mod_apreq2-20051231/2.6.0 mod_perl/2.0.2 Perl/v5.8.8
indicating that both mod_apreq2
and mod_perl
are installed.
Checking MySQL
First check that MySQL is running by
$ mysql -u root
You should see
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 5.0.26 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
Enter exit
to exit
mysql> exit Bye $
Reboot and Test
Now remove your DVD and reboot the system (Desktop
, Shut Down...
, Restart
).
Now connect to "http://localhost/" using a browser on your machine and/or to your server from a browser on a remote machine. You should see the page It works! indicating that apache is running.
This is also a good time to check that you can login your server from a remote location using SSH (non secure telnet and FTP are not allowed but secure SSH and SFTP are). If you are using "SSH Secure Shell" (now called "SSH Tectia"), a popular SSH client for PC's, you will have to add Keyboard Interactive
to the list of "Authentication methods" under "Authentication" if it's not already there.
Finally test that MySQL is running.
$ mysql -u root ... mysql> mysql> exit Bye $
Currently the MySQL password is empty so we didn't need a password. We will take care of that now.
MySQL Security Issuses
As initially set up, MySQL is an open system. The root accounts are not password protected. See e.g. [[5]] for information on this. We recommend giving passwords to the root accounts. There are two root accounts, one is root@localhost
and the other is root@host_name
where host_name
is the name of your server. To find this name, do the following
$ mysql -u root mysql> SELECT Host, User, Password FROM mysql.user;
You will see a table with three entries. For localhost
you will see two Users, root
and debian-sys-maint
. The other listed Host (with only the root
user) is the name of your server which we will denote by host_name
.
Now we will assign a password to these root
accounts.
In the second command below, replace host_name
with the name of the server host. In both commands replace newpwd
with your choosen MySQL root
password. As was said above, "Do not forget what you enter here". Also remember that this is the password for the MySQL root
user, not the Debian linux system root
user. Below we refer to this as <mysql root password>
mysql> UPDATE mysql.user SET password=PASSWORD('newpwd') WHERE host='localhost' and user='root'; mysql> UPDATE mysql.user SET password=PASSWORD('newpwd') WHERE host='host_name' and user='root'; mysql> FLUSH PRIVILEGES;
Now use your up arrow key to run the command
mysql> SELECT Host, User, Password FROM mysql.user;
and you should see that all three users now have passwords.
Then exit MySQL
mysql> exit Bye $
and test that all is well:
$ mysql -u root -p Enter Password: <mysql root password>
You should see
Welcome to the MySQL monitor ... mysql>
Enter
mysql> SELECT Host, User, Password FROM mysql.user;
and you should see encrypted passwords for all three accounts. Note that the way MySQL is set up, you can only gain access to the localhost
account, not to the host_name
account but setting a password for the host_name
account is a safer thing to do in case the set up gets changed. Now exit MySQL
mysql> exit
Bye
$
and congratulate yourself. You are now ready for the next and hopefully easy part, installing WeBWorK.
Downloading the WeBWorK System Software and Problem Libraries
We are finally at the point where we can start downloading and installing WeBWorK. We will use CVS to download WeBWorK. This is easy and it will also make it easy to update the system in the future. General instructions can be found in the WeBWorKCVSReadOnly topic but the following will get the job done. Note that the following are rather long commands; it is much easier to copy (^C
) them from this document and paste (<Shift> <Ctrl> <V>
) them in a terminal window
$ cd $ cd downloads $ cvs -d :pserver:anoncvs@cvs.webwork.rochester.edu:/webwork/cvs/system checkout -r rel-2-3-dev webwork2 pg $ cvs -d :pserver:anoncvs@cvs.webwork.rochester.edu:/webwork/cvs/rochester checkout rochester_problib $ cvs -d :pserver:anoncvs@cvs.webwork.rochester.edu:/webwork/cvs/union checkout union_problib $ cvs -d :pserver:anoncvs@cvs.webwork.rochester.edu:/webwork/cvs/asu checkout database_problems
The first download gives you the latest released version with patches (don't be misled by the dev
extension --- this is not a development version).
The last download contains the WeBWorK National Problem Library. This now includes the Rochester and Union Libraries along with others but some people still find it convenient to use the Rochester and Union Libraries separately. There is quite a bit of overlap between these libraries but now you system is loaded with many thousands of WeBWorK problems (over 13,000 in the National Problem Library alone).
Installing WeBWorK
Move the System into the Required Directories
As root
create a webwork
directory under /opt
and move directories there.
$ su <root password> # mkdir /opt/webwork # mv webwork2 /opt/webwork/ # mv pg /opt/webwork/
Now create the courses
and libraries
directories under webwork
and copy and move content there.
# mkdir /opt/webwork/courses # mkdir /opt/webwork/libraries # mv database_problems/ /opt/webwork/libraries/ # mv rochester_problib/ /opt/webwork/libraries/ # mv union_problib/ /opt/webwork/libraries/ # cd /opt/webwork/webwork2/courses.dist # cp *.lst /opt/webwork/courses/ # cp -r modelCourse/ /opt/webwork/courses/
Setting Permissions
The PG installation directory and files should be owned by root and not writeable by other users:
# cd /opt/webwork/pg # chown -R root:root . # chmod -R u+rwX,go+rX .
Most WeBWorK directories and files should also be owned by root and not writeable by other users:
# cd /opt/webwork/webwork2 # chown -R root:root . # chmod -R u+rwX,go+rX .
Certain data directories need to be writable by the web server. These are DATA
, courses
, htdocs/tmp
, logs
, and tmp
. It is convenient to give WeBWorK administrators access to these directories as well, so they can perform administrative tasks such as removing temporary files, creating and editing courses from the command line, managing logs, and so on. We will create a new group called wwdata
, containing both the WeBWorK administrators and the web server.
- Select
Desktop
,Administration
and thenUsers and Groups
- Select
Groups
- Click
Add Group
- For
Group name
enterwwdata
- Under
Group Members
select yourself and clickAdd
- Under
Group Members
selectwww-data
and clickAdd
(www-data
is the Apache2 webserver) - Click
OK
- Click
OK
again
If there are other users who will also be administering WeBWorK files,
now is a good time to add them. And remember to add them to the wwdata
group as above.
You can check that this suceeded in a terminal window by entering
# exit $ id <your userid>
and then you should see wwdata
listed under groups. Also
$ id www-data
should show wwdata listed under groups. Now we make the WeBWorK directories that need to be writable by the web server have wwdata
as their group. The following are rather long commands; you might want to copy them and paste them into your terminal window rather than typing them.
$ su <root password> # cd /opt/webwork/webwork2/ # chgrp -R wwdata DATA ../courses htdocs/tmp logs tmp # chmod -R g+w DATA ../courses htdocs logs tmp # find DATA/ ../courses/ htdocs/ logs/ tmp/ -type d -a ! -name CVS -exec chmod g+s {} \; # exit $
Configuring the Shell
To make working with WeBWorK easier, there are a couple of changes you can make to your shell environment.
Add the WeBWorK bin
directory to your path. This will allow you to run WeBWorK command-line utilities without typing the full path to the utility. Goto your home directory and backup your .bashrc
file
$ cd $ cp .bashrc .bashrc.bak1
Now edit .bashrc
$ gedit .bashrc
After the last line add the two lines:
export PATH=$PATH:/opt/webwork/webwork2/bin export WEBWORK_ROOT=/opt/webwork/webwork2
Then save the file and Quit.
Close your Terminal Window and open a new one so the above changes take effect. You can check that they have by
$ echo $PATH $ echo $WEBWORK_ROOT
Checking Module Dependancies
WeBWorK includes a script called check_modules.pl
that verifies that the needed programs and Perl modules are installed on your system. Run this script to make sure you have installed the required programs and Perl modules.
$ check_modules.pl apache2
Scroll up and look through the listing. It should find everything except PHP::Serialization
which is only required if you plan to use WeBWorK with Moodle and tth
which is a deprecated display mode. If something is missing (flagged by **
), look back through these instructions to find where it should have been installed and install it.
Configuring WeBWorK
Making Copies of the Distribution Configuration Files
Before configuring the system, you must make local copies of the global.conf
and database.conf
configuration files, located in /opt/webwork/webwork2/conf/
. Since these are owned by root
$ su <root password> # cd /opt/webwork/webwork2/conf # cp global.conf.dist global.conf # cp database.conf.dist database.conf
Global Configuration
Most WeBWorK configuration is done in the file /opt/webwork2/conf/global.conf
. This file provides system-wide configuration settings, and defaults for course settings. Any setting in this file can be overridden in the course.conf
file for a particular course. To override a setting for a course, just put the new setting (using the same syntax as is in global.conf
) in the course.conf= file.
There are several options that must be set for WeBWorK to work with your system. The rest of the file consists of customization options. Now edit global.conf
# cd /opt/webwork/webwork2/conf # gedit global.conf
- Search for
$externalPrograms{tar} = "/usr/bin/tar";
and replace this by
$externalPrograms{tar} = "/bin/tar";
- Now directly below this add the new line
$externalPrograms{gzip} = "/bin/gzip";
or edit it appropriately if it's already there.
WeBWorK uses the DateTime module. DateTime is supposed to be able to determine the local timezone itself without you having to enter it but this often fails so it is best to just set it here. For is a list of timezones recognized by DateTime go to
[[6]] . These timezones are more refined than standard timezone usage in that they include switches to daylight savings time (e.g. some parts of a time zone may make the switch and others may not). For example if your server is in the eastern US, on the list you will see DateTime::TimeZone::America::New_York
and you should replace $siteDefaults{timezone} = "";
by $siteDefaults{timezone} = "America/New_York";
- Search for
$siteDefaults{timezone} = "";
and enter your local timezone.
At this point TtH
is a deprecated display mode which we didn't install so we have to remove it from the listof possible display modes.
- Search for
formattedText
and comment out the line = "formattedText", # format math expressions using TtH=
so it becomes
# "formattedText", # format math expressions using TtH
We need to set a password that WeBWorK uses when it communicates with the MySQL database.
- Search for
$database_password = "";
and replace this by
$database_password = "database_password";
where of course you should replace 'database_password' with your own password. Remember this password as we will need it below.
WeBWorK sends mail in three instances. The PG system sends mail to report answers to questionnaires and free-response problems. The mail merge module is used to send mail to course participants, i.e. to report scores. The feedback module allows participants to send mail to course instructors.
To send mail, WeBWorK needs the address of an SMTP server. Normally you will use the address of your school's SMTP server. If the local machine is running an SMTP server, use localhost
. IMPORTANT: Our instructions above did not install an SMTP server so you will have to install and configue one if you do not use your school's SMTP server. When connecting to the SMTP server, WeBWorK must also send an email address representing the sender of the email (this has nothing to do with the From
address on the mail message).
- Edit the lines
$mail{smtpServer} = 'mail.yourschool.edu';
and $mail{smtpSender} = 'webwork@yourserver.yourschool.edu';
entering the appropiate information
If you want WeBWorK questionnaires or similar things from different courses to be mailed to a central person or persons (e.g. the WeBWorK administrator), edit the lines
$mail{allowedRecipients} = [ #'prof1@yourserver.yourdomain.edu', #'prof2@yourserver.yourdomain.edu', ];
appropriately. In order to have professors from individual courses receive such email, this should be set in course.conf to the addresses of professors of each course.
Then save the file and Quit.
Now become a regular user again
# exit $
WeBWorK uses a single database, called webwork
, for all courses. We will create the webwork
database now.
To do this do the following (before you just copy, paste and hit <Enter>
notice that you have to replace database_password
with the password you set when editing global.conf
above):
$ mysql -u root -p mysql Enter password: <mysql root password> mysql> CREATE DATABASE webwork; mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, LOCK TABLES ON webwork.* TO webworkWrite@localhost IDENTIFIED BY 'database_password'; mysql> exit Bye $
where as we said replace database_password
with the password you set when editing global.conf
above.
WeBWorK 2.3.0 introduces an automatic database upgrade system. Rather than manually issuing SQL commands to make changes to the database, or using ad-hoc scripts like wwdb_addgw, there is a single script called wwdb_upgrade
that applies any necessary updates. It should be run when creating a new database, and any time you upgrade WeBWorK.
$ /opt/webwork/webwork2/bin/wwdb_upgrade -v
You will get the error message
An error occured while running the course upgrade code for version 2 on course modelCourse: ... Ignore this error and go on to the next course? [y/N]
You should enter Y
to ignore the error. This error occurs because wwdb_upgrade
isn't smart enough to realize modelCourse
isn't a real course as we explain below.
jsMath Settings
Version 2.0 of jsMath introduced a new fallback method for when the TeX fonts are not available on the student's computer. This uses images of the individual TeX characters in place of the TeX fonts. These are distributed in webwork2/htdocs/jsMath/jsMath-fonts.tar.gz
, and you need to unpack this tarball before jsMath will work properly. Use the command
$ su <root password> # cd /opt/webwork/webwork2/htdocs/jsMath # tar vfxz jsMath-fonts.tar.gz
This will unpack the archive. Since there are 20,000 tiny files, it can take a little while, so the v
option is used to show you the names as they are unpacked so that you know the command is actually doing something. Once the images are unpacked, jsMath's image mode fallback (the default fallback method) will work properly.
Configuring Apache
WeBWorK ships with an Apache config file that needs to linked into your Apache configuration process. The file is named webwork.apache2-config.dist
and located in the conf
directory. First, copy the file to webwork.apache2-config
:
# cd /opt/webwork/webwork2/conf # cp webwork.apache2-config.dist webwork.apache2-config
and now link it into your Apache configuration process
# cd /etc/apache2/conf.d # ln -s /opt/webwork/webwork2/conf/webwork.apache2-config webwork.conf
Then restart Apache
# apache2ctl graceful
If this doesn't work and you see the error
Syntax error on line 29 of /opt/webwork/webwork2/conf/webwork.apache2-config: $parms->add_config() has failed: Option FollowSymLinks not allowed here at /usr/lib/perl5/Apache2/PerlSections.pm line 203.\n
we have to do some more work. If you don't get this error, you can skip this section and go on to Test your configuration. At the time these instructions are being written Debian has packaged mod_perl version 2.0.2 which has a small bug which seems to be fixed in version 2.0.3. However we have a pretty easy work around for version 2.0.2. Edit webwork.apache2-config
as follows:
# cd /opt/webwork/webwork2/conf # gedit webwork.apache2-config
Replace the end of the file (starting with # Provide access to system-wide resources.
) with the section below. What we are doing is commenting out the two Directory
blocks within the main Perl
block, moving them below (i.e. outside) the
main Perl
block and then replacing perl variables $webwork_htdocs_dir
and $webwork_courses_dir
with the actual directories.
# Provide access to system-wide resources. # push @Alias, [ $webwork_htdocs_url => $webwork_htdocs_dir ]; #$Directory{$webwork_htdocs_dir} = { # Order => "allow,deny", # Allow => [qw/from all/], # Options => "FollowSymLinks", # AllowOverride => "None", #}; # Provide access to course-specific resources. # push @AliasMatch, [ "$webwork_courses_url/([^/]*)/(.*)", "$webwork_courses_dir/\$1/html/\$2" ]; #$Directory{"$webwork_courses_dir/*/html"} = { # Order => "allow,deny", # Allow => [qw/from all/], # Options => "FollowSymLinks", # AllowOverride => "None", #}; # If WeBWorK is on the root, exempt the static directories from being handled # by Apache::WeBWorK. # if ($webwork_url eq "") { $Location{$webwork_courses_url} = { SetHandler => "None" }; $Location{$webwork_htdocs_url} = { SetHandler => "None" }; } </Perl> <Directory /opt/webwork/webwork2/htdocs> Allow from all AllowOverride None Options FollowSymLinks Order allow,deny </Directory> <Directory /opt/webwork/courses/*/html> Allow from all AllowOverride None Options FollowSymLinks Order allow,deny </Directory>
Then save the file and Quit.
Restart Apache
# apache2ctl graceful
and all should be well.
# exit $
Test your configuration
- Test the
/webwork2
location by visitinghttp://yourserver.yourschool.edu/webwork2
. You should see the WeBWorK home page with no courses listed. Actually the directory/opt/webwork/courses/
does contain themodelCourse
but themodelCourse
is not a real course so you will get an error message if you try to log into it. It will be used a as model for setting up other courses. For this reason/opt/webwork/courses/modelCourse/
contains a file namedhide_directory
and so themodelCourse
is not visible. - Test the
/webwork2_files
location by visitinghttp://yourserver.yourschool.edu/webwork2_files
. You should see the "WeBWorK Placeholder Page". - You cannot test the
/webwork2_course_files
location until you have created a course.
If Something is Wrong
If something is wrong one of the first things to check is that the config files have been edited correctly (e.g. one time a wrapped line in global.conf
caused me problems). A quick way to check this is to do a diff
between the edited and distributed versions and check that diff
reports the changes you made and only those.
# exit $ $ cd /etc/apache2/ $ diff apache2.conf apache2.conf.bak1 $ cd /opt/webwork/webwork2/conf/ $ diff global.conf global.conf.dist $ diff database.conf database.conf.dist $ diff webwork.apache2-config webwork.apache2-config.dist
If something is wrong and you fix it, you will have to restart Apache for the changes to take effect
$ su <root password> # apache2ctl graceful # exit $
---
Create the admin Course
The CourseAdministrationManual gives information about creating courses. Here we will give explicit instructions for doing this.
$ su <root password> # newgrp wwdata # umask 2 # cd /opt/webwork/courses # /opt/webwork/webwork2/bin/addcourse admin --db-layout=sql_single --users=adminClasslist.lst --professors=admin # exit # exit $
Now goto http://yourserver.yourschool.edu/webwork2
and should see the WeBWorK home page with Course Adninistration
listed at the top. Click on it and login with Username admin
and Password admin
. This first thing you should do is to click on Password/Email
and change admin
's password to something more secure than admin
.
Unless you choose oherwise, users with professor
privilges in the admin
course (i.e. WeBWorK administrators) will automatically be added to new courses with professor
privilges and the same password as in the admin
course. Initially the only such user is admin
(hopefully you are not confused by the fact that the course admin
has a user named admin
). It's usually convenient make yourself a WeBWorK administrator. To do this (assuming you are logged in as admin
to the admin
course at http://yourserver.yourschool.edu/webwork2/admin
)
- Click on
Classlist Editor
in the left panel - Check
Add 1 student(s)
and clickTake Action!
- Enter the appropiate information (you can leave the last three items blank) and click
Add Students
- Click on
Classlist Editor
in the left panel again
- When you enter a new student, by default their
Student ID
is used as their password. We'll change this now. - Select yourself with a check mark and then check
Give new password to Selected users
or just checkGive new password to All users
(as a safely mechanism you can not change the password for the user you are logged in as, currentlyadmin
, this way) and then clickTake Action!
- Enter the password, check
Save changes
and then clickTake Action!
- Finally give yourself
professor
privilges by selecting yourself with a check mark, checkingEdit Selected users
and then clickingTake Action!
(or by just clicking on the "pencil" next to your login name which is a much faster way to edit classlist data for a single user) - Now at the far right change
Permission Level
from 0 (an ordinary student) to 10 (an esteemed professor) - Check
Save changes
and then clickTake Action!
At some point you will probably want to hide the admin
course so that it is not listed on the WeBWorK home page. As we noted above the modelCourse
, which is already hidden, is not a real course so you will get an error message if you try to log into it. This is a good reason to hide it. The modelCourse
is very useful as a model (hence its name) for setting up other courses. The admin
course is used for administering WeBWorK and even though regular users can not log into it (you did change the admin
password, didn't you!!), it a little bit cleaner and safer to hide it from prying eyes.
To hide a course place a file named hide_directory
in the course directory and it will not show up in the courses list on the WeBWorK home page. It will still appear in the Course Administration listing. If you do this you will still be able to access the admin
course using the URL http://yourserver.yourschool.edu/webwork2/admin
but you will not see a link for it on the WeBWorK home page http://yourserver.yourschool.edu/webwork2
. Let's hide the admin
course.
$ cd $ gedit hide_directory
Now you don't really have to put any verbiage in the file but I suggest you put:
Place a file named "hide_directory" in a course or other directory and it will not show up in the courses list on the WeBWorK home page. It will still appear in the Course Administration listing.
Save the file and quit. Now copy the file to the admin
course.
$ sudo cp hide_directory /opt/webwork/courses/admin password:<your password>
Now goto http://yourserver.yourschool.edu/webwork2
and no course will be listed.
Starting and Stoping Apache, MySQL and the GNOME desktop GUI
If you make changes to the system, you will have to restart apache2
before the changes take effect. On rare ocassions you may need to restart MySQL
.
Starting and Stoping Apache
You have to run these commands as root
.
To start or restart (i.e. stop and then start) the apache2
webserver run the command
$ sudo apache2ctl graceful password:<your password>
To stop the apache
webserver run the command
$ sudo apache2ctl stop password:<your password>
You can also start or stop apache2 by using the GUI interface.
- Select
Desktop
,Administration
and thenServices
- If
apache2
is running, uncheck its check box and clickOK
to stop it - If
apache2
is stopped, check its check box and clickOK
to start it
Note that I found using apache2ctl
a more robust way to start and stop apache2
.
Starting and Stoping MySQL
You have to run these commands as root
.
To start the MySQL
server run the command
$ sudo /etc/init.d/mysql start root's password:<root password>
To stop the MySQL
server run the command
$ sudo /etc/init.d/mysql stop root's password:<root password>
To restart the MySQL
server run the command
$ sudo /etc/init.d/mysql restart root's password:<root password>
You can also start or stop MySQL by using the GUI interface.
- Select
Desktop
,Administration
and thenServices
- If
mysql
is running, uncheck its check box and clickOK
to stop it - If
mysql
is stopped, check its check box and clickOK
to start it
Starting and stopping the GNOME desktop GUI
The GNOME desktop is automatically started when the system boots.
To stop GNOME
so that you only have a standard terminal window run the following in a standard terminal window
$ sudo /etc/init.d/gdm stop password:<password>
If you stopped GNOME
and want to restart it run the following in a standard terminal window
$ sudo /etc/init.d/gdm start password:<password>
Install the WeBWorK Problem Libraries
Before we create a real course we will install the WeBWorK Problem Libraries.
Install the National Problem Library
The National Problem Library
consists of both WeBWorK problems and methods for searching and selecting problems. Also it contains as sub libraries many of the other standard libraries. Normally this library is referred to as the ProblemLibrary
but the downloaded CVS directory for it is named database_problems
. So the first thing we do is to link ProblemLibrary
to database_problems
.
$ cd /opt/webwork/libraries/ $ sudo ln -s database_problems ProblemLibrary password:<password>
Next we have to edit global.conf
.
$ cd /opt/webwork/webwork2/conf $ su Password: <root password> # gedit global.conf
- Search for
problemLibrary
and replace$problemLibrary{root} = "";
by
$problemLibrary{root} = "/opt/webwork/libraries/ProblemLibrary";
Then save the file and quit. And return to a regular user
#exit $
We now create a database, called ProblemLibrary
, for for the Problem Library.
To do this do the following:
$ mysql -u root -p mysql Enter password: <mysql root password> mysql> CREATE DATABASE ProblemLibrary; mysql> GRANT SELECT ON ProblemLibrary.* TO webworkWrite@localhost; mysql> exit Bye $
Run the installation script making sure you are in the /opt/webwork/libraries/ProblemLibrary
directory. This directory
contains the files loadDB2
and create_tables2.sql
.
$ cd /opt/webwork/libraries/ProblemLibrary $ ./loadDB2 <mysql root password>
This has to convert a lot of data so please be patient; it can take a long time.
If at some time in the future you want to upgrade the Problem Library, the process is simpler. Optionally remove the previous copy of the library, unpack the new copy in the same place, and run loadDB.pl.
Set up the Rochester and Union Libraries
First we need to edit global.conf
one last time
$ cd /opt/webwork/webwork2/conf $ su Password: <root password> # gedit global.conf
- Search for
courseFiles{problibs}
and scroll down several lines to the line
# rochesterLibrary => "Rochester",
- Uncomment this line (i.e. remove the
#
) so it becomes
rochesterLibrary => "Rochester",
- Directly below this line add the line
unionLibrary => "Union",
- Search for
macrosPath
and scroll down several lines to the line
$pg{directories}{macros},
- After this line add the two lines:
'/opt/webwork/libraries/union_problib/macros',
'/opt/webwork/libraries/union_problib/parserOrientation',
Then save the file and quit.
Since we have edited global.conf
a lot and this is a very critical file, it would be a good idea to run
$ diff global.conf global.conf.dist
and check that you haven't made any mistakes (e.g. by introducing an inadvertant line break, etc).
We next put links to the Rochester and Union Libraries in the modelCourse
so that when we create courses copying templates from the modelCourse
, these libraries will be available. Skip this step if you usually only want to use National Problem Library.
$ cd /opt/webwork/courses/modelCourse/templates/ $ sudo ln -s /opt/webwork/libraries/union_problib/ unionLibrary Password:<your password> $ sudo ln -s /opt/webwork/libraries/rochester_problib/ rochesterLibrary
Create Your First Actual Course
Now log into the admin
course ( http://yourserver.yourschool.edu/webwork2/admin
) as yourself or admin
and
- click on
Add Course
- For
Course ID
entermyTestCourse
- For
Course Title
enterMy Test Course
- Enter your institution
- Leave
Add WeBWorK administrators to new course
checked - Add an additional instructor if you wish
- Copy templates from:
modelCourse
(the default action) - Select sql_single for the database layout.
- Click on
Add Course
- Click
Log into myTestCourse
and log in either as admin
or yourself.
At some point you will probably want to "hide" myTestCourse
from general view but you already know how to do that.
Where to go From Here
You should play around with myTestCourse
e.g. click on Library Browser
and browse the Problem Library
and also the Rochester
and Union
libraries.
Look at [[7]]
Read the CourseAdministrationManual for more information about creating courses.
Consult the WeBWorKDocs topic for other WeBWorK documentation.
-- Main.ArnoldPizer - 21 June 2007 Initial version based on Sam Hathaway's InstallationManualV2pt3