For security reasons, BOSS2 should not be run as root or as a normal user. A dedicated user should be created for BOSS2. This can be done with one of the following commands on most Linux or UNIX systems:
$ sudo adduser boss2 # Authentication with sudo $ su -c 'adduser boss2' # Authentication with su
BOSS2 currently uses MySQL for storing data. Only version 5 has been tested during development.
MySQL should be installed using the method most suitable to your system. On Ubuntu-based Linux distributions, the package required is ‘mysql-server’, on SUSE it is simply ‘mysql’.
BOSS2 will automatically generate the tables required, but the database it connects to will have to be set up before hand. The following is a template for creating a database and user.
$ sudo mysql -u root # Authentication through UNIX username $ sudo mysql -u root -p # Authentication through specified password
mysql> use mysql;
mysql> create database boss2;
mysql> grant ALL on boss2.* to 'boss2'@'localhost' identified by 'a secure password';
mysql> flush privileges;
mysql> quit;
BOSS2 makes heavy use of generics, and therefore requires a virtual machine certificated to run Java 5 software. BOSS2 has been tested with the Sun and IcedTea virtual machines only.
It is recommended to download and install the latest Java version and install it under your BOSS2 user account. The following template should accomplish this on most Linux systems.
.bin
extension. Save
this as /tmp/jdk-install.bin
.
/tmp/jdk-install.bin
file world readable
and executable.
$ chmod a+rx /tmp/jdk-install.bin
$ sudo su boss2 - # sudo authentication $ su boss2 - # su authentication
$ cd ~
$ /tmp/jdk-install.bin
jdk1.6.0_10
:
$ ls -d jdk* jdk1.6.0_10
$ exit
$ rm /tmp/jdk-install.bin
BOSS2 is a distributed as a web application comprising a servlet and all dependencies. BOSS2 has only been tested with the Tomcat servlet container, version 5.5
It is recommended to download and install the latest Tomcat version and install it under your BOSS2 user account. The following template should accomplish this on most Linux systems.
tar.gz
release. Save this as /tmp/tomcat.tar.gz
.
/tmp/tomcat.tar.gz
file world readable
and executable:
$ chmod a+rx /tmp/tomcat.tar.gz
$ sudo su boss2 - # sudo authentication $ su boss2 - # su authentication
$ cd ~
$ tar xvzf /tmp/tomcat.tar.gz
apache-tomcat-6.0.18
:
$ ls -d jdk* apache-tomcat-6.0.18
$ exit
$ rm /tmp/tomcat.tar.gz
Installation of BOSS2 is performed by extracting the BOSS2.war
file
into your Tomcat webapps
directory. You must then create a directory
for BOSS2 to store its resources and tests. The following template
should perform this on most Linux systems.
BOSS2.war
. Save
this as /tmp/BOSS2.war
.
/tmp/BOSS2.war
file world readable and
executable:
$ chmod a+rx /tmp/BOSS2.war
$ sudo su boss2 - # sudo authentication $ su boss2 - # su authentication
$ cd ~
webapps
directory. Replace
apache-tomcat-6.0.18
with your Tomcat directory:
$ ls -d apache-tomcat* apache-tomcat-6.0.18 $ cd apache-tomcat-6.0.18/webapps
$ unzip -d BOSS2 /tmp/BOSS2.war
$ ls -d BOSS2 BOSS2
$ cd ~
$ mkdir -p storage/testing storage/resource
$ exit
$ rm /tmp/BOSS2.war
To configure BOSS2, you must edit the
webapps/BOSS2/WEB-INF/web.xml
file to change the parameters for the BOSS2 servlet. The following
steps should perform this on most Linux systems.
$ sudo su boss2 - # sudo authentication $ su boss2 - # su authentication
$ cd ~
apache-tomcat-6.0.18
with your Tomcat directory:
$ ls -d apache-tomcat* apache-tomcat-6.0.18 $ cd apache-tomcat-6.0.18/webapps/BOSS2/WEB-INF
web.xml
file using your favourite editor.
$ exit
This specifies the MySQL database host. If you've been following the
instructions so far, this will be localhost
.
This specifies the MySQL database. If you've been following the instructions
so far, this will be boss2
.
This specifies the MySQL database username. If you've been following
the instructions so far, this will be boss2
.
This specifies the MySQL database password. If you've been following the instructions so far you will have noted this.
This specifies the resource directory. If you've been following the
instructions so far this will be
/home/boss2/storage/resource
.
This specifies the testing temporary directory. If you've been following
the instructions so far this will be
/home/boss2/storage/testing
.
When users upload submissions the security code is generated by hashing the files uploaded, appending a secret salt, and re-hashing the combination. Choose something long and unguessable for this option, and keep it a secret from students!
This sets the protocol that BOSS2 will communicate with the mail host
with. Any protocol supported by the javamail framework is supported.
The default and easiest option is smtp
.
This sets the email host that BOSS2 will use for sending mail.
This sets the username used for accessing the email host.
This sets the password used for accessing the email host.
This section describes some common maintenance tasks that a BOSS2 server administrator may need to perform.
Starting BOSS2 is a case of starting Tomcat. The following steps should do this on most Linux systems if you have followed the installation instructions thus far.
$ sudo su boss2 - # sudo authentication $ su boss2 - # su authentication
$ cd ~
apache-tomcat-6.0.18
with
your Tomcat directory, and note your JDK directory:
$ ls -d apache-tomcat* jdk* apache-tomcat-6.0.18 jdk1.6.0_10 $ cd apache-tomcat-6.0.18/bin
$ JAVA_HOME=/home/boss2/jvm1.6.0_10 sh startup.sh
$ exit
By default Tomcat, and therefore BOSS2, will be available on port 8080. The address to access would be:
http://localhost:8080/BOSS2/PageDispatcherServlet
Stopping BOSS2 is a case of stopping Tomcat. The following steps should do this on most Linux systems if you have followed the installation instructions thus far.
$ sudo su boss2 - # sudo authentication $ su boss2 - # su authentication
$ cd ~
apache-tomcat-6.0.18
with
your Tomcat directory, and note your JDK directory:
$ ls -d apache-tomcat* jdk* apache-tomcat-6.0.18 jdk1.6.0_10 $ cd apache-tomcat-6.0.18/bin
$ JAVA_HOME=/home/boss2/jvm1.6.0_10 sh shutdown.sh
$ exit
By default Tomcat, and therefore BOSS2, will be available on port 8080. The address to access would be:
http://localhost:8080/BOSS2/PageDispatcherServlet
Backing up and restoring the database and filestore involve getting an SQL dump of the database and backing up the resource directory and placing them back.
Before backup, you must stop the BOSS2 system as per section Stopping the BOSS2 System. The following template should perform backup on most Linux systems if you have followed the installation procedure above.
$ sudo su boss2 - # sudo authentication $ su boss2 - # su authentication
$ cd ~
$ mkdir backup
$ cd backup
$ mysqldump -u boss2 -p boss2 > boss2.sql $ gzip boss2.sql
$ mkdir resource
$ cp /home/boss2/storage/resource/* resource/
$ cd ..
$ tar cvzf backup.2008-08-17.tar.gz backup/
$ rm -r backup/
$ exit
Before restore, you must stop the BOSS2 system as per section Stopping the BOSS2 System. The following template should perform restoration on most Linux systems if you have followed the installation procedure above.
$ sudo su boss2 - # sudo authentication $ su boss2 - # su authentication
$ cd ~
$ ls backup.* backup.2008-08-17.tar.gz
$ tar xvzf backup.2008-08-17.tar.gz
$ cd backup
$ mysql -u boss2 -p boss2 < boss2.sql
$ rm /home/boss2/storage/resource/*
$ cp resource/* /home/boss2/storage/resource/
$ cd ..
$ rm -r backup/
$ exit
TBA