As this box will be used for hosting websites i install Virtualmin GPL. It is a Webmin module for managing multiple virtual hosts through a single interface, Similar to Plesk or Cpanel. It supports the creation and management of Apache virtual hosts, BIND DNS domains, MySQL databases, and mailboxes and aliases with Sendmail or Postfix. It makes use of the existing Webmin modules for these servers, and so should work with any existing system configuration, rather than needing it's own mail server, web server and so on.
As we have webmin installed this is easy to install just follow the instructions found here Installing Virtualmin and don't forget the Virtualmin framed theme.
Once that's done login to webmin and check for any error messages and do what they say, once its all working you are now setup to host multiple websites with ease.
Now that is all done i wanna setup Munin so i can monitor the server. Munin is a networked resource monitoring tool that can help analyse resource trends and "what just happened to kill our performance?" problems. It is designed to be plug and play. A default installation provides a lot of graphs with almost no work.
Depending on what repositories you use (i mainly use remi and el5) you maybe able to use yum to install.
yum install munin-node munin
if not grab the source and follow the instructions here.
Once installed you need to change a few settings to your liking, the config files are found in "/etc/munin". Munin has a master/node architecture in which the master connects to all the nodes at regular intervals and asks them for data this is very useful when you got more than server.
Ok basic settings need to setup the master, edit "/etc/munin/munin.conf"
# The next three variables specifies where the location of the RRD
# databases, the HTML output, and the logs, severally. They all
# must be writable by the user running munin-cron.
dbdir /var/lib/munin #RRD databases
htmldir /var/www/munin #HTML output (change to whatever your website uses)
logdir /var/log/munin #log files
rundir /var/run/munin
# Where to look for the HTML templates
tmpldir /etc/munin/templates
# a simple host tree
[localhost]
address 127.0.0.1
use_node_name yesnow basic settings for the node, edit "/etc/munin/munin-node.conf"
log_level 4 log_file /var/log/munin/munin-node.log pid_file /var/run/munin/munin-node.pid background 1 setseid 1 user root group root setsid yes # Regexps for files to ignore ignore_file ~$ ignore_file \.bak$ ignore_file %$ ignore_file \.dpkg-(tmp|new|old|dist)$ ignore_file \.rpm(save|new)$ ignore_file \.pod$ # A list of addresses that are allowed to connect. This must be a # regular expression, due to brain damage in Net::Server, which # doesn't understand CIDR-style network notation. You may repeat # the allow line as many times as you'd like allow ^127\.0\.0\.1$ allow ^192\.168\.0\.200$ # Which address to bind to; host * # And which port port 4949
Now restart munin-node so it can use the changes you made
/etc/init.d/munin-node restart
Now wait 10 minutes so it can generate some data then visit the webpage to see the results, i store mine in a directory just outside the webserver directory and use "Document directory aliases" in apache so its only available on my domain and not anywhere else.
so visit "htxp://192.168.0.200/munin/" (change to your setting) and you should see something similar to this
Now click on one of the names, I'll pick "system"
You should see some graphs like this (obviously yours won't be all the way across yet)
If you don't see any graphs check the log files for any errors, there should be 5 different log file,
first check "/var/log/munin/munin-node.log" and fix any errors.
Once its all working you now have graphs monitoring your server, there is loads of extra plugins you can add to munin depending what you want to monitor.
in the next blog I'll talk about ipv6 and setting up a tunnel if you don't have native ipv6.
- paul's blog
- Add new comment
- 535 reads


Recent comments
5 days 4 hours ago
1 week 1 day ago
21 weeks 3 days ago
21 weeks 3 days ago