Difference between revisions of "Installing from WW2.12 Ubuntu16.04 Vanilla LiveDVD"

From WeBWorK_wiki
Jump to navigation Jump to search
(Created page with "{{UnderConstruction}} <!-- {{UnderConstruction}} --> These instructions cover the installation of the Ubuntu Linux 16.04 LTS 64 bit operating system and WeBWorK 2.12 using ...")
 
m (marked as historical)
 
(40 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{UnderConstruction}}
 
  +
{{Historical}}
  +
 
<!-- {{UnderConstruction}} -->
 
<!-- {{UnderConstruction}} -->
   
Line 11: Line 12:
   
 
===Overview===
 
===Overview===
After installing from the WeBWorK Live DVD which only requires a few steps, you will have a full fledged Ubuntu 14.04.2LTS system with WeBWorK, Apache2, MySQL, etc. installed and configured. If your network uses DHCP, networking will be automatically configured for your system. If it uses static IP addresses, you will have to configure networking (see below). Also it is imperative that you CHANGE THE PASSWORDS for the OS user <code>wwadmin</code> (which has sudo privileges), for the MySQL users <code>root</code> and <code>webworkWrite</code>, and for the WeBWorK user <code>admin</code> which has professor privileges (see below).
+
After installing from the WeBWorK Live DVD which only requires a few steps, you will have a full fledged Ubuntu 16.04LTS system with WeBWorK, Apache2, MySQL, etc. installed and configured. If your network uses DHCP, networking will be automatically configured for your system. If it uses static IP addresses, you will have to configure networking (see below). Also it is imperative that you CHANGE THE PASSWORDS for the OS user <code>wwadmin</code> (which has sudo privileges), for the MySQL users <code>root</code> and <code>webworkWrite</code>, and for the WeBWorK user <code>admin</code> which has professor privileges (see below).
   
There are more detailed instructions for Ubuntu 14.04 and WeBWorK 2.10 at
+
There are more detailed instructions for Ubuntu 16.04 and WeBWorK 2.12 at
[[Installation_Manual_for_2.10_on_Ubuntu_14.04]]
+
[[Installation_Manual_for_2.12_on_Ubuntu_16.04]]
   
 
===Download the iso image===
 
===Download the iso image===
   
There is only a 64 bit distribution. The 64 bit distribution should work with most modern cpu's. Download the md5 check sum and .iso file from either of the sites below. Download <code>WW2.10_Ubuntu14.04_Vanilla_LiveDVD.iso.md5</code> and <code>WW2.10_Ubuntu14.04_Vanilla_LiveDVD.iso</code> . The iso is a 3.3 GB file.
+
There is only a 64 bit distribution. The 64 bit distribution should work with most modern cpu's. Download the md5 check sum and .iso file from either of the sites below. Download <code>WW2.12_Ubuntu16.04_Vanilla_LiveDVD.iso.md5</code> and <code>WW2.12_Ubuntu16.04_Vanilla_LiveDVD.iso</code> . The iso is a 2.4 GB file.
   
 
* Rochester
 
* Rochester
# http://hosted2.webwork.rochester.edu/ww-downloads/WW2.10_Ubuntu14.04_Vanilla_LiveDVD.iso.md5
+
# http://hosted2.webwork.rochester.edu/ww-downloads/WW2.12_Ubuntu16.04_Vanilla_LiveDVD.iso.md5
# http://hosted2.webwork.rochester.edu/ww-downloads/WW2.10_Ubuntu14.04_Vanilla_LiveDVD.iso
+
# http://hosted2.webwork.rochester.edu/ww-downloads/WW2.12_Ubuntu16.04_Vanilla_LiveDVD.iso
   
 
* MAA
 
* MAA
# http://webwork.maa.org/ww-downloads/WW2.10_Ubuntu14.04_Vanilla_LiveDVD.iso.md5
+
# http://webwork.maa.org/ww-downloads/WW2.12_Ubuntu16.04_Vanilla_LiveDVD.iso.md5
# http://webwork.maa.org/ww-downloads/WW2.10_Ubuntu14.04_Vanilla_LiveDVD.iso
+
# http://webwork.maa.org/ww-downloads/WW2.12_Ubuntu16.04_Vanilla_LiveDVD.iso
   
* Verify the MD5 checksum of your downloaded file agrees with the above and then burn it to a DVD (the file is too large to be burned to a CD). For information on how to verify the MD5 checksum, see e.g. https://help.ubuntu.com/community/HowToMD5SUM
+
* Verify the MD5 checksum of your downloaded file agrees with the above and then burn it to a DVD. For information on how to verify the MD5 checksum, see e.g. https://help.ubuntu.com/community/HowToMD5SUM
   
 
===Running directly from the Live DVD without installing===
 
===Running directly from the Live DVD without installing===
Line 36: Line 37:
 
Place the installation DVD in your DVD/CD drive and reboot your computer from the DVD drive. You may have to press <code>&lt;F12&gt;</code> or another key during the boot process to bring up a boot menu which will allow you to select booting from the DVD. For Apple Computers and others: hold down the C key while rebooting; Toshiba, IBM and others: press <code>&lt;F12&gt;</code> while booting to get to the boot menu; Asus and others: press <code>&lt;Tab&gt;</code> key while booting to get to the boot menu. Or you may have to edit the BIOS to select the DVD as the first boot device.
 
Place the installation DVD in your DVD/CD drive and reboot your computer from the DVD drive. You may have to press <code>&lt;F12&gt;</code> or another key during the boot process to bring up a boot menu which will allow you to select booting from the DVD. For Apple Computers and others: hold down the C key while rebooting; Toshiba, IBM and others: press <code>&lt;F12&gt;</code> while booting to get to the boot menu; Asus and others: press <code>&lt;Tab&gt;</code> key while booting to get to the boot menu. Or you may have to edit the BIOS to select the DVD as the first boot device.
   
