Monday, October 19, 2015

Mooshak – Installation on Ubuntu / Linux ( Fully Tested )

How to install Mooshak in Ubuntu / Linux

Mooshak is an online judge for managing programming contests on the Web/online.
It can be extended for new types of contests. Ya you can also customize mooshak for new programming languages.

But Mooshak installation is not that easy. There are so many problems with the installation of mooshak. So in this post I will try to go Step-by-Step to install mooshak on your system .

Note : This installation guide is for Ubuntu / linux platform works similar to Ubuntu only.

Step 1      :     Install Apache & TCL ( Requirements of Mooshak )

 

$ sudo su
$ sudo apt-get install apache2 apache2-suexec
$ sudo apt-get install tcl xsltproc lpr rsync gcc libxml2-utils

Step 2     :     Enable some modules of Apache.

 

$  a2enmod userdir
$  a2enmod suexec

If everything is okay skip to step 2 else if after command 2 ( $  a2enmod suexec ) you get something like this
ERROR: Config file suexec.conf not properly enabled: /etc/apache2/mods-enabled/suexec.conf is a real file, not touching it
then follow this :
Turns out files shouldn't be stored in mods-enabled, they should rather be stored in mods-available. A symlink should then be created in mods-enabled pointing to the file stored in mods-available.

1. First remove the original:

$ mv /etc/apache2/mods-enabled/
suexec.conf /etc/apache2/mods-available/

2. Then create the symbolic link:
$ ln -s /etc/apache2/mods-available/
suexec.conf /etc/apache2/mods-enabled/suexec.conf
 

Step 3     :     Download Mooshak : Click Here

 

Go to Directory where Mooshak is downloaded and extract it.

tar -xzvf mooshak-1.5.2.tgz
cd mooshak-1.5.2

Step 4     :     Copy Required files to required places

 

tar xvf source.tgz
cd lib/apache/
sudo cp 67* /etc/apache2/mods-enabled/userdir.conf
sudo cp 69* /etc/apache2/mods-enabled/suexec.conf
sudo cp /etc/apache2/mods-enabled/userdir.conf /etc/apache2/mods-available/userdir.conf
sudo cp /etc/apache2/mods-enabled/suexec.conf /etc/apache2/mods-available/suexec.conf

Step 5     :     Make some changes to your configuration file of apache, i.e., htttpd.conf

 

You need to add the following lines

Options +ExecCGI

Step 6     :     Edit the install script

 

Now you need to edit the install script. Now change the following line (line 151/153, probably)
set fd [ open "| lsof" ]
to
set fd [ open "| /usr/bin/lsof" ]

Step 7     :     Install

 

$ cd mooshak-1.5.2
$ sudo su
$ ./install --config-suexec
$ ./install

Step 8     :     Restart Apache Services

$ service apache2 restart


voila you are done.
Now either use http://127.0.0.1/~mooshak or localhost/~mooshak to run Mooshak


Step 9    :     Login

 

Choose any contest 

Default User : admin

Default Password : admin