Zabbix 安装过程中不显示 MySQL

0 mysql apache postgresql zabbix ubuntu-14.04

我在 ubuntu 14.04 上安装 Zabbix 2.4-1 时遇到问题。我使用了官方网站的手册,安装成功,没有错误。接下来,我创建了具有所有权限的用户“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;
Run Code Online (Sandbox Code Playgroud)

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'
...
Run Code Online (Sandbox Code Playgroud)

我用apache服务器启动它。当我转到 localhost/zabbix 时,我看到 Zabbix Installer。在步骤 3 中,需要配置数据库连接。那么,这里有一个问题:

麻烦

如您所见,选择列表中只有PostgreSQL,因此,我无法连接到数据库(mysql 服务器正在运行)并转到下一步。

Jan*_*raj 5

您的 PHP 目前不支持 MySQL。您需要安装一些php-mysql*软件包,然后重新启动您的网络服务器。

  • 如果使用 postgresql,请使用 `yum install php5-pgsql` 或 `yum install php56-php-pgsql` 取决于您平台上的名称。然后postgresql就会出现在对话框中 (2认同)