# Just hit <code>&lt;Enter&gt;</code> for the first <code>live</code> boot option
+
# Just hit <code>&lt;Enter&gt;</code> for the first <code>live - boot the Live System</code> boot option
 
# Log in as "wwadmin" with the password "wwadmin"
 
# Log in as "wwadmin" with the password "wwadmin"
# Open Firefox and access the URL: http://localhost/webwork2 . The admin course (the real name for Course Administration) has the user "admin" as professor with password "admin". myTestCourse has the same user/password (admin/admin) as professor and in addition practice (guest) users and one student user "jsmith" with password "jsmith". With the exception of jsmith and admin, every password on the system is set to "wwadmin". Note that you can always access the admin course even if it is "hidden" (see below) directly using http://localhost/webwork2/admin .
+
# Open Firefox and access the URL: http://localhost/webwork2 . The admin course (the real name for Course Administration) has the user "admin" as professor with password "admin". myTestCourse has the same user/password (admin/admin) as professor and in addition practice (guest) users. With the exception admin, every password on the system is set to "wwadmin". Note that you can always access the admin course even if it is "hidden" (see below) directly using http://localhost/webwork2/admin .
# Look through the instructions in [[Installation_Manual_for_2.10_on_Ubuntu_14.04]] for testing WeBWorK. Note that all the installation steps have already been done for you except as noted below
+
# Look through the instructions in [[Installation_Manual_for_2.12_on_Ubuntu_16.04]] for testing WeBWorK. Note that all the installation steps have already been done for you except as noted below
 
# If you are running directly from the Live DVD, you probably do not want to log in remotely to your server but if you do, follow the instructions in the "Install openssh-server" section below.
 
# If you are running directly from the Live DVD, you probably do not want to log in remotely to your server but if you do, follow the instructions in the "Install openssh-server" section below.
   
 
===Install WeBWorK from the WeBWorK Live DVD ===
 
===Install WeBWorK from the WeBWorK Live DVD ===
   
Place the installation DVD in your DVD/CD drive and reboot your computer from the DVD drive. You may have to press <code>&lt;F12&gt;</code> or another key during the boot process to bring up a boot menu which will allow you to select booting from the DVD. For Apple Computers and others: hold down the C key while rebooting; Toshiba, IBM and others: press <code>&lt;F12&gt;</code> while booting to get to the boot menu; Asus and others: press <code>&lt;Tab&gt;</code> key while booting to get to the boot menu. Or you may have to edit the BIOS to select the DVD as the first boot device.
+
Place the installation DVD in your DVD/CD drive and boot your computer from the DVD drive. You may have to press <code>&lt;F12&gt;</code> or another key during the boot process to bring up a boot menu which will allow you to select booting from the DVD. For Apple Computers and others: hold down the C key while rebooting; Toshiba, IBM and others: press <code>&lt;F12&gt;</code> while booting to get to the boot menu; Asus and others: press <code>&lt;Tab&gt;</code> key while booting to get to the boot menu. Or you may have to edit the BIOS to select the DVD as the first boot device.
   
First select <code>install</code>, the third option, and then hit <code>&lt;Enter&gt;</code>. After the system loads you will be presented with a series of 5 or more steps.
 
  +
# Just hit <code>&lt;Enter&gt;</code> for the first <code>live - boot the Live System</code> boot option
  +
# Log in as "wwadmin" with the password "wwadmin"
  +
# Open a terminal window. Select <code>Dash Home</code>, the top icon on the left side, and type <code>Terminal</code>. Or you can just type <code>&lt;Ctrl&gt; &lt;Alt&gt; &lt;T&gt;</code>.
  +
# In the terminal window type the command (at this point the <wwadmin password> is "wwadmin")
  +
$ sudo sh -c 'ubiquity gtk_ui'
  +
[sudo] password for wwadmin: <wwadmin password>
  +
Note, clicking on the <code>Install WeBWorKLiveDVD</code> icon doesn't install the system, but right clicking on it and selecting <code>Properties</code> shows the correct command which you can copy and paste in a terminal window if you prefer.
  +
After the system loads you will be presented with a series of 5 or more steps.
   
 
# On the first install panel hit <code>Continue</code> to proceed with English as the selected language
 
# On the first install panel hit <code>Continue</code> to proceed with English as the selected language
 
# Just hit Continue on the next page
 
# Just hit Continue on the next page
# Next comes the <code>Partition disks</code> pages. You should be able to accept the defaults unless you want separate partitions for various directories. You might want to look at the Partition disks section in [[Installation_Manual_for_2.10_on_Ubuntu_14.04]] which gives more information on this. You also have options on where to install the boot loader but you almost certainly want to use the default
+
# Next comes the <code>Partition disks</code> pages. Select the option that best fits your situation. You might want to look at the Partition disks section in [[Installation_Manual_for_2.12_on_Ubuntu_16.04]] which gives more information on this. You also have options on where to install the boot loader but you almost certainly want to use the default. RAID users will need to select the Advanced option and make sure to install the boot partition onto your RAID, and not the default sda volume.
 
# Select a city in your time zone and hit <code>Continue</code>
 
# Select a city in your time zone and hit <code>Continue</code>
 
# Hit <code>Continue</code> to accept the default keyboard layout
 
