标签:zabbix
环境介绍
os:centos7.2
server:192.168.1.156
agent:192.168.1.157
一、安装
zabbix仓库包 server与agent都要安装
rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
server:仓库
[local]
name=local
baseurl=file:///mnt/cdrom
gpgcheck=0
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=http://repo.zabbix.com/zabbix/3.2/rhel/7/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
[zabbix-non-supported]
name=Zabbix Official Repository non-supported - $basearch
baseurl=http://repo.zabbix.com/non-supported/rhel/7/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
gpgcheck=1
server:
安装zabbix-server与mariadb数据库
yum install zabbix-server-mysql zabbix-web-mysql -y;yum groupinstall mariadb mariadb-client -y
systemctl restart mariadb
systemctl enable mariadb
mysql_secure_installation ##### 执行脚本设置mariadb权限安全。这里全部为‘y‘,root密码:mariadb
登录数据库
mysql -u root -p‘mariadb‘
create database zabbix character set utf8 collate utf8_bin; ##创建数据库并设置字符集
grant all privileges on zabbix.* to zabbix@localhost identified by ‘zabbix‘; ####设置数据库权限,使得zabbix用户对zabbix数据库有所有权限,zabbix用户密码我设置为zabbix。
zcat /usr/share/doc/zabbix-server-mysql-3.2.*/create.sql.gz | mysql -uzabbix -p‘zabbix‘ ## 数据库导入,复制粘贴即可,直接zcat create.sql.gz | mysql -u zabbix -p‘zabbix‘ 会失败
本文出自 “silence” 博客,请务必保留此出处http://silencezone.blog.51cto.com/3613477/1922576
标签:zabbix
原文地址:http://silencezone.blog.51cto.com/3613477/1922576