Cara Install Cacti di Centos 8

 

Cara Install Cacti di Centos 8

Assalamu’alaikum Warahmatullahi Wabarakatuh, Selamat pagi sobat blogger sekalian, apa kabar semuanya... Pada kesempatan kali ini saya akan share bagaimana Cara Install Cacti di Centos 8 dan bagaimana cara konfigurasinya.

Cacti menggunakan RRDtool sebagai penyimpanan data dan pembuatan grafik. dan untuk memonitor lalu lintas pada jaringan menggunakan protokol SNMP.  Dengan cacti, sobat dapat melihat cpu usage, memory yang dipakai untuk proses, pengelola user, perolehan multiple data dll.

Pada tutorial kali ini, sobat akan belajar cara menginstal dan mengkonfigurasi Cacti di Centos 8. Pertama-tama pastikan pada konfigurasi SELinux dalam settingan disabled. sebelum installasi Cacti ada beberapa aplikasi tambahan yang akan kita install seperti Httpd, PHP dan Database Mariadb. ikuti step by step cara installasinya.

Note : Disable SELinux
[root@cacti ~]# getenforce
Disabled

Step 1 - Install Httpd

Jalankan perintah berikut untuk install Httpd
[root@cacti ~]# dnf install -y httpd
Jalankan service Httpd
[root@cacti ~]# systemctl start httpd
[root@cacti ~]# systemctl enable httpd
[root@cacti ~]# systemctl status httpd
Tambahkan service Httpd di Firewalld
[root@cacti ~]# firewall-cmd --add-service=http --permanent
[root@cacti ~]# firewall-cmd --reload

Step 2- Install PHP 7.4

Jalankan perintah berikut untuk Installasi PHP versi 7.4
[root@cacti ~]# dnf install epel-release -y
[root@cacti ~]# dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm -y
[root@cacti ~]# dnf module list php
[root@cacti ~]# dnf module enable php:remi-7.4
[root@cacti ~]# dnf install php php-cli php-common php-pdo php-pecl-zip php-json php-mbstring php-mysqlnd php-json php-mbstring
Enable service PHP 
[root@cacti ~]# systemctl start php-fpm
[root@cacti ~]# systemctl enable php-fpm
[root@cacti ~]# systemctl status php-fpm

Step 3 - Install mariadb-server

Jalankan perintah berikut untuk Installasi Database MariaDB
[root@cacti ~]# dnf install -y mariadb-server
Enable service Database MariaDB
[root@cacti ~]# systemctl start mariadb
[root@cacti ~]# systemctl enable mariadb
[root@cacti ~]# systemctl status mariadb
Jalankan perintah Mysql secure Installation untuk membuat password database
[root@cacti ~]# mysql_secure_installation

Step 4 - Install Cacti & SNMP

Jalankan perintah berikut untuk Installasi Cacti dan Snmp
[root@cacti ~]# dnf install -y cacti net-snmp net-snmp-utils php-mysqlnd php-snmp php-bcmath rrdtool
Enable service SNMP
[root@cacti ~]# systemctl start snmpd
[root@cacti ~]# systemctl enable snmpd
Tambahkan service snmp di Firewalld
[root@cacti ~]# firewall-cmd --add-service=snmp --permanent 
[root@cacti ~]# firewall-cmd --reload


Step 5 - Konfigurasi SNMP

Sebelum kita mengkonfigurasi Snmp ada baiknya kita backup dahulu file default setting Snmp
[root@cacti ~]# cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.ori
Edit File snmp.conf
[root@cacti ~]# vi /etc/snmp/snmpd.conf

# baris 41: kasih tanda #
#com2sec notConfigUser default public

# baris 74,75: hapus tanda # lalu ganti network & community
## sec.name source community
com2sec local localhost
cacti
com2sec mynetwork
192.168.0.0/24 cacti

# baris 78,79: hapus tanda # lalu ganti any menjadi v2c
## group.name sec.model sec.name
group MyRWGroup
v2c local
group MyROGroup
v2c mynetwork

# baris 85: Hapus tanda #
## incl/excl subtree mask
view all included .1 80

# baris 93,94: Hapus tanda #
## context sec.model sec.level prefix read write notif
access MyROGroup ""
v2c noauth exact all none none
access MyRWGroup ""
v2c noauth exact all all all

# baris 162, 163 edit syslocation & syscontact
syslocation
Jakarta Data Center
syscontact
sysadmin sysadmin@yourdomain.com
Restart Service SNMP
[root@cacti ~]# systemctl restart snmpd
[root@cacti ~]# snmpwalk -v2c -c cacti localhost system

Step 6 - Konfigurasi Database Mariadb

