Tag Archives: Linux

Cacti, SNMP and Gentoo

Here are the instructions I followed to get SNMP and Cacti working on Gentoo:

emerge cacti cacti-cactid
groupadd cacti
useradd -g cacti -G cron cactiuser

cd /var/www/localhost/htdocs/cacti/
mysql –user=root cacti < cacti.sql
chown -R cactiuser rra/ log/
mysql
mysql> create database cactidb;
mysql> grant all on cactidb.* to root;
mysql> grant all on cactidb.* to root@localhost;
mysql> grant all on cactidb.* to cactiuser;
mysql> grant all on cactidb.* to cactiuser@localhost;
mysql> set password for cactiuser@localhost=password(‘mycactipw’);
mysql> exit

nano config.php

$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "mycactipw";

Now open browser to http://localhost/cacti

Follow the steps:

Login as admin password admin
change password

Continue reading

Posted in Computers | Tagged , , , | 2 Comments

Gentoo nano and word wrap

Well I said in my initial Gentoo post that I would detail how to make Nano the text editor default to non-word wrap mode so you don’t have to specify the -w option everytime to edit a file.

You need to make sure you have a .nanorc file in your home directory. If you don’t there should be one in /etc/ (/etc/nanorc). So copy that one:

cp /etc/nanorc ~/.nanorc

Now edit the file

 nano -w ~/.nanorc

I uncommented the following options:

  • set autoindent
  • set mouse
  • set nowrap
  • set smarthome
  • set smooth

I also inserted some syntax based colouring options (I think I found most of them either in nanorc or forums.gentoo.org)

Edited: If you want to look at the syntax colouring download the nanorc file attached to this blog entry. It’s easier to read anyway.

Hooray for nano! 

Continue reading

Posted in Computers | Tagged , | Comments Off on Gentoo nano and word wrap