How to install Mooshak Online Judge in Ubuntu or Linux (2017 updated)

, , Leave a comment

[toc]

Mooshak – Online Judge Installation on Ubuntu / Linux (Tested)

What is Mooshak?

Mooshak is an online judge platform. It is used to manage and create programming contests. We can extend it for new types of contests. You can also customize mooshak for new programming languages. You can face many problems with the installation of mooshak. So, in this post I will go Step-by-Step on how to install mooshak on your system .

Note : This installation guide is for Ubuntu / linux platform.

 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 you don’t see any error after this step then Go to STEP 3 below.
If after executing ( a2enmod suexec ), you might get the following error:

ERROR: Config file suexec.conf is not enabled. /etc/apache2/mods-enabled/suexec.conf is a real file, not touching it

Then follow these steps :
We will store them in mods-available instead of mods-enabled. Then, create a symlink in mods-enabled that will point to the file stored in mods-available.
1. First of all remove the original:

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

2. After that create the symbolic link:

ln -s /etc/apache2/mods-available/suexec.conf /etc/apache2/mods-enabled/suexec.conf

 Step 3 : Download Mooshak : Click Here to Download

http://mooshak.dcc.fc.up.pt/download/mooshak-1.5.2.tgz
Now, go to Directory where we have downloaded Mooshak  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 the following changes to your config file of apache, i.e., htttpd.conf ( or apache2.conf )

Your apache file will be in /etc/apache2 directory with name httpd.conf or apache2.conf. Open your apache config file and add the following lines.

<directory /home/*/cgi-bin>
Options +ExecCGI
</directory>

Step 6 :  Edit the install script

Change the following line (line 151 or line 153)

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 this is it.

Either use http://127.0.0.1/~mooshak or localhost/~mooshak to run Mooshak

Step 9 :  Login to Mooshak

Choose any contest 

Default Username of Mooshak : admin
Default Password of Mooshak : admin

Mooshak online judge
Mooshak online judge

This is how we can install mooshak on Linux or Ubuntu platform.

 

Leave a Reply