Do the following steps to prepare your Dedicated or cloud server for Cacti monitoring software:
Required software(s)
You need to install the following software on RHEL / Fedora / CentOS Linux:
MySQL Server : Store cacti data.
NET-SNMP server - SNMP (Simple Network Management Protocol) is a protocol used for network management.
PHP with net-snmp module - Access SNMP data using PHP.
Apache / lighttpd / ngnix webserver : Web server to display graphs created with PHP and RRDTOOL.
Install the software
First, login as root user and type the following command to install mysql, apache and php:
# yum install mysql-server mysql php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-snmp php-pear-Net-SMTP php-mysql httpd
After installation Start MySQL service
service mysqld start
Configure MySQL server
First, set root password:
# mysqladmin -u root password 'NEWPASSWORD'
example - # mysqladmin -u root password 'what ever pw'
Create cacti MySQL database
Create a database called cacti, enter:
# mysql -u root -p -e 'create database cacti'
then you will be prompted to enter the pw you just put in
Create a user called cacti with a password called zYn95ph43zYtq, enter:
# mysql -u root -p
mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'zYn95ph43zYtq';
mysql> FLUSH privileges;
mysql> \q
example
 
[root@tangj-cacti-41 ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.1.61 Source distribution
Copyright (c) 2000, 2011, 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> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'zYn95ph43zYtq';
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> \q
Bye
 
Install snmpd
Type the following command to install net-snmpd
# yum install net-snmp-utils php-snmp net-snmp-libs
Configure snmpd, open /etc/snmp/snmpd.conf
# vi /etc/snmp/snmpd.conf

Leave a Reply

Your email address will not be published. Required fields are marked *