最新消息:记录平凡小事,展望IT世界!

CentOS 8 YUM 安装CACTI

笔记 kwx 1316浏览

最近将 Cacti 新装v1.2并再带升级v0.8.8版本,所以顺手安装,本来想yum安装给自己省事,结果步骤还是有点多。

一、安装

yum install epel-release -y

yum install cacti cacti-spine mariadb-server google-noto-sans-simplified-chinese-fonts mariadb-server -y

二、开放apache访问

vi /etc/httpd/conf.d/cacti.conf

将Deny from all改成Allow from all(如果不允许外部连接的话,只能在linux本机访问

三、创建数据库并导入

1、因为是连带旧版升级,在原来机器导出mysql 数据

mysqldump -l –add-drop-table cacti > cacti.sql

2、创建数据库省略,导入数据库

mysql -uroot -p cacti < /root/cacti.sql

3、如果是升级则需要编辑数据库连接配置,如果新安装无需。

vi /usr/share/cacti/include/config.php

三、设置开机启动和重启

1、设置mysql参数

vi /etc/my.cnf

[mysql]

character-set-server=utf8mb4

collation-server=utf8mb4_unicode_ci

max_heap_table_size=128M

tmp_table_size=128M

join_buffer_size=128M

innodb_buffer_pool_size=1024M

innodb_flush_log_at_timeout=3

innodb_read_io_threads=32

innodb_write_io_threads=16

innodb_buffer_pool_instances=9

innodb_io_capacity=5000

innodb_io_capacity_max=10000

innodb_file_format=Barracuda

innodb_large_prefix=1

2、设置PHP参数

memory_limit=512M

max_execution_time=600

3、开机自动启动

systemctl restart mariadb

systemctl enable mariadb

systemctl restart httpd

systemctl restart php-fpm

systemctl enable httpd

4、开始进入设置

http://ip/cacti/ ,默认用户名密码为 admin/admin

5、权限

最终完成后,要给cacti的rra和log文件夹 775的权限,不然无法生成最新图

 

参考文献:

https://www.cacti.net/download_cacti.php

https://blog.csdn.net/weixin_33769207/article/details/90539035

CentOS 7 YUM 安装 Cacti

https://blog.csdn.net/windowsworld/article/details/90345102

https://blog.csdn.net/zxy15771771622/article/details/78596150

http://www.vue5.com/centos/22999.html

转载请注明:Kwx Blog » CentOS 8 YUM 安装CACTI