기술노트

기술노트

게시물 상세
CentOS8 cacti 설치
작성자 : 관리자(jieun@ehostidc.co.kr)  작성일 : 2020-12-18   조회수 : 2518

1) epel 및 패키지 설치

root@localhost:[~]: dnf -y install epel-release

root@localhost:[~]: dnf -y install cacti net-snmp net-snmp-utils php-mysqlnd php-snmp php-bcmath rrdtool

 

2) snmp 설정   

root@localhost:[~]: vi /etc/snmp/snmpd.conf

#com2sec notConfigUser  default       public #line 41 

com2sec mynetwork     IP       ehost #line 74 

com2sec mynetwork     192.168.126.0/24     ehost #line 75 

group MyRWGroup  any        local #line 79

group MyROGroup  any        mynetwork #line 80 

view all    included  .1                               80 #line 86

access MyROGroup ""      any       noauth    0      all    none   none #line 94

 

3) mariaDB 설   

root@localhost:[~]: vi /etc/my.cnf.d/mariadb-server.cnf 

default-time-zone='Asia/Tokyo' 

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

 

4) 시간대 설정   

root@localhost:[~]: mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql

[root@dlp ~]# systemctl restart mariadb

 

5) DB생성 및 table 삽입   

 

root@localhost:[~]: mysql -u root –p 

MariaDB [(none)]> grant all privileges on cacti.* to cacti@'localhost' identified by 'password'; 

MariaDB [(none)]> flush privileges;

root@localhost:[~]: mysql -u cacti -p cacti < /usr/share/doc/cacti/cacti.sql

 

6) cacti DB환경설정   

root@localhost:[~]: vi /usr/share/cacti/include/config.php

$database_type     = 'mysql'; #line 29 

$database_default  = 'cacti'; 

$database_hostname = 'localhost';

$database_username = 'cactiuser'; 

$database_password = 'password';

$database_port     = '3306'; 

$database_retries  = 5;

$database_ssl      = false; 

$database_ssl_key  = '';

$database_ssl_cert = '';

$database_ssl_ca   = '';

 

7) cacti.conf 설정   

root@localhost:[~]: vi /etc/httpd/conf.d/cacti.conf

#line 14 

       

                # httpd 2.4 

                Require all granted

         

       

                # httpd 2.2 

                Order deny,allow

                Deny from all 

                Allow from all

         

 

8) apache 설정   

root@localhost:[~]: vi /etc/httpd/conf/httpd.conf

DocumentRoot "/usr/share/cacti" #line 122

 

9) php.ini 설   

root@localhost:[~]: vi /etc/php.ini

max_execution_time = 60 #line 383 

date.timezone = Asia/Tokyo #line 902

 

10) demon 재시작 및 웹페이지 확인

 

root@localhost:[~]: systemctl restart httpd php-fpm mysqld

 

기본 계정: admin / admin

이전글 CentOS8 cacti 초기 설정
다음글 CentOS8 php 설치