Installing Mooshak on Ubuntu (finally)
By reading the older posts under this topic, you must've realized that I'm a total n00b at linux :P. But this n00b finally figured out the way to get Mooshak running over his Ubuntu...
Messing around with Artur's tutorial didn't help. Playing around with Mooshak-1.5a4 didn't help. What helped was setting up cgi-bin the Apache way and giving permissions to files under /home/mooshak . Thanks to myprasanna for some insights.
So, here's how you can too go about getting mooshak up over Ubuntu Desktop Edition -
- Install Apache2 and get it up and running, read this or just paste this into your terminal -
$ sudo apt-get install apache2 apache2-suexec
- There are some Apache mods you need to enable -
# a2enmod userdir
# a2enmod suexec
- Configurations for suexec and userdir are available in mooshak-version/source/lib/apache/ , extract the source.tgz file to get it.
$ cd mooshak-version
$ tar xvf source.tgz
$ cd source/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
- Configure your httpd.conf, just hit your favorite editor under su, add these -
<directory /home/*/cgi-bin>The last line is just to test cgi scripts. Get to your home folder, make a path - /home/
AddHandler cgi-script cgi pl
Get into it and write a small hello.pl to test -
#!/usr/bin/perlDo a chmod of 755 over it. and test it - http://127.0.0.1/~mooshak/cgi-bin/hello.pl , You should have a Hello World! in your browser by now.
# hello.pl -- my first perl script!
print "Content-type: text/html\n\n";
print "Hello, world!\n";
- The Requirements - get these to setup the base for mooshak
$ sudo apt-get install tcl xsltproc lpr rsync gcc libxml2-utils
- Get a stable copy of Mooshak, in my case I tried 1.4.3
- Edit the install script
Line 148 of the 'install' script becomes -
set fd [ open "| /usr/bin/lsof" ]
set fd [ open "| /usr/sbin/lsof" ]
- Extract you tarball and run the install script -
$ tar xzf mooshak-*.tgz
$ cd mooshak-*
# ./install --config-suexec
- Now wait for a few seconds till it finishes. On Ubuntu 8.10 this won't give you any errors at all if you're using the 1.4.3 version
- Smile :D
Anything I missed, forgot to explain, do let me know. The system works fine, apart from tcl warnings on Balloons and Pending sections of judge's view.
Also, visit these links for more informantion -