20Aug, 2018

cacti on centos7

yum -y install epel-release

yum install httpd httpd-devel -y #1.Install Apache

vi /etc/yum.repos.d/mariadb.repo #2.Install MySQL (mariadb 10)
# mariadb.repo 10.1.12
name=mariadb repo

yum install mariadb-server mariadb-client -y
systemctl start mariadb

yum install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-pdo -y #3.Install PHP

#—cau hinh date/time.zone

yum install php-snmp -y #4.Install PHP-SNMP

yum install net-snmp-utils net-snmp-libs -y #5.Install NET-SNMP

yum install rrdtool -y #6.Install RRDTool

systemctl start httpd # #7.Staring Apache, MySQL and SNMP Services
systemctl start mariadb
systemctl start snmpd

systemctl enable httpd #8.Configure System Start-up Links
systemctl enable mariadb
systemctl enable snmpd

yum -y install cacti #9.Install Cacti on RHEL / CentOS / Fedora

mysqladmin -u root password indian@123 #10.Configuring MySQL Server for Cacti Installation

mysql -u root -p #*Create MySQL Cacti Database
create database cacti;
GRANT ALL on cacti.* to cacti@localhost IDENTIFIED BY ‘indian@123’;

GRANT ALL ON cacti.* TO ‘cacti’@’localhost’;
GRANT SELECT ON mysql.time_zone_name TO cacti@localhost IDENTIFIED BY ‘indian@123′;
FLUSH privileges;

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql

rpm -ql cacti | grep cacti.sql #10.Install Cacti Tables to MySQL


mysql -u cacti -p cacti < /usr/share/doc/cacti-1.1.19/cacti.sql

#Pass : cactipass

vi /etc/cacti/db.php #11.Configure MySQL settings for Cacti

#* make sure these values reflect your actual database/host/user/password */
$database_type = “mysql”;
$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “cacti”;
$database_password = “indian@123”;
$database_port = “3306”;
$database_ssl = false;

#12.Configuring Firewall for Cacti

firewall-cmd –permanent –zone=public –add-service=http

#13.Configuring Apache Server for Cacti Installation

vi /etc/httpd/conf.d/cacti.conf
Alias /cacti /usr/share/cacti
<Directory /usr/share/cacti/>
<IfModule mod_authz_core.c>
# httpd 2.4
Require all granted
<IfModule !mod_authz_core.c>
# httpd 2.2
Order deny,allow
Deny from all
Allow from all

#14. Install Spine

#14.Setting Cron for Cacti UNcomment has

vi /etc/cron.d/cacti
*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1


vi /etc/my.cnf  #  ADD LINE last the file

collation-server = utf8_general_ci
init-connect=’SET NAMES utf8’
character-set-server = utf8
max_heap_table_size = 128M
max_allowed_packet = 16777216
tmp_table_size = 64M
join_buffer_size = 64M
innodb_file_per_table = on
innodb_buffer_pool_size = 512M
innodb_doublewrite = off
innodb_additional_mem_pool_size = 80M
innodb_lock_wait_timeout = 50
innodb_flush_log_at_trx_commit = 2
innodb_flush_log_at_timeout = 3
innodb_read_io_threads = 32
innodb_write_io_threads = 16

#15.Running Cacti Installer Setup

This site is using SEO Baclinks plugin created by Locco.Ro

Leave a Reply

Copyright © 2018 | digivoice.in. All rights reserved.