Installing Cacti v0.8.7 and Spine v0.8.7 on CentOS 5.1
Howto install Cacti on a CentOS v5.1 VM
"Cacti is a complete network graphing solution designed to harness the power of RRDTool's data storage and graphing functionality. Cacti provides a fast poller, advanced graph templating, multiple data acquisition methods, and user management features out of the box. All of this is wrapped in an intuitive, easy to use interface that makes sense for LAN-sized installations up to complex networks with hundreds of devices."
Standard prerequisites from a minimal CentOS 5.1 installation:
# yum update # yum install postfix vixie-cron crontabs screen mlocate man which logrotate
For CentOS 5, Cacti is available from the EPEL repostory and the DAG repository. The Cacti Spine package is only available from the DAG repostory. So that a consistent install is achieved, we don't install the EPEL repository.
# rpm -Uhv http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
# yum install cacti cacti-spine mysql-server net-snmp-utils
Since the database is only required by local processes, ensure it only listens on the loopback interface in '/etc/my.cnf':
[mysqld] bind-address = localhost
Enable and start services (Note: Cacti runs with apache httpd out of the box).
# for A in httpd mysqld ; do chkconfig $A on ; service $A start ; done
# mysqladmin create cacti # mysql mysql> GRANT USAGE ON *.* TO 'cactiuser'@'localhost' IDENTIFIED BY 'cactiuser'; mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, LOCK TABLES, ALTER ON cacti.* TO 'cactiuser'@'localhost'; mysql> flush privileges; # mysql cacti -u cactiuser -pcactiuser < /var/www/cacti/cacti.sql
The default configuration values are in '/usr/share/cacti/include/config.php' (change username cactiuser, password cactiuser to the values above), and for Spine in '/etc/spine.conf'.
Change the pooler to 'spine' (on the poller settings tab) and set the path to spine (on the paths tab).
Browse to http://cacti.lucidsolutions.co.nz/cacti. The default username 'admin', password 'admin'.
Links
Appendices
Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: cacti noarch 0.8.7b-2.el5.rf rpmforge 2.0 M cacti-spine x86_64 0.8.7a-1.el5.rf rpmforge 62 k mysql-server x86_64 5.0.22-2.2.el5_1.1 updates 10 M net-snmp-utils x86_64 1:5.3.1-19.el5_1.4 updates 181 k Installing for dependencies: apr x86_64 1.2.7-11 base 118 k apr-util x86_64 1.2.7-6 base 73 k aspell x86_64 12:0.60.3-7.1 base 946 k aspell-en x86_64 50:6.0-2.1 base 1.6 M curl x86_64 7.15.5-2.el5 base 229 k freetype x86_64 2.2.1-19.el5 base 312 k gmp x86_64 4.1.4-10.el5 base 201 k httpd x86_64 2.2.3-11.el5_1.centos.3 updates 1.1 M libart_lgpl x86_64 2.3.17-4 base 75 k libidn x86_64 0.6.5-1.1 base 195 k libpng x86_64 2:1.2.10-7.1.el5_0.1 updates 235 k lm_sensors x86_64 2.10.0-3.1 base 504 k mailcap noarch 2.1.23-1.fc6 base 14 k mysql x86_64 5.0.22-2.2.el5_1.1 updates 3.0 M net-snmp x86_64 1:5.3.1-19.el5_1.4 updates 706 k net-snmp-libs x86_64 1:5.3.1-19.el5_1.4 updates 1.2 M perl-DBD-MySQL x86_64 3.0007-1.fc6 base 147 k perl-DBI x86_64 1.602-1.el5.rf rpmforge 861 k perl-Net-Daemon noarch 0.43-1.el5.rf rpmforge 44 k perl-PlRPC noarch 0.2020-1.el5.rf rpmforge 33 k perl-rrdtool x86_64 1.2.23-1.el5.rf rpmforge 51 k php x86_64 5.1.6-15.el5 base 1.2 M php-cli x86_64 5.1.6-15.el5 base 2.3 M php-common x86_64 5.1.6-15.el5 base 139 k php-mysql x86_64 5.1.6-15.el5 base 86 k php-pdo x86_64 5.1.6-15.el5 base 62 k php-snmp x86_64 5.1.6-15.el5 base 27 k postgresql-libs x86_64 8.1.11-1.el5_1.1 updates 195 k rrdtool x86_64 1.2.23-1.el5.rf rpmforge 950 k Transaction Summary ============================================================================= Install 33 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 29 M Is this ok [y/N]: y
[2] Apache httpd configuration for cacti, '/etc/chttpd/conf.d/cacti.conf'. Edit the configuration to allow access from the local LAN only.
Alias /cacti/ /var/www/cacti/ <Directory /var/www/cacti/> DirectoryIndex index.php Options -Indexes AllowOverride all order deny,allow deny from all allow from 127.0.0.1 allow from 192.168.0.0/24 AddType application/x-httpd-php .php php_flag magic_quotes_gpc on php_flag track_vars on </Directory>
[3] Cacti first time installation (http://cacti.lucidsolutions.co.nz/cacti/install/)