Install ServerStats on Debian
This tutorial will quickly explain how to install and set up ServerStats (http://hostingfu.com/article/server-monitoring-cacti-serverstats) on your server. This will set ServerStats to run on port 9087. Make sure port 9087 is open in your firewall, or adjust the port below to match the port you chose and opened in your firewall. This tutorial MUST be executed as the root user.
Let’s install the dependencies needed to get the script working.
apt-get install libpcre3 libpcre3-dev xinetd build-essential -y
Once this finishes running, it’s time to download the source code of the script and install it on your server, you can do this by running the following steps:
cd /usr/src
wget http://hostingfu.com/files/serverstats/serverstats-0.1.tgz
tar -xf server*
cd server*
make && make install
Once this finishes running (which should only be a few seconds, since it’s one file), it’s time to complete the configuration. This can be done with the following steps:
cd /etc/xinetd.d
echo “service serverstats” > serverstats
echo “{” >> serverstats
echo ” type = UNLISTED” >> serverstats
echo ” socket_type = stream” >> serverstats
echo ” wait = no” >> serverstats
echo ” user = nobody” >> serverstats
echo ” server = /usr/local/bin/serverstats” >> serverstats
echo ” port = 9087″ >> serverstats
echo ” disable = no” >> serverstats
echo “}” >> serverstats
Once this finishes running, all that is left to be done is restart xinetd, and you are set, which can be done by running:
/etc/init.d/xinetd restart
We also have created a shell script to do this for you automatically, available here.
Comments
Leave a Reply


