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
$ 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 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
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
$ 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
This comment has been removed by the author.
ReplyDeleteI was trying to install Mooshak using instructions given. When I executed
ReplyDelete./install --config-suexec
[Mon Apr 30 13:04:37.010576 2018] [core:warn] [pid 21463] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Mon Apr 30 13:04:37.010630 2018] [core:warn] [pid 21463] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Mon Apr 30 13:04:37.010641 2018] [core:warn] [pid 21463] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Mon Apr 30 13:04:37.010643 2018] [core:warn] [pid 21463] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Mon Apr 30 13:04:37.010651 2018] [core:warn] [pid 21463] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Mon Apr 30 13:04:37.012940 2018] [core:warn] [pid 21463] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Mon Apr 30 13:04:37.013033 2018] [core:warn] [pid 21463] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Mon Apr 30 13:04:37.013039 2018] [core:warn] [pid 21463] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf:
Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}
while executing
"exec apache2 -V "
(procedure "enable_suexec" line 28)
invoked from within
"$action"
(procedure "process" line 39)
invoked from within
"process"
invoked from within
"if { [ string compare [ exec whoami ] root ] == 0 } {
process
exit 0
} else {
puts stderr "You have to be root to install Mooshak"
exi..."
(file "./install" line 741)
Though I am installing using root user.
Then I executed ./install
and I get this:
Prerequisites Ok. Installing Mooshak on ubuntu, Apache 2.4
User mooshak exists already:
specify a diferent user with --user
remove mooshak first using --uninstall
or just update code using --update
I restarted apache2 and now when I run "http://localhost:8000/~mooshak-1.5.2" in my browser, it says "The requested URL /~mooshak-1.5.2 was not found on this server". My mooshak-1.5.2 is located at /home/user1/. Document root for apache2 is set at /var/www/html/. All other files are running properly on HTML. May I seek your help to fix the issue.
Great post! I recently started a new blog aimed at helping people improve their learning activity in mobile technology, and will try utilize some of your tips. I hadn’t thought about a couple approaches that you suggested here.
ReplyDeleteipod service center in Chennai | Authorized ipod service center in Chennai | ipad service center in chennai | ipod service center in chennai | ipad service center in chennai | apple service center in chennai | iphone unlocking service | Laptop service center in chennai