How to install Cacti on OpenSUSE 11.3

Cacti is an application that can display the state and network traffic on a network device. The main requirement for network devices can be read by the function of cacti, the SNMP functions on the devices should work well. Then how do I create a server monitoring with cacti?

To be able to display results from the cacti graphing, the cacti need a web server and mysql database.

I. Prepare web server and Database server

You can check or make sure webserver(apache) and database server (mysql) installed on your machine. on open suse 11 we can check apache with command:

# rpm -qa | grep apache2

apache2-mod_php5-5.3.2-1.31.i586
apache2-utils-2.2.15-3.7.i586
apache2-doc-2.2.15-3.7.noarch
apache2-mod_dnssd-0.6-7.1.i586
apache2-mod_python-3.3.1-151.1.i586
apache2-example-pages-2.2.15-3.7.i586
apache2-prefork-2.2.15-3.7.i586
apache2-2.2.15-3.7.i586
apache2-mod_perl-2.0.4-45.1.i586

if the package has not been installed on openSUSE 11.3 Linux yours, then please install it first.

and for check mysql on opensuse, this command :

# rpm -qa | grep mysql

libqt4-sql-mysql-4.6.3-1.3.i586
mysql-community-server-client-5.1.46-2.18.i586
php5-mysql-5.3.2-1.31.i586
libmysqlclient_r16-5.1.46-2.18.i586
libmysqlclient16-5.1.46-2.18.i586
mysql-community-server-5.1.46-2.18.i586

if the package has not been installed on openSUSE 11.3 Linux yours, then please install it first.

II. Prepare php-snmp module

# rpm -qa | grep snmp

php5-snmp-5.3.2-1.31.i586
libsnmp20-5.5-9.1.i586
net-snmp-devel-5.5-9.1.i586
snmp-mibs-5.5-9.1.i586
net-snmp-5.5-9.1.i586

if thepackage has not been installed on openSUSE 11.3 Linux yours, then please install it first, just type like this to install php5-snmp module:

# yast2 -i php5-snmp
# yast2 -i php5-sockets

III. Prepare rrdtool

# rpm -qa | grep rrdtool

rrdtool-1.4.3-2.22.i586

if the package has not been installed on openSUSE 11.3 Linux yours, then please install it first, just type like this to install rrdtool module:

# yast2 -i rrdtool

IV. Installing Cacti

#wget http://www.cacti.net/downloads/cacti-0.8.7b.tar.gz
#tar -xzvf cacti-0.8.7b.tar.gz
#mv cacti-0.8.7b /srv/www/htdocs/cacti
#cd cacti-0.8.7b
#groupadd cacti
#useradd -g cacti cactiuser
#passwd cactiuser

#mysqladmin -u root -p create cacti
#mysql -u root -p cacti < cacti.sql
#mysql -p
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY ‘cactipassword’;
mysql> flush privileges;
mysql> quit

#vi include/config.php

–change this point–

$database_type = “mysql”;
$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “cactiuser”;
$database_password = “cactipassword”;
$database_port = “3306″;

#chown -R cactiuser rra/ log/

#crontab -e

–add this point–

*/1 * * * * /usr/bin/php /srv/www/htdocs/cacti/poller.php > /dev/null 2>&1

# vi /etc/snmp/snmpd.conf

–change like this point–

syslocation Server Room
syscontact Sysadmin (root@localhost)
disk /
rocommunity public 127.0.0.1
rocommunity corporate 10.10.10.1 #your server for snmp

–End–

And for check snmp activity with this command :

# snmpwalk -c public -v1 localhost system
# snmpwalk -c corporate -v1 corporate

Publish on October 18th, 2011 under OpenSUSE by udiniq | No Comments »

Berikan Komentar Anda

= 2+4 (Wajib dijumlahkan)