Difference between revisions of "Installing WeBWorK from Live DVD"

From WeBWorK_wiki
Jump to navigation Jump to search
Line 46: Line 46:
 
# Look through the instructions in [[Installation_Manual_for_2.4_on_Ubuntu_8.04]] for testing WeBWorK. Note that all the installation
 
# Look through the instructions in [[Installation_Manual_for_2.4_on_Ubuntu_8.04]] for testing WeBWorK. Note that all the installation
   
==Internet access==
 
 
===Passwords===
 
===Passwords===
If you connect to the internet it is imperative that you CHANGE THE PASSWORDS for the OS users root and fedora (which has sudo privileges) and also for the WeBWorK users admin and fedora which have professor privileges. Otherwise anyone can connect to your server and pretty easily gain root access.
+
It is imperative that you CHANGE THE PASSWORDS for the OS users root and ubuntu (which has sudo privileges) and also for the WeBWorK users admin and ubuntu which have professor privileges both in the admin course and in the myTestCourse. Otherwise anyone can connect to your server and pretty easily gain root access.
   
To change the root password goto System, Administration, Root Password. Enter the current password (admin) and change it. Or in a terminal window (Applications, System Tools, Terminal) enter su to become root and then passwd to change the password. To change the password for fedora login to fedora and run passwd (or use System, Administration, Users and Groups or sudo passwd fedora).
 
  +
To change the root password open a terminal window by clicking <code>Applications</code>, <code>Accessories</code> and then <code>Terminal</code>. Enter
  +
$ su
  +
Password: admin
  +
# passwd
  +
Enter new UNIX password: <code>&lt;new root password&gt;</code>
  +
Retype new UNIX password: <code>&lt;new root password&gt;</code>
  +
passwd: password update successfully
  +
# exit
  +
$
  +
'''Do not forget the <code>&lt;new root password&gt;</code> that you just entered.''' Now change the password for ubuntu.
   
