centos8安装cacti

1. nginx mysql正常安装即可

2. Install SNMP and RRDTool
yum install -y net-snmp net-snmp-utils net-snmp-libs rrdtool

3. install php and php-extensions
yum install -y php php-xml php-session php-sockets php-ldap php-gd php-json php-mysqlnd php-gmp php-mbstring php-posix php-snmp php-intl

php安装完成后版本如下
图片

4. 更新php配置

date.timezone = Asia/Shanghai
memory_limit = 512M 
max_execution_time = 60

5. 关闭selinux

6. 确保防火墙开放对应的端口

7. 下载最新cacti
https://www.cacti.net/downloads/cacti-latest.tar.gz
解压后放到web程序目录

8. 配置cacti对应的数据库账号密码

9. 导入cacti.sql到数据库
mysql cacti < /usr/share/nginx/html/cacti/cacti.sql -uroot -p

10. cacti目录修改权限到755

11. 访问如下地址,开始安装,过程中遇到错误解决如下
http://ip:port/cacti


问题解决如下
----------------------------------------

12. 加载时区
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql

13. mysql配置文件my.cnf修改如下
[client]  
default-character-set = utf8mb4
 
[mysql]  
default-character-set = utf8mb4
 
 
[mysqld]  
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
init_connect='SET NAMES utf8mb4'
max_heap_table_size = 512M
tmp_table_size = 512M
join_buffer_size=1024M
innodb_buffer_pool_size=7813M
innodb_flush_log_at_timeout=3
innodb_read_io_threads=32
innodb_write_io_threads=16
innodb_buffer_pool_instances=64
innodb_io_capacity=5000
innodb_io_capacity_max=10000

14. 添加crontab任务
*/5 * * * * php /usr/share/nginx/html/cacti/poller.php > /dev/null 2>&1

猜你喜欢

转载自www.cnblogs.com/willhuo/p/12955394.html