【发布时间】:2016-02-11 19:05:11
【问题描述】:
我在 ubuntu 14.04 上安装 Zabbix 2.4-1 时遇到问题。 我使用official site的手册,安装成功,没有错误。 接下来,我创建了具有所有权限的用户“zabbix”和数据库“zabbix”,并从 Zabbix 存档中导入了 schema.sql、images.sql 和 data.sql。然后我更改了 /etc/zabbix 目录中的配置文件:
zabbix.conf.php
// Zabbix GUI configuration file
global $DB;
// Valid types are MYSQL, SQLITE3 or POSTGRESQL
$DB["TYPE"] = 'MYSQL';
$DB["SERVER"] = 'localhost';
$DB["PORT"] = '3306';
// SQLITE3 use full path to file/database: $DB["DATABASE"] = '/var/lib/zabbix/zabbix.sqlite3';
$DB["DATABASE"] = 'zabbix';
$DB["USER"] = 'zabbix';
$DB["PASSWORD"] = 'root';
// SCHEMA is relevant only for IBM_DB2 database
$DB["SCHEMA"] = '';
$ZBX_SERVER = 'localhost';
$ZBX_SERVER_PORT = '10051';
$ZBX_SERVER_NAME = '';
$IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;
zabbix-server-mysql.conf
...
# dbc_dbtype: type of underlying database to use
# this exists primarily to let dbconfig-common know what database
# type to use when a package supports multiple database types.
# don't change this value unless you know for certain that this
# package supports multiple database types
dbc_dbtype='mysql'
# dbc_dbuser: database user
# the name of the user who we will use to connect to the database.
dbc_dbuser='zabbix'
# dbc_dbpass: database user password
# the password to use with the above username when connecting
# to a database, if one is required
dbc_dbpass='root'
...
我用 apache 服务器启动它。当我转到 localhost/zabbix 时,我看到了 Zabbix Installer。在第 3 步中,需要配置 DB 连接。所以,这里有一个问题:
如您所见,在选择列表中只有 PostgreSQL,所以,我无法连接到数据库(mysql 服务器正在运行)并转到下一步。
【问题讨论】:
-
这在 Debian Buster 上的 Zabbix 4.4 版中对我有用
标签: mysql apache postgresql ubuntu-14.04 zabbix