gpt4 book ai didi

php - Laravel 中 pgsql 上的 Cacti

转载 作者:可可西里 更新时间:2023-11-01 06:49:35 24 4
gpt4 key购买 nike

描述

我有一个 laravel 应用程序,我正在尝试将其与 Cacti 集成:是一个完整的网络图形解决方案,旨在利用 RRDTool 的数据存储和图形功能的强大功能。


步骤

我已经下载了它,并将它放在我的 public/ 目录中。

现在,当我转到我的 http://localhost:8888/cacti/


我得到了

第一次尝试

FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'


然后,我打开“include/config.php”。因为我的目标是尝试将它连接到 pgsql 而不是 mysql,所以这里是我当前的设置

$database_type = "pgsql";
$database_default = 'cacti';
$database_hostname = 'localhost';
$database_username = 'postgres';
$database_password = '';
$database_port = '5432';
$database_ssl = false;

我一点击保存,刷新页面http://localhost:8888/cacti/

第二次尝试

现在,我得到:本地主机页面不工作 :(

enter image description here


数据库

我已经在运行在 5432 端口上的本地主机上创建了一个 cacti 数据库。

enter image description here

最佳答案

this site 中给出, cacti 被设计为仅与 MySQL 一起工作。

Cacti is written in PHP and supports MySQL only for storing the RRDTool data.

不过,有这个链接可以使用 pgsql 设置 Cacti 。
PostgreSQL Host Template

关于php - Laravel 中 pgsql 上的 Cacti ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38881776/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com