CentOs7下Zabbix安装教程——zabbix server安装

2/13/2017来源:经验技巧人气:3086

执行

yum install zabbix-server-MySQL zabbix-web-mysql

初始化数据库

shell> mysql -uroot -p123456 mysql> create database zabbix character set utf8 collate utf8_bin; mysql> grant all PRivileges on zabbix.* to [email protected] identified by 'zabbix'; mysql> quit; Bye

导入初始化表结构和数据

zcat /usr/share/doc/zabbix-server-mysql-3.2.*/create.sql.gz | mysql -uzabbix -p zabbix

备注:执行时会要求输入密码,密码即为创建zabbix用户时设置的密码,我这边儿设置的密码为zabbix

查看执行情况

[[email protected] /]# mysql -u zabbix -p Enter passWord: mysql> use zabbix Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> show tables;

可以看到在zabbix数据库下新建了很多张表

查看mysql版本

rpm -q zabbix-server-mysql

修改zabbix配置文件

# vi /etc/zabbix/zabbix_server.conf DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=<password>

此处password即为上边儿创建用户初始化数据库时设置的密码,我这边为zabbix

修改时区 时区配置文件在/etc/httpd/conf.d/zabbix.conf这个文件中,将date.timezone这行注释去掉并修改为Asia/Shanghai 这里写图片描述