# Hit <code>Continue</code> to accept the default keyboard layout
#Note that you may see a panel asking "Who are you?". I say "may" because this has only appeared a few times. If it does fill in this information but actually it will not be used. The real information is contained in the WeBWorK Live DVD. We will just repeat it here so you don't get confused
+
#Note that you may see a panel asking "Who are you?". I say "may" because this does not always appear. If it does fill in this information but actually it will not be used. The real information is contained in the WeBWorK Live DVD. We will just repeat it here so you don't get confused
#* Enter <code>wwadmin</code> for "What is your name?"
+
* Enter <code>wwadmin</code> for "Your name"
#* Enter <code>wwadmin</code> for "What name do you want to use to log in?"
+
* Enter <code>wwserver</code> for "Your Computer's name"
#* Enter <code>wwadmin</code> twice for the password
+
* Enter Enter <code>wwadmin</code> for "Pick a username" In these instructions, we will call this name <code>&lt;wwadmin&gt;</code>.
#* Enter <code>wwserver</code> for the name of the computer
+
* Enter Enter <code>wwadmin</code> twice for the password. In these instructions, we will call this password the <code>&lt;wwadmin password&gt;</code>.
#* You can change all of these things after the installation takes place. Especially you should change the password
 
#* Then hit <code>Continue</code> to continue
 
#You may be asked to chose a picture. I just hit <code>Continue</code>
 
   
Now sit back and relax while the installation takes place. This can take a long time so please be patient. When you see "Installation Complete", hit
 
  +
* Then hit <code>Continue</code> to continue
  +
  +
Now sit back and relax while the installation takes place. This can take a long time so please be patient. When you see "Installation has finished", hit
 
<code>Restart Now</code>
 
<code>Restart Now</code>
   
Line 69: Line 79:
 
# You can open Firefox and access the URL: http://localhost/webwork2 . The admin course (the real name for Course Administration) has the user "admin" as professor with password "admin". myTestCourse has the same user/password (admin/admin) as professor and in addition practice (guest) users and one student user "jsmith" with password "jsmith". With the exception of jsmith and admin, every password on the system is set to "wwadmin". Note that the admin course is not "hidden" ("hidden" means a link to it is not displayed). If you hide it, then access it directly using the URL: http://localhost/webwork2/admin . To hide (or unhide) a course select Hide Inactive courses in the admin course and follow the directions. If you are using the system with students, you probably will want to hide the admin course.
 
# You can open Firefox and access the URL: http://localhost/webwork2 . The admin course (the real name for Course Administration) has the user "admin" as professor with password "admin". myTestCourse has the same user/password (admin/admin) as professor and in addition practice (guest) users and one student user "jsmith" with password "jsmith". With the exception of jsmith and admin, every password on the system is set to "wwadmin". Note that the admin course is not "hidden" ("hidden" means a link to it is not displayed). If you hide it, then access it directly using the URL: http://localhost/webwork2/admin . To hide (or unhide) a course select Hide Inactive courses in the admin course and follow the directions. If you are using the system with students, you probably will want to hide the admin course.
 
# If your network uses DHCP, networking will be automatically configured for your system and you should be able to access the web with Firefox. If not, see below.
 
# If your network uses DHCP, networking will be automatically configured for your system and you should be able to access the web with Firefox. If not, see below.
# Look through the instructions in [[Installation_Manual_for_2.10_on_Ubuntu_14.04]] for testing WeBWorK. Note that all the installation steps have already been done for you except as noted below.
+
# Look through the instructions in [[Installation_Manual_for_2.12_on_Ubuntu_16.04]] for testing WeBWorK. Note that all the installation steps have already been done for you except as noted below.
   
 
===Install openssh-server===
 
===Install openssh-server===
Line 83: Line 93:
 
# Click on Apply
 
# Click on Apply
 
# You will see a pop up window <code>Apply the following changes?</code> and then click <code>Apply</code>
 
# You will see a pop up window <code>Apply the following changes?</code> and then click <code>Apply</code>
# Click Close and then quit the Synaptic Package Manager
+
# After the installation completes click Close and then quit the Synaptic Package Manager
   
 
Now you can connect remotely to your server with ssh but you may have to reboot your server for this to take effect.
 
Now you can connect remotely to your server with ssh but you may have to reboot your server for this to take effect.
Line 112: Line 122:
 
# Click <code>Change Password</code>
 
# Click <code>Change Password</code>
 
# Enter the old password (<code>wwadmin</code>) and the new password.
 
# Enter the old password (<code>wwadmin</code>) and the new password.
# Click <code>OK</code>
+
# Click <code>Continue</code>
   
 
Now we change the passwords for the MySQL users <code>root</code> and <code>webworkWrite</code>. First we edit <code>site.conf</code>.
 
Now we change the passwords for the MySQL users <code>root</code> and <code>webworkWrite</code>. First we edit <code>site.conf</code>.
Line 130: Line 140:
 
$ mysql -u root -p
 
$ mysql -u root -p
 
Enter Password: wwadmin
 
Enter Password: wwadmin
mysql> SELECT Host, User, Password FROM mysql.user;
+
mysql> SELECT Host, User, authentication_string FROM mysql.user;
 
You will see a table with five entries. For <code>localhost</code> you will see three Users, <code>root</code>, <code>debian-sys-maint</code> and <code>webworkWrite</code>. You will also see the Hosts
 
<code>::1</code> and <code>127.0.0.1</code> both with the <code>root</code> User.
 
   
  +
You will see a table with four users (<code>root</code>, <code>mysql.sys</code>, <code>debian-sys-maint</code> and <code>webworkWrite</code>).
  +
You should see that all three users have passwords (which will be displayed in encrypted form).
   
 
Now we will change the password for the <code>webworkWrite</code> User
 
Now we will change the password for the <code>webworkWrite</code> User
   
mysql> UPDATE mysql.user SET password=PASSWORD('<database_password>') WHERE host='localhost' and user='webworkWrite';
+
mysql> UPDATE mysql.user SET authentication_string=PASSWORD('<database_password>') WHERE host='localhost' and user='webworkWrite';
 
where of course you should replace <code>&lt;database_password&gt;</code> by whatever you used above.
 
where of course you should replace <code>&lt;database_password&gt;</code> by whatever you used above.
   
