Installing WeBWorK on Debian
using Floppies. (brief, quicker
version) by Samuel Hathaway
(sh002i@math.rochester.edu) and Christopher
Harrington(ch003i@math.rochester.edu)
Special thanks to Lars
Jensen and Arnold Pizer
for their helpful Debian and RedHat Installation tips. TABLES OF CONTENTS I. Creating
Installation Disks II. Installing
Debian III.
Installing WeBWorK on Debian IV.
Installing the demoCourse
Part ONE: Creating
Debian Installation Disk Images on your Floppies YOU NEED: Three formatted 1.44 meg
floppies. 1. We are
assuming that you are using the 'idepci' installation set. See
section 5.2 "Choosing the Right installation set" for
more details.
Save the following disk images (to same directory on hard-drive): http://http.us.debian.org/debian/dists/potato/main/disks-i386/current/images-1.44/idepci/driver-1.bin http://http.us.debian.org/debian/dists/potato/main/disks-i386/current/images-1.44/idepci/root.bin http://http.us.debian.org/debian/dists/potato/main/disks-i386/current/images-1.44/idepci/rescue.bin Also, download following utility: http://http.us.debian.org/debian/dists/potato/main/disksi386/current/dosutils/rawrite2.exe 2. You'll need to run rawrite2.exe
three times. Each time, insert new floppy, type in appropriate
filename "driver-1.bin", "root.bin" or
"rescue.bin", specify correct drive (most likely A)
and create the images. Be sure to label your disks: DRIVER, ROOT,
RESCUE.
Part TWO: Installing Debian (We're sorry this part is a bit wordy. We didn't
want user to get lost)
1. Before you reboot and try to install the new
GNU, you should make sure you copy your DNS and Network
information.
[This is most likely accessible through "Start ->
Settings -> Control Panel -> Network -> TCP/IP (click on
properties). ]
2. Place RESCUE floppy in disk-drive and reboot.
3. A message Welcome to Debian GNU/Linux 2.2!
should appear with a prompt at the bottom of the screen. Press
<ENTER> to boot.
4. You should eventualy see VFS: Insert root
floppy disk to be loaded into RAM disk and press ENTER.
Insert the ROOT floppy and press <ENTER>.
5. The Release Notes appear so press
<ENTER> to continue.
6. Select "CONFIGURE THE KEYBOARD"
(top-choice) and press ENTER.
7. Select approprirate keyboard (most likely the
first one -- QWERTY/US)
8. Select "Partition a Hard Disk"
(top-choice) and press ENTER.
9. Select which Hard-Drive to format. Default is
"/dev/hda".
10. A LILO Limitations screen will
appear. You should read this especially if you are using an old
computer with a large hard-drive. Press <ENTER> when done. 11. The "cfdisk"
utility screen should appear. Use Up/Down Arrow to
Highlight different partitions and Left/Right arrows to
choose the correct command. Assuming you don't want to save any
data, "Delete" any and all partitions.
12. After you delete everything you should have
a large chunk of "Free Space".
Choose "New" -> "Primary" and type in size
you want. You may want to create more than one partition so
choose correct disk sizes according to your needs.
While the Default is ALL you cannot use it all. You're going to
need to make a swap partition also!
We recommend you make the Linux partition at least "1
gig" but save at least 100-200 megs for the Swap Parition
(which is created in the next step). Recall, You are writing sizes in Megabytes so, for
instance, 10000 would be 10 gigs.
13. Choose [Beginning]. It should default to
noting FS (file-system) "Linux".
14. Select [Bootable] and under Flags the word
"BOOT" will now appear.
15. Press down to select "Free Space".
Then Select [New]. Choose [Primary]. A filesize of 128 Megs would
be good idea. Choose [Beginning].
16. With this second partition of LINUX
(non-bootable), highlight it and go over to [TYPE]. Press ENTER
and a menu of options will appear. Note that 82 is 'Linux Swap'.
Press ENTER.
17. Another few options will appear and on the
bottom of the screen it will say: "Enter filesystem type:
". Default is 82, which is what you want.
18. Now under FS it should say "Linux
Swap" for your second partition. Choose [Write] to save your
changes.
19. It will ask: Are you sure you want write
the partition the partition table to disk? (yes or no):.
Type the whole word "yes".
20. Writing partition table to disk...
will appear and then when it finishes choose option [Quit]
21. Installation Main Menu: choose (top choice)
"Next: Initalize and Activate a Swap Partition".
22. It should find the "Swap
Partition" that you created before. Default may be
"/dev/hda2: Linux swap". Press ENTER when you are set.
23. It will ask whether you want to Skip the
Scan for Bad Blocks? We chose <Yes> to skip test.
24. Computer asks, Are You Sure? Choose
<Yes>
25. Now, the main menu will appear. Choose
"Next: Initalize a Linux Partition" (top-choice).
26. Select Partition will appear.
Default is "/dev/hda1: Linux native". Choose the linux
partition you created first and made bootable. Press ENTER when
set.
27. Pre-2.2 Linux Kernel Compatibility?
screen will appear. It asks, Do you want to retain Linux
kernel 2.0 compatibilty? We chose <No>
28. It will again ask about skipping the test
for Bad Blocks. We chose <YES> which means we skipped it.
29. Computer asks, Are You Sure? Choose
<Yes>
30. A screen will appear where it is Creating
filesystem and the computer will be writing inode tables and
other goodies. Wait patiently.
31. Mount as the Root Filesystem?
screen will appear. Choose <YES>
32. Main Menu will appear AGAIN. Choose
(top-choice) "Next: Install Operating System Kernel and
Modules".
33. The Select Installation Medium will
appear. Select "/dev/fd0: first floppy drive" and press
ENTER.
34. The computer will prompt you to insert the
RESCUE FLOPPY. Do so and choose <CONTINUE>. Wait patiently.
35. The computer will prompt you to insert the
DRIVER FLOPPY. (The compute refers to it as Disk 1). Do so and
choose <CONTINUE>. Wait patiently.
36. Main Menu appears AGAIN. Choose Next:
Configurate Device Driver Modules (top-choice).
37. A Question will appear. You want to
SKIP this step so chose <YES>.
38. You now need to configure any modules you
need in order to access the network. Most of the time, the kernel
is able to handle the ethernet drivers and load themselves.
However, you can find your own if you need to. We didn't do
anything in this step.
39. Choose EXIT and press
<ENTER>.
40.
You're at the Main MENU. Choose "Configure the Network"
(top-choice)
41. Choose the host Name screen should
appear. Enter your machine's hostname.
42. Automatic Network Configuration, if
you are configured through DHCP (dynamic host configuration
protocol) then say "Yes". Otherwise choose
"No". If you have a specific IP address, choose
"No".
43. If you chose "No" then Choose
the IP Address screen will come up. Type in the IP address
(most likely written down when you began.) Choose the Network Mask screen will come up. Usually
accept the default (255.255.255.0) unless you know differently. What is your IP gateway address? screen will come up.
This is a network property and should be written down. Type in
number.
44. If Choose the Domain name appears,
you should put a domain name in -- get from network admin. Press
ENTER when done.
45. Choose the DNS Server Addresses
screen should appear. You should have this information written
this down. Type in that number.
46. Main Menu appears again. Choose "Next:
Install the Base System" (top-choice).
47. Select Installation Medium screen
should appear. Scroll down and choose "network: retrieve
from network" choice. Press <ENTER>
48. Fecthing installation files over the
network screen appears. Be sure to press <ENTER> to
continue and begin HTTP retrieval of files.
49. You can change where you are downloading
from if you want to, but normally just accept and press
<OK>.
50. Wait patiently as the status bar indicates
all the downloading going on. After downloading completes the
system will extract the needed files. Finally the Main Menu wil
appear again.
51. Choose "Next: Configure the Base
System" (top-choice) from the Main Menu.
52. Select Timezone screen appears. We
chose "US" then "Eastern" then pressed
"OK".
53. Timezone Configuration. We chose
"YES".
54. Main Menu: choose "Next: Make Linux
Bootable Directly From Hard Disk" (top-choice).
55. Where should the Lilo boot loader be
installed? Choose "/dev/hda: Install in the MBR (use if
unsure)." That's the top-choice.
56. Main Menu: Choose "Alternate: Reboot
the System". In essence, we skipped this step because we
have a rescue disk already.
57. Reboot the system? Be sure Remove
the floppy disks from the computer before you choose <YES>.
58. After the computer reboots, question: Shall
I enable md5 passwords? You can make your own choice but we
chose <YES>.
59. Shall I install shadow passwords?
Most likely answer <YES>
60. Enter a password for root: Type in
the password.
61. Shall I create a normal user account
now? Choose <YES>. This user is important in the
WeBWorK installation in Part III.
62. Shall I remove the pcmcia packages?.
Choose <YES>.
63. Do you want to use a PPP connection to
install the system? Most likely you do not. Choose
<NO>.
64. Apt Configuration screen will
appear. Choose for method "http".
65. Use non-US software? choose
<YES>.
66. Use non-free software? choose
<YES>.
67. Use contrib software? choose
<YES>.
68. Select a country: choose
"United States", press <OK>, and pick a mirror.
"http.us.debian.org" worked fine last time. <OK>
69. Enter http proxy information, or leave
black for none:". If you have a proxy server, fill in
information. Else leave blank.
70. The program will test apt sources and
hopefully downloading should begin. [If the download appears to
be stalling you press Control-C and repeat steps 64-69.]
71 Add another apt source?" Choose
<NO>.
72. Choose "simple" installation.
<OK>
73. You will be presented with a list of task
packages to install. You don't need to choose any. Click
"FINISH".
74. anXious screen. Choose <YES>
for video card autoconfiguratoin.
75. Do you want to continue? [Y/n]
<Y>. This starts the download.
76. Do you have sound hardware installed.
Answer is self-explanatory.
77. Do you want /usr/bin/ssh to be installed
SUID root? Take their suggestion and choose <NO>. Do
you want to run the sshd server? <YES>
78. After you wait for it to finish, it will say
[---Press return---]. Press <ENTER>. If you want
to configure your own mail, go ahead. Otherwise just choose 5.
80. "Have fun!" WE are done! <press
OK>
Part Three: Installing WeBWorK
We'll be referring to two users throughout this installation. The
first is "root". The other is [normaluser], which is
the user that you created back during Part II.
It is important that when you unpack the WeBWorK files that you
be in [normaluser] instead of root.
Therefore, throughout this installation we will explictly say
which user you should be in. These symbols will help
differentiate. # = root >= normaluser NEED: You really should have a DNS hostname set
up for the box that you are installing. Also, know the IP address
and information.
1. Login as root
2. Get the following packages: (use apt-get
install <packagename>)
libgd-perl (GD.pm)
libhtml-parser-perl (HTML::Entities)
libmime-base64-perl (MIME-Base64)
libnet-perl (NET::SMTP)
latex2html
libcgi-pm-perl (CGI.pm)
apache
nano
libc-dev
gcc
tetex-bin
[the files in () are just details. don't include them in the
argument!)
# apt-get install
libgd-perl libhtml-parser-perl libmime-base64-perl libnet-perl
latex2html lynx gcc libc-dev libcgi-pm-perl nano tetex-bin apache<font
size="3">
3. When it asks, 'letter' is the correct
response. 4. Edit /etc/latex2html.config (you can use
something like nano, pico, ae, emacs to edit) > nano
/etc/latex2html.config
Make sure the following variables are set: [All three changes are
consecutive]
$PK_GENERATION=1
$DVIPS_MODE='toshiba'
$METAFONT_DPI=180
5. Login to [normaluser] and start downloading
WeBWorK. Now we are ready to obtain and start installing WeBWorK.
Use a web browser (like lynx) connect and login to
http://webhost.math.rochester.edu/downloadwebwork
Click on "Download Files".
> lynx
http://webhost.math.rochester.edu/downloadwebwork
When you find the correct links press D to download the files.
Then "Save them to Disk".
You are getting these files:
webwork_1.6_XXX.tar.gz
templates_1.5_22-August-00.tar.gz
also, optionally you can also get these files. But note they are
included in the archives above.
readme.first
readme.install
readme.upgrade
overview.html
setup.html
linuxredhat.html
(Of course, XXX isn't the real file name. It'll be a number
according to whatever the latest version is.)
6. Extract the files from the archives. Recall
that you are doing this as [normaluser]. > tar -xzf
webwork_1.6_XXX.tar.gz
7. Now, login in to root. execute this command: # chmod 777 /usr/local
8. Return to [normaluser] account window.
Execute these commands: > mv webwork.tar /usr/local
> cd /usr/local
> tar -xf webwork.tar
> rm webwork.tar
9. Return to root account window. Execute this
command: # chmod 755 /usr/local
10. Now, you want to create a group for
administration of general WeBWoRK files.
In the root account window type: # addgroup wwadmin
# adduser [normaluser] wwadmin
(To create users type: adduser [you'll be prompted for name,
password, etc.] )
(To add any other users the wwadmin group: adduser
<username> wwadmin )
11. Now, we need connect WeBWorK's cgi directory
to the webserver. (We are still in the root account). # mkdir
/usr/lib/cgi-bin/webwork
# ln -s /usr/local/webwork/system/cgi
/usr/lib/cgi-bin/webwork/system
# ln -s /usr/local/webwork/system/system_html
/var/www/webwork_system_html
12. Switch back to [normaluser]. You need to
logout and then login. This activates group membership. > logout
login: [normaluser]
password: bluecowflysatmidnight
> chgrp -R wwadmin
/usr/local/webwork/
> chmod -R 755 /usr/local/webwork/
13. As [normaluser], we must run the webwork
setup script: > cd
/usr/local/webwork/system
> ./system_webwork_setup.pl
press [enter]
type 'y'
choose 'w' for working.
choose 'n' for no. What is the full path to perl? press [enter] to accept
default ( /usr/bin/perl ) What is the cgi-URL? press [enter] to accept default (
/cgi-bin/webwork/system/ ) What is html-URL? press [enter] to accept default (
/webwork_system_html ) Enter the group name: type 'wwadmin'
Q: "Set courses permissions?" type 'y' for yes.
Q: "Do you want to set the group for all directionaries and
files?" type 'y' for yes.
Q: "Set permissions?" type: 'y' for yes.
14. You need to fix
"displayMacros.pl". Use an editor (pico, ae, nano) to
change "/usr/local/bin" to "/usr/bin" in two
places.
> nano
/usr/local/webwork/system/courseScripts/displayMarcros.pl
At the end of the file, change
"system("/usr/local/bin/latex2html ......") to
"system("/usr/bin/latex2html .....")
15. WeBWorK can use the typeset font. Visit
http://hutchinson.belmont.ma.us/tth/ (use lynx) to download the C
binary file.
> lynx http://hutchinson.belmont.ma.us/tth/
Find the correct link for the C binary file. Press 'D' to
download the file and "Save It to Disk".
Once you have tth_C.tgz, go to its directory. Use these commands: > tar -xzf tth_C.tgz
> cd tth_C
> gcc -o tth tth.c
> mv tth /usr/local/webwork/system/scripts/
(this compiles the file and moves it to the correct directory)
16. We need to fix PDF generation. We need to
edit /usr/local/webwork/system/scripts/makePDF.pl (use
nano, ae, pico) > nano /usr/local/webwork/system/scripts/makePDF.pl
you need to replace "/usr/bin/ps2pdf $2.ps $2.pdf >
/dev/null 2>&1" to "/usr/bin/pdflatex $2.tex
$2.pdf > /dev/null 2>&1"
We are now changing from the program "ps2pdf"
to "pdflatex" and we're changing
".ps" to ".tex"
Note: Now, you don't need to generate a .ps file in
welcomeAction.pl everytime you just want a .pdf file. This
avoids ps2pdf 'invalid font' errors.
17. You need to use an editor (like nano, ae, pico) to
update Global.pl with information relevant to your system.
> nano /usr/local/webwork/system/Global.pm
Change $feedbackAddress to correct email for your site. Likewise
for $legaladdress and $webmaster. Change $smtpserver to the
correct server for your mail.
Part IV: Installing the demoCourse
1. As root, you need to create a group for
demoCourse. Then add appropriate group members.
The appropriate group members are professors, TAs, and other
people who should be able to edit and view coures data.
# addgroup --force-badname
DEMOCOURSE
# adduser www-data DEMOCOURSE
# adduser [normaluser] DEMOCOURSE
2. We need to restart the web server with all
new. # /etc/init.d/apache
restart
3. As root, we need to add a symbolic link to
demoCourse from webserver. # mkdir /var/www/webwork # ln -s
/usr/local/webwork/courses/demoCourse/html
/var/www/webwork/demoCourse
4. Have [normaluser] logout. Then login in order
for the changes to group membership take place. (It is important
the script is not ran by root, but instead [normaluser])
> logout login: [normaluser]
password: igrokspock
> cd
/usr/local/webwork/courses/demoCourse
> ./course_webwork_setup.pl
press [enter]
type 'y' for yes
type 'w' for working
type 'y' for yes (to create any missing directories)
default for course URL should be "/webwork/demoCourse".
press [enter] to accept default.
default for cgi URL should be
"/cgi-bin/webwork/system/". press [enter] to accept
default.
default for course link should be "demoCourse". press
[enter] to accept default.
type in 'DEMOCOURSE' for group name.
type 'y' to create new webwork.ph file
type 'y' to create new index.html file
type 'y' to set group for all directories and files
type 'y' to set permissions
5. Add webwork scripts directory to your search
path. (This is in your [normaluser] account)
NOTE: Anyone who is going be issuing script commands should
follow the follow command to add scripts to their search path!
(professors, TAs, etc.)
We're going to edit the .bash_profile to add to the search path.
> cd
> nano .bash_profile add the following line at the end of the
file:
PATH = "/usr/local/webwork/system/scripts:${PATH}"
6. Logout of [normaluser] and login again. This
activates the new search path settings. > logout
login: [normaluser]
password: smurfsgotcancelled
> cd
/usr/local/webwork/courses/demoCourse/templates
> import_classlist-database.pl demoCourse demoCourse.lst
[NOTE: that is a lower-case L, not a 1]
type 'y' to continue with the command line script. >
setProfPermissions.pl demoCourse apizer
Now, you have finished installing the demoCourse. You can login
to the web server at access webwork at:
http://math.rochester.edu/webwork/demoCourse where
"math.rochester.edu" is instead the hostname of your
computer.
You can go to the loginpage (on WeBWorK) and use
login --> "apizer"
password --> "111-11-1111"
Here you can now generate problems and other goodies. Be sure to
change this password immediately.
<| Post or View Comments |>
|