To change the passwords for the WeBWorK users admin and fedora, log into the WeBWorK courses admin (http://localhost/webwork2/admin) and myTestCourse (http://localhost/webwork2/myTestCourse) and change the passwords from admin to something more secure.
 
  +
$ passwd
  +
Changing passwd for ubuntu:
  +
(current) UNIX password: admin
  +
Enter new UNIX password: <code>&lt;new ubuntu password&gt;</code>
  +
Retype new UNIX password: <code>&lt;new ubuntu password&gt;</code>
  +
passwd: password update successfully
  +
$
  +
And as we said above '''Do not forget the <code>&lt;new ubuntu password&gt;</code> that you just entered.'''
  +
  +
To change the passwords for the WeBWorK users admin and ubuntu, log into the WeBWorK courses admin (http://localhost/webwork2/admin) and myTestCourse (http://localhost/webwork2/myTestCourse) and change the passwords from admin to something more secure.
   
 
===Internet access into and out of your server===
 
===Internet access into and out of your server===
The server's firewall is set to accept only www (http), secure www (https) and secure telnet and file transfer (ssh) connections. Here we give directions for setting up an ethernet connection. You can try setting up wireless using the procedure below but in my experience with Dell equipment and linux, wireless requires you to download and configure special drivers and is beyond the scope of these directions (do a Google search for help).
+
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.
  +
  +
# Select <code>System</code>, <code>Administration</code>, <code>Network</code>
  +
# Click on <code>Unlock</code>
  +
# Enter <code>&lt;ubuntu password&gt;</code> and click <code>Authenticate</code>
  +
# Click on <code>Hosts</code>
  +
# Click <code>Add</code> and enter with 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>
  +
# Select the entry <code>127.0.0.1</code> and click <code>Properties</code>
  +
# Under Aliases make sure you have 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>
  +
# Select the entry <code>127.0.1.1</code> and click <code>Properties</code>. Under <code>Aliases</code> replace <code>WeBWorK-DVD</code> by your server's fully qualified domain name, something like <code>your_server_name.department.school.edu</code>
  +
# Then click <code>OK</code>
  +
# And click <code>Close</code> to close <code>Network settings</code>
  +
  +
You can check these settings by running the commands
  +
  +
$ hostname --fqdn
  +
  +
and
  +
  +
$ hostname
  +
  +
The first respond with the fully qualified domain name and the second with just <code>your_server_name</code>.
  +
  +
  +
Note that if your server can not find its fully qualified domain name, certain tools (such as the Synaptic Package Manager) will not start.
  +
  +
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.
  +
  +
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 <code>Server Settings</code> you should see
  +
  +
Server Version: Apache/2.2.8 (Ubuntu) mod_apreq2-20051231/2.6.0 mod_perl/2.0.3 Perl/v5.8.8
  +
  +
# In order to get a fully functioning WeBWorK server pretty much all you have to do is to edit /opt/webwork/webwork2/conf/global.conf and set $mail{smtpServer} to your email server. This system could function as an smtpServer but it is not set up to do so.
   
# I'll assume (the worst case) that you are switching between various networks some using DHCP and some using static IP addresses. Once you setup networking, you don't have to do anything if you reboot the computer onto the same network.
 
  +
==File and Directory Locations==
# Goto System, Administration, Network. Under the Devices tag uncheck currently configured devices and delete them (this is not absolutely necessary but is the cleanest way). Under the DNS tag remove any DNS's and the DNS search paths. Now go back to the Devices tag and hit New, select Ethernet connection and hit Forward, select your card and hit Forward. If you have DHCP you can just hit forward and ignore the rest of this paragraph. For a static IP address select Statically set IP addresses and fill in the required information. Then hit the DNS tag and fill in your servername and the IP address(es) of your name servers. Hit the Hosts tag and check show loopback. Edit the IP information replacing servername and serverdomain with your info. Also click New and add your IP address and your fqdn (fully qualified domain name, i.e. servername.serverdomain) as hostname.
 
# Then save the changes (File, Save) and Quit.
 
# Finally goto System, Administration, Services scroll down to ssh and check that ssh is Enabled. If not Enable it.
 
# Once you make the changes reboot your computer (you need to do this so that the changes to the servername, ssh, etc. take place).
 
# Try firefox and see if you are connected to the world. Login to your computer from a remote site using ssh and try to connect to webwork from a remote browser (URL: http://ipaddress/webwork2 or http://servername.serverdomian/webwork2 if the nameservers know about you).
 
# Note that with Fedora (and Ubuntu, etc) if the server can not find it's fqdn (in a terminal window try hostname -f ) certain GUI applications like Network and the Package Manager will not work. That's one reason we had to reboot above. If things get messed up replace the files <code>/etc/hosts</code> and <code>/etc/sysconfig/network</code> with backups and reboot. There are two sets of backups: <code>hosts.dist</code> and <code>network.dist</code> are the original files on my USB distribution and <code>hosts.bak1</code> and <code>network.bak1</code> are the original files on the Fedora distribution. Either work but use either both <code>.dist</code> files or both <code>.bak1</code> files. The backup files are found in the same directories the original files are in.
 
# Also note that I have disabled the network manager and enabled network because of a known bug in Fedora 9 with (at least) static IP addresses whereby Firefox always starts off line which is very annoying.
 
# In order to get a fully functioning WeBWorK server pretty much all you have to do is to edit /opt/webwork/webwork2/conf/global.conf and set $mail{smtpServer} to your email server. This USB system could function as an smtpServer but it is not set up to do so.
 
   
 
[[Category:WeBWorK on Live Media]]
 
[[Category:WeBWorK on Live Media]]

Revision as of 17:55, 29 July 2008

These instructions cover the installation of the Ubuntu Linux 8.04 operating system and WeBWorK 2.4 using the WeBWorK live DVD

Installing WeBWorK from the WeBWorK Live DVD

Overview

After installing from the WeBWorK Live DVD which only requires a few steps, you will have a full fledged Ubuntu 8.04 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 users root and ubuntu (which has sudo privileges) and also for the WeBWorK users admin and ubuntu which have professor privileges (see below).

If you try this, I would appreciate any comments, suggestions, bug reports, etc.

There are more detailed instructions for Ubuntu 8.04 and WeBWorK 2.4 at Installation_Manual_for_2.4_on_Ubuntu_8.04

Download the iso image

  1. Go to http://hosted3.webwork.rochester.edu/test/WW2.4_Ubuntu8.04_LiveDVD.iso and download WW2.4_Ubuntu8.04_LiveDVD.iso (it is a 916 MB file).
  2. http://hosted3.webwork.rochester.edu/test/WW2.4_Ubuntu8.04_LiveDVD.iso.md5 gives 5565f186e1f66b11c036d0c398dba1a0 /home/remastersys/remastersys/WW2.4_Ubuntu8.04_LiveDVD.iso
  3. Verify the MD5 checksum of your downloaded file and then burn it to a DVD (the file is too large to be burned to a CD).

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 <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.

First select Install WeBWorK_DVD, the third option, and then hit <Enter>. After the system loads you will be presented with a series of 7 steps. .

  1. On the first install panel hit Forward to proceed with English as the selected language
  2. Select a city in your time zone and hit Forward
  3. Hit Forward to accept the default keyboard layout
  4. Next comes the Partition disks 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.4_on_Ubuntu_8.04 which gives more information on this
  5. The next panel asks "Who are you?". We will 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 Ubuntu for "What is your name?"
    • Enter ubuntu for "What name do you want to use to log in?"
    • Enter admin twice for the password
    • Enter WeBWorK-DVD for the name of the computer
    • You can change all of these things after the installation takes place. Especially you should change the password
    • Then hit Forward to continue
  6. On the Migrate Documents and Settings page just hit Forward to continue without importing anything
  7. Finally hit Forward on the Ready to install page to begin the installation. The Advanced... button on this page gives you options on installing the boot loader but you almost certainly want to use the defaults

Now sit back and relax while the installation takes place. Some of the steps (especially around 94%) can take a long time. Please be patient. When your finally see "Installation complete" hit Restart now.

Boot your server

  1. Remove the WeBWorK Live DVD 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 "ubuntu" with the password "admin" (more on accounts and passwords below). "ubuntu" has sudo privileges. The "root" account also has password "admin" but you can not log into as "root" on the log in page (you can su to "root" in a terminal window).
  4. You can open Firefox and access the URL: http://localhost/webwork2 . The admin course has two users "admin" and "fedora" as professors with passwords "admin" and "admin". myTestCourse has the same two users as professors and in addition practice (guest) users and one student user "jsmith" with password "jsmith". With the exception of jsmith, every password on the system is set to "admin"
  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.4_on_Ubuntu_8.04 for testing WeBWorK. Note that all the installation

Passwords

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

To change the root password open a terminal window by clicking Applications, Accessories and then Terminal. Enter

$ su
Password: admin
# passwd
Enter new UNIX password: <new root password> 
Retype new UNIX password: <new root password>
passwd: password update successfully
# exit
$ 

Do not forget the <new root password> that you just entered. Now change the password for ubuntu.

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

And as we said above Do not forget the <new ubuntu password> that you just entered.

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

Internet access into and out of your server

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.

  1. Select System, Administration, Network
  2. Click on Unlock
  3. Enter <ubuntu password> and click Authenticate
  4. Click on Hosts
  5. Click Add and enter with your server's IP address
  6. Under Aliases enter your server's fully qualified domain name, something like your_server_name.department.school.edu. Then click OK
  7. Select the entry 127.0.0.1 and click Properties
  8. Under Aliases make sure you have the following entries in order
    1. first your server's fully qualified domain name, something like your_server_name.department.school.edu
    2. second your server's name, something like your_server_name
    3. third localhost
  9. Select the entry 127.0.1.1 and click Properties. Under Aliases replace WeBWorK-DVD by your server's fully qualified domain name, something like your_server_name.department.school.edu
  10. Then click OK
  11. And click Close to close Network settings

You can check these settings by running the commands

$ hostname --fqdn

and

$ hostname

The first respond with the fully qualified domain name and the second with just your_server_name.


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

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.

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

Server Version: Apache/2.2.8 (Ubuntu) mod_apreq2-20051231/2.6.0 mod_perl/2.0.3 Perl/v5.8.8
  1. In order to get a fully functioning WeBWorK server pretty much all you have to do is to edit /opt/webwork/webwork2/conf/global.conf and set $mail{smtpServer} to your email server. This system could function as an smtpServer but it is not set up to do so.

File and Directory Locations