Next we will change the passwords for the three <code>root</code> Users. In all 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 Ubuntu linux system <code>root</code> user. Below we refer to this as <code>&lt;mysql root password&gt;</code>
+
Next we will change the password for the <code>root</code> User. In the command replace <code>newpwd</code> with your chosen 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 Ubuntu linux system <code>root</code> user. Below we refer to this as <code>&lt;mysql root password&gt;</code>
   
   
mysql> UPDATE mysql.user SET password=PASSWORD('newpwd') WHERE host='localhost' and user='root';
+
mysql> UPDATE mysql.user SET authentication_string=PASSWORD('newpwd') WHERE host='localhost' and user='root';
mysql> UPDATE mysql.user SET password=PASSWORD('newpwd') WHERE host='127.0.0.1' and user='root';
 
mysql> UPDATE mysql.user SET password=PASSWORD('newpwd') WHERE host='::1' and user='root';
 
 
mysql> FLUSH PRIVILEGES;
 
mysql> FLUSH PRIVILEGES;
   
 
Now use your up arrow key to run the command
 
Now use your up arrow key to run the command
   
mysql> SELECT Host, User, Password FROM mysql.user;
+
mysql> SELECT Host, User, authentication_string FROM mysql.user;
   
 
and you should see that all these users now have new passwords (which will be displayed in encrypted form).
 
and you should see that all these users now have new passwords (which will be displayed in encrypted form).
Line 175: Line 187:
 
===Setting up networking using a static IP address===
 
===Setting up networking using a static IP address===
   
'''NOTE: These direction are out of date since Ubuntu has switched to Unity. Using the Dash Home to search for <code>Network Connections</code>. Opening that and following the directions "should" work but I have not tested them yet on Ubuntu 12.04. Also see http://webwork.maa.org/wiki/Installation_Manual_for_2.7_on_Ubuntu_12.04#Apache_2_and_mod_perl'''
 
  +
# select <code>Dash Home</code> and type <code>Network Connections</code>
 
  +
# Select the wired connection under Ethernet and hit <code>Edit</code> and look and see if everything is set up correctly and correct any errors
The server is set to accept only www (http) and secure telnet and file transfer (ssh) connections. Here we give directions for setting up an ethernet connection if you are using a static IP address. If your network is set up using DHCP you can skip this section.
 
  +
# If no connection is set up click <code>Add</code> and then enter your servers IP address, Netmask (usually 255.255.255.0 but possibly 255.255.0.0) and Gateway address (often the same as the IP address with the last number replaced by 1). Important: after entering a number hit the <code>&lt;Enter&gt;</code> key so that the change is recorded.
 
# Select <code>System</code>, <code>Preferences</code>, <code>Network Connections</code>
 
# Select <code>Auto etho</code> and click <code>Edit...</code>
 
# Select <code>IPv4 Settings</code>
 
# Next to <code>Method:</code> and scroll down and select <code>Manual</code>.
 
# Click <code>Add</code> and then enter your servers IP address, Netmask (usually 255.255.255.0 but possibly 255.255.0.0) and Gateway address (often the same as the IP address with the last number replaced by 1). Important: After entering a number hit the <code>&lt;Enter&gt;</code> key so that the change is recorded.
 
 
# Next enter the IP address(es) of your DNS server(s)separated by spaces. You need to enter at least one DNS server
 
# Next enter the IP address(es) of your DNS server(s)separated by spaces. You need to enter at least one DNS server
 
# Finally enter the search domain <code>Hosts</code>
 
# Finally enter the search domain <code>Hosts</code>
# Click <code>Apply</code>
+
# Click <code>Save</code>
 
# Enter <code>&lt;wwadmin password&gt;</code> and click <code>Authenticate</code>
 
# Enter <code>&lt;wwadmin password&gt;</code> and click <code>Authenticate</code>
 
# Click <code>Close</code>
 
# Click <code>Close</code>
  +
Your network connection should start up almost immediately. If you are still having problems first try rebooting (click on the power button button icon in the upper right hand corner, then select <code>Restart</code>) and if that doesn't work it's time to investigate further or seek help.
   
Now we have to set your server's hostname (which is currently set to <code>WeBWorK-LiveDVD</code>) and its fully qualified domain name. Note that if your network was set up automatically via DHCP, your server's fully qualified domain name should already be set up. You can check by running the <code>hostname</code> commands below.
+
Now we have to set your server's fully qualified domain name. Note that if your network was set up automatically via DHCP, your server's fully qualified domain name should already be set up. You can check by running the <code>hostname</code> commands below.
 
 
# Select <code>System</code>, <code>Administration</code>, <code>Network</code>
 
# Click on <code>Unlock</code>
 
# Enter <code>&lt;your password&gt;</code> and click <code>Authenticate</code>
 
# Click on <code>General</code>
 
# Under <code>Host name</code> change <code>WeBWorK-LiveDVD</code> to <code>your_server_name</code>
 
# Then under <code>Domain name</code> enter your server's domain name, something like <code>department.school.edu</code>
 
 
Next
 
# Click on <code>Hosts</code>
 
# Click <code>Add</code> and enter your server's IP address
 
# Under Aliases enter your server's fully qualified domain name, something like <code>your_server_name.department.school.edu</code>
 
# Then click <code>OK</code>
 
# Next select the entry <code>127.0.1.1</code>. We want to edit this but with 9.04 clicking <code>Properties</code> closes the window. In order to edit an entry I first had to delete it and then add it back as a new entry.
 
# Click <code>Delete</code>
 
# Click <code>Add</code> and enter the IP address <code>127.0.1.1</code>
 
# Under Aliases enter your server's fully qualified domain name, something like <code>your_server_name.department.school.edu</code>
 
# Then click <code>OK</code>
 
# Finally we edit the entry for <code>127.0.0.1</code>
 
