Debian Sarge and Cacti

As my network at home has got busier, I�ve been finding weird things are going on and so have needed to implement a degree of monitoring on my network (if only to keep tabs on where all my hard drive space is going), I looked at a number of possibilities but have settled on SNMP monitoring via �Cacti�, running on a Debian 3.1 �Sarge� linux server�

The Debian SNMP Process

Install Debian via Net Install CDs

  1. Boot from the CD
  2. Choose:
    • Language
    • Region
    • Keyboard Layout

    [ Hardware Detection Phase ]

  3. Enter a hostname
  4. Prepare Disks
    • Erase All / Auto Partition
    • All Files in one Partition
    • Write Changes

    [ Creates Partitions / Writes File System ]

  5. Install GRUB boot loader
  6. [Reboot]
  7. [ System Reboots ]

Initial Configuration

  1. Set time to GMT? No
  2. Set Timezone Pacific/Auckland
  3. Set Root Password [Your Password Here]
  4. Create User Account(s) [Your Username & Password here]
  5. Archive access Method [FTP]
    • Select Mirror Country
    • Select Mirror Site

    [ Downloads Key System Files ]

  6. Select Packages [Select None]
  7. [ Downloads System Updates & Core Packages]

  8. Configuring Exim v4 (Mail)
    • No configuration at this time
    • (Notice that you can configure mail later by using dpkg-reconfigure exim-config as root
  9. Root & postmaster mail recipient [Your Username Here]
  10. Configuration Complete
  11. [ Login Prompt ]

Set Static IP Address

  1. Login
  2. Switch to �su� (root)
  3. Update apt resources
  4. Install �vim� (text editor)
  5. apt-get update
    apt-get install vim

  6. Edit network interface file
  7. vim /etc/network/interfaces

  8. Change the line:
  9. iface eth0 inet dhcp
    iface eth0 inet static
    address [a valid IP address] (e.g.
    netmask [your netmask] (e.g.
    network [your network] (e.g.
    broadcast [your network] (e.g.
    gateway [your gateway] (e.g.
    and save/exit the file ( :wq )

  10. Apply the configuration type:
  11. /etc/init.d/networking restart
    reboot the system with shutdown -r now

Install �Cacti� [ ]

Auto magic method (from )

  1. As ‘su’ (root) aptitude install cacti
  2. (takes a while – will install apache, php4, mysql – and ask you some questions – just default on all of them. when it asks you about names and passwds, use ‘cacti’ for everything.)

    (also, the message about “libphp-adodb isn’t longer installed in /usr/lib/adodb. etc.” doesn’t seem to be valid – so for now, ignore it.)

  3. adduser cacti
  4. mysqladmin --user=root create cacti
  5. mysql -u root -e "grant all privileges on cacti.* to cacti@localhost identified by 'cacti'; flush privileges;"
  6. zcat /usr/share/doc/cacti/cacti.sql.gz | mysql -u cacti --password=cacti cacti
  7. echo "" >> /etc/php4/apache/php.ini
  8. /etc/init.d/apache restart
  9. (not sure if you actually have to do this step, but it won’t hurt.)

  10. goto http://localhost/cacti
  11. click on okay for everything until you get to the main page.
  12. click on the “graphs” tab.
  13. you will see some broken looking stuff.
  14. wait for 10 whole minutes, hit refresh and you will see nice graphs.

Once again Google is my friend, and the details contained herein can be found elsewhere, links and attributations have been made where possible so don’t be suprised if you read the same stuff here as you’ve seen in a related forum somewhere else on the net.



, ,