Xymon with thttpd on Debian Linux
244 words, 2 minutes
Here’s a bunch of quick notes about installing Xymon on a Debian server using the tiny/turbo/throttling HTTP server. It is not that complicated but there are a few things to tweak to have it running.
Install the Web and Xymon server:
# apt-get install thttpd thttpd-util xymon
The “thttpd-util
” package contains “thtpasswd
” which is used to create a
password file to be used by thttpd.
Create the authentication file that will filter Xymon access:
# thtpasswd -c /var/lib/hobbit/www/.htpasswd admin
Adding password for admin.
New password:
Re-type new password:
# chown hobbit:hobbit /var/lib/hobbit/www/.htpasswd
# sudo chmod 0640 /var/lib/hobbit/www/.htpasswd
I am using several instances of thttpd on this particular server ; to run ultra-light Web applications. So I created an alternate thttpd configuration and start it without the init.d script:
# cp -p /etc/thttpd/thttpd.conf /etc/thttpd/xymon-thttpd.conf
# vi /etc/thttpd/xymon-thttpd.conf
(...)
port=8080
dir=/var/lib/hobbit/www
user=hobbit
cgipat=/hobbit-*cgi/*sh
globalpasswd
symlinks
(...)
# vi /etc/rc.local
/usr/sbin/thttpd -C /etc/thttpd/xymon-thttpd.conf -i /var/run/xymon-thttpd.pid
Now, the tricky part. Xymon has loads of resources installed allover the Debian file-system. It is probably nice for an application but it sucks when it comes to publishing it using chroot. What I did is copy the required resources inside the Web chroot:
# cd /var/lib/hobbit/www/
# for DIR in gifs help menu; do mv $DIR $DIR.orig && cp -pr /usr/share/hobbit/$DIR .; done
# cp -pr /usr/lib/hobbit/cgi-bin hobbit-cgi
# cp -pr /usr/lib/hobbit/cgi-secure hobbit-seccgi
You don’t have to copy the seccgi files if you don’t want on-line management.
That’s it! Nearly painless.