# Select the entry <code>127.0.0.1</code> and click <code>Delete</code>
 
# Click <code>Add</code> and enter the IP address <code>127.0.0.1</code>
 
# Under Aliases make sure to enter the following entries in order
 
## first your server's fully qualified domain name, something like <code>your_server_name.department.school.edu</code>
 
## second your server's name, something like <code>your_server_name</code>
 
## third <code>localhost</code>
 
# Then click <code>OK</code>
 
# And click <code>Close</code> to close <code>Network settings</code>
 
   
  +
Run the command
  +
sudo hostnamectl set-hostname webwork
  +
[sudo] password for wwadmin: <wwadmin password>
  +
where of course you should replace webwork by whatever your server's name is (of course webwork is a very good and common name for a WeBWorK server).
   
   
Line 197: Line 208:
   
 
$ hostname --fqdn
 
$ hostname --fqdn
 
 
and
 
and
 
 
$ hostname
 
$ hostname
   
The first should respond with the fully qualified domain name and the second with just <code>your_server_name</code>.
+
The first gives the server's fully qualified domain name (e.g. webwork.mydepartment.myschool.edu) and the second the server's name (e.g. webwork).
 
 
Note that if your server can not find its fully qualified domain name, certain tools (such as the Synaptic Package Manager) will not start.
 
 
Finally add <code>your_server_name.department.school.edu</code> to Apache's config file
 
 
$ cd /etc/apache2
 
$ sudo gedit apache2.conf
 
[sudo] password for wwadmin: <wwadmin password>
 
 
After the last line of the file add the new line
 
ServerName "your_server_name.department.school.edu"
 
Use the quotes. Then save the file and quit.
 
   
  +
Note that if your server can not find its fully qualified domain name, certain tools (such as the Synaptic Package Manager) may not start.
   
 
For some of these changes to take effect you have to restart your server. So restart the server and then
 
For some of these changes to take effect you have to restart your server. So restart the server and then
Line 221: Line 231:
 
indicating that both <code>mod_apreq2</code> and <code>mod_perl</code> are installed. If you want to be able to
 
indicating that both <code>mod_apreq2</code> and <code>mod_perl</code> are installed. If you want to be able to
 
access "server-status" and "server-info" from a remote location, see the section
 
