[iyunv@localhost create]# mysql zabbix < schema.sql
第二步:
1
[iyunv@localhost create]# mysql zabbix < images.sql
第三步:
1
[iyunv@localhost create]# mysql zabbix < data.sql
4.修改zabbix主配置文件:
1
[iyunv@localhost zabbix]# vim /etc/zabbix/zabbix_server.conf
1
2
3
4
5
6
7
8
### Option: DBHost
# Database host name.
# If set to localhost, socket is used for MySQL.
# If set to empty string, socket is used for PostgreSQL.
#
# Mandatory: no
# Default:
DBHost=localhost #开启数据库,并且修改地址。比如DBHost=192.168.1.146
修改用户名,密码:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
### Option: DBUser
# Database user. Ignored for SQLite.
#
# Mandatory: no
# Default:
# DBUser=
DBUser=zbxuser
### Option: DBPassword
# Database password. Ignored for SQLite.
# Comment this line if no password is used.
#
# Mandatory: no
# Default:
# DBPassword=
DBPassword=zbxpass
修改数据库sock:
1
2
3
4
5
6
7
### Option: DBSocket
# Path to MySQL socket.
#
# Mandatory: no
# Default:
# DBSocket=/tmp/mysql.sock
DBSocket=/tmp/mysql.sock
启动服务:
1
2
[iyunv@localhost zabbix]# service zabbix-server start
Starting Zabbix server: [ OK ]