Category Archives: Debian

Install Cacti on Debian Squeeze

Not too hard to get started. Once you have SNMPD installed and working just run:

apt-get install cacti

When that is complete you will have to modify the Apache config.

Add the follwing to "/etc/apache2/sites-available/default" between the VirtualHost tags:

Alias /cacti/ "/usr/share/cacti/site/"
<Directory "/usr/share/cacti/site/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Then restart Apache:

invoke-rc.d apache2 restart

Use the url http://hostname/cacti and log in with the username admin and password admin. You will be asked to change the password and then you're in!

sources

Shut down Debian Linux machine cleanly

There are several ways to shut down  DebianLinux machine cleanly, with the most simple probably being from the GUI environment you are using.

For the GNOME desktop enviornment there is the option to shutdown the machine which is immediately available when you click "Logout". Choosing this should log you out of the desktop and also shut the machine down.

From the console, either a remote SSH session,Telnet or from in front of the machine you also have access to the following commands:

shutdown

poweroff

The second command will take no arguments and immediately begin shutting down the machine, simply run as root :

poweroff

If your machine supports "poweroff" then it will be shutdown and the power turned off, this usually requires that you've setup power management – this can be as simple as running:

modprobe apm

or it might be more complex.

The shutdown command is more configurable, it allows you to specify whether you wish to reboot or shutdown, and will also allow you to schedule the action for later. Generally the usage is:

shutdown -r now

Here "-r" means to reboot, and "now" is the time to carry that activity out. If you wished to shutdown your machine at 8pm you could instead run:

shutdown 20:00

This will pause until 8pm and then shutdown – pressing Ctrl + C will cancel the shutdown, as will running another copy of shutdown with the "cancel" flag:

shutdown -c

Debian machines are typically setup so that if you press the three-fingered-salute "Ctrl + Alt + Delete" they will reboot. This is specified by the following line in the file "/etc/inittab".

# when CTRL-ALT-DEL is pressed.

ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

sources