java多线程    Java入门    vsftp    ftp    linux配置    centos    FRP教程    HBase    Html5缓存    webp    zabbix    分布式    neo4j图数据库    

cacti 安装Linux

[root@iz2ze9n3z2fl9zj9hrv58vz ~]# yum install cacti -y
[root@iz2ze9n3z2fl9zj9hrv58vz ~]# whereis cacti

cacti: /etc/cacti /usr/share/cacti

nginx的文件cacti.java-er.com.conf

访问下
http://cacti.java-er.com/

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/share/cacti/include/global_constants.php on line 30
[root@iz2ze9n3z2fl9zj9hrv58vz ~]# vi /usr/share/cacti/include/global_constants.php 

第一行增加

ini_set('date.timezone','Asia/Shanghai');

再次访问

FATAL: Connection to Cacti database failed. Please ensure:

    the PHP MySQL module is installed and enabled.
    the database is running.
    the credentials in config.php are valid.
mysql -u root -p

 create database cacti default character set utf8;
 source /usr/share/doc/cacti-1.2.5/cacti.sql

修改/etc/cacti/db.php文件配置数据库

踩坑:cacti.sql文件路径去/usr/share/doc/下找,而不是/usr/share/cacti/下找

踩坑:用二级域名而不是目录需要修改db.php中的$url_path = '/cacti/';

$url_path = '/';

修改完成直接访问就成功了

默认账户和密码admin/admin

爆出了一堆数据库要调整的值

时区修改

下面这句命令行

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

vi /etc/my.cnf
以下参数如果之前的my.cnf文件有,那么修改,没有就增加

[mysqld]
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
innodb_flush_log_at_timeout = 3
innodb_read_io_threads = 32
innodb_write_io_threads = 16

一路点击下一步

出现一个图片没有配置 说明没有配置完毕,不过壳子安装好了。

等我再写一篇配置篇


This entry was posted in Linux and tagged . Bookmark the permalink.
月小升QQ 2651044202, 技术交流QQ群 178491360
首发地址:月小升博客https://java-er.com/blog/cacti-linux/
无特殊说明,文章均为月小升原创,欢迎转载,转载请注明本文地址,谢谢
您的评论是我写作的动力.

Leave a Reply