access "server-status" and "server-info" from a remote location, see the section
[[Installation_Manual_for_2.7_on_Ubuntu_12.04#Apache_2_and_mod_perl]]
+
[[Installation_Manual_for_2.12_on_Ubuntu_16.04#Apache_2_and_mod_perl]]
   
 
Finally you can find out what ip address your server is using by running the command <code>ifconfig</code> in a terminal window and then in the eth0 section looking at inet <code>addr:</code>
 
Finally you can find out what ip address your server is using by running the command <code>ifconfig</code> in a terminal window and then in the eth0 section looking at inet <code>addr:</code>
Line 301: Line 311:
 
==File and Directory Locations and System Information==
 
==File and Directory Locations and System Information==
   
This installation of WeBWorK and Ubuntu follows the instructions given in [[Installation_Manual_for_2.10_on_Ubuntu_14.04]].
+
This installation of WeBWorK and Ubuntu follows the instructions given in [[Installation_Manual_for_2.12_on_Ubuntu_16.04]].
You can look there to find the locations of the WeBWorK files. The option '''Optional A''' is implemented (with the wwtmp directory set up as a separate directory but not as a separate partition) but options '''Optional B''' and '''Optional C''' are not. You can implement these if you choose (you should at least look at them to see what they do). All system files are in their standard Ubuntu locations. The Ubuntu installation is identical to that obtained from the Ubuntu 14.04 desktop LiveDVD distribution with some updates included. If you see the update manager pop up, you should install the recommended updates. Or you can install them by using the <code>Update Manager</code>. To find this select <code>Dash Home</code> and type <code>update</code>.
+
You can look there to find the locations of the WeBWorK files. The option '''Optional A''' is implemented (with the wwtmp directory set up as a separate directory but not as a separate partition) but options '''Optional B''' and '''Optional C''' are not. You can implement these if you choose (you should at least look at them to see what they do). All system files are in their standard Ubuntu locations. The Ubuntu installation is identical to that obtained from the Ubuntu 16.04 desktop LiveDVD distribution with some updates included. If you see the update manager pop up, you should install the recommended updates. Or you can install them by using the <code>Software Updater</code>. To find this select <code>Dash Home</code> and type <code>update</code>.
   
 
Consult [[Category:Administrators]] for other WeBWorK documentation for system administrators.
 
Consult [[Category:Administrators]] for other WeBWorK documentation for system administrators.
Line 309: Line 319:
 
[[Category:Installation Manuals]]
 
[[Category:Installation Manuals]]
   
-- Main.ArnoldPizer - 25 June 2014 <br />
+
-- Main.ArnoldPizer - 20 June 2016 <br />

Latest revision as of 16:48, 14 June 2021

This article has been retained as a historical document. It is not up-to-date and the formatting may be lacking. Use the information herein with caution.


These instructions cover the installation of the Ubuntu Linux 16.04 LTS 64 bit operating system and WeBWorK 2.12 using the WeBWorK Live DVD.


This "vanilla" version of the server should work fine for smaller installations (say a 1000 users or less). There will be a "production" version that adds things like lighttpd, log rotations, etc that are useful for larger installations and/or slower servers. Note that you can always start with the vanilla version and make additions or changes after setting up your server.

Installing from WW2.12 Ubuntu16.04 Vanilla LiveDVD

Overview

After installing from the WeBWorK Live DVD which only requires a few steps, you will have a full fledged Ubuntu 16.04LTS system with WeBWorK, Apache2, MySQL, etc. installed and configured. If your network uses DHCP, networking will be automatically configured for your system. If it uses static IP addresses, you will have to configure networking (see below). Also it is imperative that you CHANGE THE PASSWORDS for the OS user wwadmin (which has sudo privileges), for the MySQL users root and webworkWrite, and for the WeBWorK user admin which has professor privileges (see below).

There are more detailed instructions for Ubuntu 16.04 and WeBWorK 2.12 at Installation_Manual_for_2.12_on_Ubuntu_16.04

Download the iso image

There is only a 64 bit distribution. The 64 bit distribution should work with most modern cpu's. Download the md5 check sum and .iso file from either of the sites below. Download WW2.12_Ubuntu16.04_Vanilla_LiveDVD.iso.md5 and WW2.12_Ubuntu16.04_Vanilla_LiveDVD.iso . The iso is a 2.4 GB file.

  • Rochester
  1. http://hosted2.webwork.rochester.edu/ww-downloads/WW2.12_Ubuntu16.04_Vanilla_LiveDVD.iso.md5
  2. http://hosted2.webwork.rochester.edu/ww-downloads/WW2.12_Ubuntu16.04_Vanilla_LiveDVD.iso
  • MAA
  1. http://webwork.maa.org/ww-downloads/WW2.12_Ubuntu16.04_Vanilla_LiveDVD.iso.md5
  2. http://webwork.maa.org/ww-downloads/WW2.12_Ubuntu16.04_Vanilla_LiveDVD.iso

Running directly from the Live DVD without installing

You can run WeBWorK directly from the Live DVD without installing anything on your computer.

Place the installation DVD in your DVD/CD drive and reboot your computer from the DVD drive. You may have to press <F12> or another key during the boot process to bring up a boot menu which will allow you to select booting from the DVD. For Apple Computers and others: hold down the C key while rebooting; Toshiba, IBM and others: press <F12> while booting to get to the boot menu; Asus and others: press <Tab> key while booting to get to the boot menu. Or you may have to edit the BIOS to select the DVD as the first boot device.

  1. Just hit <Enter> for the first live - boot the Live System boot option
  2. Log in as "wwadmin" with the password "wwadmin"
  3. Open Firefox and access the URL: http://localhost/webwork2 . The admin course (the real name for Course Administration) has the user "admin" as professor with password "admin". myTestCourse has the same user/password (admin/admin) as professor and in addition practice (guest) users. With the exception admin, every password on the system is set to "wwadmin". Note that you can always access the admin course even if it is "hidden" (see below) directly using http://localhost/webwork2/admin .
  4. Look through the instructions in Installation_Manual_for_2.12_on_Ubuntu_16.04 for testing WeBWorK. Note that all the installation steps have already been done for you except as noted below
  5. If you are running directly from the Live DVD, you probably do not want to log in remotely to your server but if you do, follow the instructions in the "Install openssh-server" section below.

Install WeBWorK from the WeBWorK Live DVD

Place the installation DVD in your DVD/CD drive and boot your computer from the DVD drive. You may have to press <F12> or another key during the boot process to bring up a boot menu which will allow you to select booting from the DVD. For Apple Computers and others: hold down the C key while rebooting; Toshiba, IBM and others: press <F12> while booting to get to the boot menu; Asus and others: press <Tab> key while booting to get to the boot menu. Or you may have to edit the BIOS to select the DVD as the first boot device.

  1. Just hit <Enter> for the first live - boot the Live System boot option
  2. Log in as "wwadmin" with the password "wwadmin"
  3. Open a terminal window. Select Dash Home, the top icon on the left side, and type Terminal. Or you can just type <Ctrl> <Alt> <T>.
  4. In the terminal window type the command (at this point the <wwadmin password> is "wwadmin")
$ sudo sh -c 'ubiquity gtk_ui'
[sudo] password for wwadmin: <wwadmin password>

Note, clicking on the Install WeBWorKLiveDVD icon doesn't install the system, but right clicking on it and selecting Properties shows the correct command which you can copy and paste in a terminal window if you prefer. After the system loads you will be presented with a series of 5 or more steps.

  1. On the first install panel hit Continue to proceed with English as the selected language
  2. Just hit Continue on the next page
  3. Next comes the Partition disks pages. Select the option that best fits your situation. You might want to look at the Partition disks section in Installation_Manual_for_2.12_on_Ubuntu_16.04 which gives more information on this. You also have options on where to install the boot loader but you almost certainly want to use the default. RAID users will need to select the Advanced option and make sure to install the boot partition onto your RAID, and not the default sda volume.
  4. Select a city in your time zone and hit Continue
  5. Hit Continue to accept the default keyboard layout
  6. Note that you may see a panel asking "Who are you?". I say "may" because this does not always appear. If it does fill in this information but actually it will not be used. The real information is contained in the WeBWorK Live DVD. We will just repeat it here so you don't get confused
  • Enter wwadmin for "Your name"
  • Enter wwserver for "Your Computer's name"
  • Enter Enter wwadmin for "Pick a username" In these instructions, we will call this name <wwadmin>.
  • Enter Enter wwadmin twice for the password. In these instructions, we will call this password the <wwadmin password>.
  • Then hit Continue to continue

Now sit back and relax while the installation takes place. This can take a long time so please be patient. When you see "Installation has finished", hit Restart Now

Boot your server

  1. The installation WeBWorK LiveDVD will eject. Remove it and press <Enter> to continue
  2. Hit <Enter> to select the default boot option or just wait for it to boot
  3. Log in as "wwadmin" with the password "wwadmin" (more on accounts and passwords below). "wwadmin" has sudo privileges.
  4. You can open Firefox and access the URL: http://localhost/webwork2 . The admin course (the real name for Course Administration) has the user "admin" as professor with password "admin". myTestCourse has the same user/password (admin/admin) as professor and in addition practice (guest) users and one student user "jsmith" with password "jsmith". With the exception of jsmith and admin, every password on the system is set to "wwadmin". Note that the admin course is not "hidden" ("hidden" means a link to it is not displayed). If you hide it, then access it directly using the URL: http://localhost/webwork2/admin . To hide (or unhide) a course select Hide Inactive courses in the admin course and follow the directions. If you are using the system with students, you probably will want to hide the admin course.
  5. If your network uses DHCP, networking will be automatically configured for your system and you should be able to access the web with Firefox. If not, see below.
  6. Look through the instructions in Installation_Manual_for_2.12_on_Ubuntu_16.04 for testing WeBWorK. Note that all the installation steps have already been done for you except as noted below.

Install openssh-server

We need to install the openssh-server so that you can ssh into your server from remote locations.

  1. Select Dash Home and type Synaptic. Click on the Synaptic Package Manager. Actually it will probably be displayed as soon as you select Dash Home. You will have to enter the password wwadmin. The Synaptic Package Manager window will open.

Now we will install the openssh-server.

  1. Select Search and enter openssh-server and then click on Search
  2. Select and Mark for Installation (by double clicking or checking and then selecting Mark for Installation) openssh-server
  3. Click on Apply
  4. You will see a pop up window Apply the following changes? and then click Apply
  5. After the installation completes click Close and then quit the Synaptic Package Manager

Now you can connect remotely to your server with ssh but you may have to reboot your server for this to take effect.

Checking for and installing hotfixes

Follow the instructions at Installation_Manual_for_2.10_on_Ubuntu_14.04#Checking_for_and_installing_hotfixes

Passwords

It is imperative that you CHANGE THE PASSWORDS for the OS user wwadmin (which has sudo privileges) and also for the WeBWorK user admin which has professor privileges both in the admin course and in the myTestCourse. Otherwise anyone can connect to your server and pretty easily gain root access.

Open a terminal window by clicking on Dash Home and typing Terminal. The next time you select Dash Home, the terminal icon might be displayed. Or you can just type <Ctrl> <Alt> <T>.

To change the password for wwadmin.

$ passwd
Changing passwd for wwadmin:
(current) UNIX password: wwadmin
Enter new UNIX password: <new wwadmin password> 
Retype new UNIX password: <new wwadmin password>
passwd: password update successfully
$ 

Do not forget the <new wwadmin password> that you just entered.

Now change the password for the login keyring. This is used for wireless connections.

  1. Select Dash Home and type Password. Then select Passwords and Keys
  2. Right Click on Passwords:login
  3. Click Change Password
  4. Enter the old password (wwadmin) and the new password.
  5. Click Continue

Now we change the passwords for the MySQL users root and webworkWrite. First we edit site.conf.

$ cd /opt/webwork/webwork2/conf
$ sudo gedit site.conf
[sudo] password for wwadmin: <wwadmin password>

Search for $database_password = "wwadmin"; and replace this by
$database_password = "database_password"; where of course you should replace 'database_password' with your own password. We refer to this password as <database_password>. Remember it as we will need it shortly. Then save the file and Quit.

Then restart Apache so the changes take effect.

$ sudo apache2ctl graceful
$

and start MySQL

$ mysql -u root -p 
Enter Password: wwadmin
mysql> SELECT Host, User, authentication_string FROM mysql.user;

You will see a table with four users (root, mysql.sys, debian-sys-maint and webworkWrite). You should see that all three users have passwords (which will be displayed in encrypted form).

Now we will change the password for the webworkWrite User

mysql> UPDATE mysql.user SET authentication_string=PASSWORD('<database_password>') WHERE host='localhost' and user='webworkWrite';

where of course you should replace <database_password> by whatever you used above.

Next we will change the password for the root User. In the command replace newpwd with your chosen 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 Ubuntu linux system root user. Below we refer to this as <mysql root password>


mysql> UPDATE mysql.user SET authentication_string=PASSWORD('newpwd') WHERE host='localhost' and user='root';
mysql> FLUSH PRIVILEGES;

Now use your up arrow key to run the command

mysql> SELECT Host, User, authentication_string FROM mysql.user;

and you should see that all these users now have new passwords (which will be displayed in encrypted form).

Then exit MySQL

mysql> exit
Bye
$


and test that all is well:

$ sudo /etc/init.d/mysql restart
[sudo] password for wwadmin: <wwadmin password>
$ mysql -u root -p 
Enter Password: <mysql root password>

You should see

Welcome to the MySQL monitor ...
mysql>


To change the passwords for the WeBWorK user admin, log into the WeBWorK admin course (http://localhost/webwork2/admin) and myTestCourse (http://localhost/webwork2/myTestCourse) and change the passwords from admin to something more secure.

Setting up networking using a static IP address

  1. select Dash Home and type Network Connections
  2. Select the wired connection under Ethernet and hit Edit and look and see if everything is set up correctly and correct any errors
  3. If no connection is set up click Add and then enter your servers IP address, Netmask (usually 255.255.255.0 but possibly 255.255.0.0) and Gateway address (often the same as the IP address with the last number replaced by 1). Important: after entering a number hit the <Enter> key so that the change is recorded.
  4. Next enter the IP address(es) of your DNS server(s)separated by spaces. You need to enter at least one DNS server
  5. Finally enter the search domain Hosts
  6. Click Save
  7. Enter <wwadmin password> and click Authenticate
  8. Click Close

Your network connection should start up almost immediately. If you are still having problems first try rebooting (click on the power button button icon in the upper right hand corner, then select Restart) and if that doesn't work it's time to investigate further or seek help.

Now we have to set your server's fully qualified domain name. Note that if your network was set up automatically via DHCP, your server's fully qualified domain name should already be set up. You can check by running the hostname commands below.

Run the command

sudo hostnamectl set-hostname webwork
[sudo] password for wwadmin: <wwadmin password>

where of course you should replace webwork by whatever your server's name is (of course webwork is a very good and common name for a WeBWorK server).


You can check these settings by running the commands

$ hostname --fqdn

and

$ hostname

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

Note that if your server can not find its fully qualified domain name, certain tools (such as the Synaptic Package Manager) may not start.

For some of these changes to take effect you have to restart your server. So restart the server and then 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.

Further test Apache by connecting to "http://localhost/server-info" using a browser on your machine and you will see a page listing various information about Apache. In particular under Server Settings you should see something like

Server Version: Apache/2.2.22 (Ubuntu) mod_apreq2-20090110/2.8.0 mod_perl/2.0.5 Perl/v5.14.2

indicating that both mod_apreq2 and mod_perl are installed. If you want to be able to access "server-status" and "server-info" from a remote location, see the section Installation_Manual_for_2.12_on_Ubuntu_16.04#Apache_2_and_mod_perl

Finally you can find out what ip address your server is using by running the command ifconfig in a terminal window and then in the eth0 section looking at inet addr:

System Configuration

Most WeBWorK configuration is done in the files /opt/webwork/webwork2/conf/site.conf and /opt/webwork/webwork2/conf/localOverrides.conf. These files provide system-wide configuration settings, and defaults for course settings. Any setting in these files 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 localOverrides.conf) in the course.conf file. An instructor can edit the course.conf file for herself (for her own course) but most things instructors may want to customize and many others (language, timezone, permissions, display modes, email, ...) can be set using the Course Configuration page from within the course and such setting override those in the configuration files.

Actually there are three main configuration files, site.conf, defaults.config and localOverrides.conf. The reason there are three configuration files is to make upgrading WeBWorK easier.

  • site.conf: This file contains global variables which are required for basic configuration. It will not be overridden when you update WeBWoeK but it's distribution version, site.conf.dist will be.
  • defaults.config: This file contains initial settings for many customizable options in WeBWorK. Do not edit defaults.config. It will be overridden next time you upgrade.
  • localOverrides.conf This is where you should add all local customizations. It will not be overridden when you update WeBWoeK but it's distribution version, localOverrides.conf.dist will be.

There are several options that must be set for WeBWorK to work with your system. The rest of the file consists of customization options.

Edit the site.conf file

Now edit site.conf

$ cd /opt/webwork/webwork2/conf
$ gedit site.conf

First we have to add information about the Apache2 server setup. Search for server_root_url and edit the line so that it reads:

$server_root_url   = "http://yourserver.yourschool.edu";

where of course you should edit yourserver.yourschool.edu appropriately or you can keep this set to localhost

Note that above we already set the password that WeBWorK uses when it communicates with the MySQL database. Note that this is not the same as the <mysql root password> which is the password the MySQL root user uses. This is set with $database_password and it is not a bad idea to double check that it is correct.

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 configure 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} = ;  # e.g. 'mail.yourschool.edu' or 'localhost'
$mail{smtpSender} = ;  # e.g.  'webwork@yourserver.yourschool.edu'

entering the appropriate information.

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/ . 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 enter $siteDefaults{timezone} = "America/New_York"; which is the default. Read the documentation in this section of the the site.conf file for more information on selecting timezones and formatting dates.

Search for $siteDefaults{timezone} and enter your local timezone if it is not correct.

Then save the file and Quit.

The defaults.config file

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), in defaults.config, you will see the lines

$mail{allowedRecipients}     = [
   #'prof1@yourserver.yourdomain.edu',
   #'prof2@yourserver.yourdomain.edu',
];

But we are not supposed to edit the defaults.config file, so if we want to do this, we will copy this to localOverrides.conf and edit it appropriately. Note that we should probably move this setting to the site.conf file.

Edit the localOverrides.conf file

$ cd /opt/webwork/webwork2/conf
$ gedit localOverrides.conf

As we said above, 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), in localoverrides.config, add and then edit the lines

$mail{allowedRecipients}     = [
   #'prof1@yourserver.yourdomain.edu',
   #'prof2@yourserver.yourdomain.edu',
];

removing the # and using the professor(s) actual email address(es). In order to have professors from individual courses receive such email, this should be set in course.conf (which you find in the course directory) to the addresses of professors of each course. Note that the settings in course.conf override the settings in site.conf, default.conf and localOverrides.conf so if in addition you want e.g. the WeBWorK administrators to receive copies, you have to add them as well.

After you have used WeBWorK for awhile, you may want to change the default header files in defaults.config. Search for $webworkFiles{screenSnippets}{setHeader} and $webworkFiles{hardcopySnippets}{setHeader} in localOverrides.config. Settings in the conf and config files affect all WeBWorK courses. You can override any setting in these conf and config files for an individual course by putting the local setting in course.conf.

Also now there are several versions of the classlist editor, homeworkset editor, library browser and pgproblem editor. Which ones are available in a course is determined by the settings for %showeditors in localOverrides.conf. As above, if you want to customize what is available for an individual course (e.g. one professor may want to try out the new editors and others may not), copy the %showeditors structure to course.conf and then edit it to make available the desired editors.

File and Directory Locations and System Information

This installation of WeBWorK and Ubuntu follows the instructions given in Installation_Manual_for_2.12_on_Ubuntu_16.04. You can look there to find the locations of the WeBWorK files. The option Optional A is implemented (with the wwtmp directory set up as a separate directory but not as a separate partition) but options Optional B and Optional C are not. You can implement these if you choose (you should at least look at them to see what they do). All system files are in their standard Ubuntu locations. The Ubuntu installation is identical to that obtained from the Ubuntu 16.04 desktop LiveDVD distribution with some updates included. If you see the update manager pop up, you should install the recommended updates. Or you can install them by using the Software Updater. To find this select Dash Home and type update.

Consult for other WeBWorK documentation for system administrators.

-- Main.ArnoldPizer - 20 June 2016