Edit file mariadb-server.cnf lalu Tambahkan Script dibawah [mysqld]
[root@cacti ~]# vi /etc/my.cnf.d/mariadb-server.cnf
[mysqld]
.....
.....
default-time-zone='
Asia/Jakarta'
character-set-server=utf8mb4
character_set_client=utf8mb4
collation-server=utf8mb4_unicode_ci

max_heap_table_size=128M
tmp_table_size=128M
join_buffer_size=256M
innodb_file_format=Barracuda
innodb_large_prefix=1
innodb_buffer_pool_size=2048M
innodb_flush_log_at_timeout=3
innodb_read_io_threads=32
innodb_write_io_threads=16
innodb_buffer_pool_instances=17
innodb_io_capacity=5000
innodb_io_capacity_max=10000

[root@cacti ~]# mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
Enter password:
[Masukan password database mariadb]
Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
Resrtart service mariadb
[root@cacti ~]# systemctl restart mariadb

Step 7 - Buat Database cacti

Tahap selanjutnya kita buat Database untuk Cacti
[root@cacti ~]#  mysql -u root -p

create database cacti;
grant all privileges on cacti.* to cacti@'localhost' identified by 'password';
grant select on mysql.time_zone_name to cacti@'localhost';
flush privileges;
exit
Import Database
[root@cacti ~]# mysql -u cacti -p cacti < /usr/share/doc/cacti/cacti.sql
Enter password:
[Masukan password database cacti]

Step 8 - Konfigurasi Cacti

Edit File cacti lalu hilangkan tanda #
[root@cacti ~]# vi /etc/cron.d/cacti
# Hapus tanda #
*/5 * * * * apache /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
Edit File config.php ganti user dan password database cacti
[root@cacti ~]# vi /usr/share/cacti/include/config.php

$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "
cacti";
$database_password = "
password";
$database_port = "3306";
$database_ssl = false;
Edit file php.ini seperti dibawah ini
[root@cacti ~]# vi /etc/php.ini
# baris 383
max_execution_time =
60

# baris 404
memory_limit =
512M

# baris 902
date.timezone =
Asia/Jakarta
Edit file cacti.conf lalu tambahkan IP Network
[root@cacti ~]# vi /etc/httpd/conf.d/cacti.conf
# baris 17
Require host localhost
Require ip 10.0.0.0/24

Step 10 - Restart service

Restart service Httpd, php-fpm, Mariadb dan snmp
[root@cacti ~]# systemctl restart httpd
[root@cacti ~]# systemctl restart php-fpm
[root@cacti ~]# systemctl restart mariadb
[root@cacti ~]# systemctl restart snmpd

Step 11 - Install Cacti

Untuk Installasi Cacti silahkan akses melalui browser lalu masukan pada url http://ip_address/cacti lalu masukan User dan password default yaitu admin admin.

cara, install, cacti, di, centos 8

 Ganti Password default cacti

cara, install, cacti, di, centos 8

 Pilih Accept GPL License lalu Klik Begin

cara, install, cacti, di, centos 8

 Klik Next

cara, install, cacti, di, centos 8

Klik Next

cara, install, cacti, di, centos 8

 Klik Next

cara, install, cacti, di, centos 8

Klik Next

cara, install, cacti, di, centos 8

Pilih I have read statement lalu Klik Next

cara, install, cacti, di, centos 8

Klik Next

cara, install, cacti, di, centos 8

Klik Next

cara, install, cacti, di, centos 8

Klik Next

cara, install, cacti, di, centos 8

Pilih Confirm Installation

cara, install, cacti, di, centos 8

Proses Installasi Cacti

cara, install, cacti, di, centos 8

Klik Get Started

cara, install, cacti, di, centos 8

Versi cacti

cara, install, cacti, di, centos 8

Klik pada menu Management lalu Klik Device

cara, install, cacti, di, centos 8

Tunggu beberapa saat untuk Up

cara, install, cacti, di, centos 8

Cacti membutuhkan beberapa saat untuk membuat Graph

cara, install, cacti, di, centos 8

Ok demikian cara intuk install Cacti di Centos 8, pada artikel selanjutnya saya akan membuat beberapa setingan pada cacti dan menambahkan beberapa Plugin pada cacri server. Terimakasih semoga bermanfaat.

Getting Info...

About the Author

Mungkin ketidaksempurnaan kita yang membuat kita begitu sempurna satu sama lain.Cinta adalah ruang dan waktu yang diukur oleh hati.Cinta terdiri dari satu jiwa yang menghuni dua tubuh.Kamu mungkin memegang tanganku untuk sementara waktu, tetapi kamu…

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.