ZABBIX4.0安装

  • 安装相应yum源
  • 安装相应服务
  • 配置各服务

安装zabbix的yum源

#下载zabbix-release
wget http://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm

#安装zabbix-release
rpm -ivh zabbix-release-4.0-1.el7.noarch.rpm

#将官方仓库地址替换为清华仓库地址
sed -i 's#http://repo.zabbix.com#https://mirror.tuna.tsinghua.edu.cn/zabbix#g' /etc/yum.repos.d/zabbix.repo

安装zabbix各服务

yum install  zabbix-server-mysql  zabbix-web-mysql  mariadb-server -y
#自动安装lamp环境 -- 默认安装,满足需求,足够稳定,
#启动mariadb服务
systemctl start mariadb
systemctl enable mariadb

配置数据库

#执行mysql安全配置向导命令
mysql_secure_installation
先回车
再n
然后一路y

#进入mysql,指定字符集,创建库,创建授权
mysql

MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by '123456';


#导入zabbix表结构和初始数据
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p123456 zabbix

#检查zabbix库是否导入成功
mysql -uroot  zabbix -e 'show tables'  #默认144个数据表.

配置启动zabbix-server

#编辑zabbix-server配置文件
vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=123456


#启动zabbix-server
systemctl start zabbix-server
systemctl enable zabbix-server


#检查端口
netstat -lntup|grep 10051

配置zabbix-web

#修改Zabbix前端的PHP配置,并启动httpd
vi /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai

#启动服务
systemctl start httpd
systemctl enable httpd

#浏览器访问:http://10.0.0.71/zabbix
#后期修改zabbix数据库密码的时候,需要修改的配置文件:
/etc/zabbix/web/zabbix.conf.php
#默认账号密码:Admin  zabbix
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值