Install Cacti on openSUSE 13.2
Abstract: systemctl enable mysql.service Install CactiImport the default database to the cacti database. mysql cacti < /srv/www/cacti/cacti.sql -u root -p Edit
Cacti is an open source web-based network monitoring tool designed as the front end application for the RRDtool (Round-Robin database tool), it allows a user to poll the services at an interval of time and resulting in the graph format. Cacti is generally used to get a graph data for the cpu and network bandwidth utilization, it monitors the network traffic by polling a router or switch via snmp.
Here is the small tutorial about installing Cacti on openSUSE 13.2
Install Cacti:Install MySQL or MariaDB and other tools.
zypper install apache2 php5 php5-mysql php5-snmp mysql-community-server mysql-community-server-client net-snmp rrdtool
Install Cacti and PHP extension.
zypper install cacti cacti-spine php5-xmlrpc php5-sockets php5-ldap php5-gd apache2-mod_php5
Start the following services.
systemctl start apache2.service systemctl start snmpd.service systemctl start mysql.serviceDatabase:
Create a database for Cacti, if you are configuring the MySQL for the first time; take a look at how to secure the MySQL.
mysql -u root -p Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 12 Server version: 5.6.17 openSUSE package Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
Create Cacti database.
create database cacti;
Grant permission to the newly created database.
GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactipassword'; flush privileges;
Configure Cacti:
Import the default database to the cacti database.
mysql cacti < /srv/www/cacti/cacti.sql -u root -p
Edit the config file to specify the database type, name, hostname, user and password information.
vi /srv/www/cacti/include/config.php
Make the changes accordingly.
/* make sure these values reflect your actual database/host/user/password */ $database_type = "mysql"; $database_default = "cacti"; $database_hostname = "localhost"; $database_username = "cactiuser"; $database_password = "cactipassword"; $database_port = "3306"; $database_ssl = false;
Change the permission of directory.
chown -R wwwrun:www /srv/www/cacti
Add the following entry in the crontab to poll every five min.
*/5 * * * * cacti php /srv/www/cacti/poller.php > /dev/null 2>&1
If you want Cacti to the default server, edit the file /etc/sysconfig/apache2
# vi /etc/sysconfig/
Add CACTI as a server flag.
APACHE_SERVER_FLAGS="CACTI"
Edit apache configuration file to perform the remote installation. In apache 2.4, authorization is handled by mod_authz.
vi /etc/apache2/conf.d/cacti.conf
Remove first directory stanza,
<Directory /srv/www/cacti/> Options None order deny,allow deny from all allow from localhost </Directory>
Place the following stanza.
<Directory /srv/www/cacti/> <IfModule mod_authz_core.c> # httpd 2.4 Require all granted </IfModule> <IfModule !mod_authz_core.c> # httpd 2.2 Order deny,allow Allow from all </IfModule> </Directory>
Restart the services.
systemctl restart apache2.service systemctl restart snmpd.service systemctl restart mysql.service
Enable services to start at system start-up.
systemctl enable apache2.service systemctl enable snmpd.service systemctl enable mysql.serviceInstall Cacti:
Visit the following url to start the installation of cacti. http://your-ip-address/cacti. Click on Next to continue.
openSUSE 13.2 – Cacti Installation Main PageScroll down for the options, please select New Install for the new installation and then click Next.
openSUSE 13.2 – Cacti Installation TypeIt will show you, if there is any package is missing which is mandatory for the cacti.
openSUSE 13.2 – Cacti Installation Package ListEnter User Name and Password (Default admin / admin).
openSUSE 13.2 – Cacti Installation User LoginYou must change the default password.
openSUSE 13.2 – Cacti Installation Change PasswordThe following shows the dashboard of the cacti.
openSUSE 13.2 – Cacti ConsoleNow you can start configuring the Cacti to monitor your devices. More documentation can be found here. We welcome your comments, please post your valuable comments below.