打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
centos7.2 yum安装zabbix

安装要求 :https://www.zabbix.com/documentation/3.4/zh/manual/installation/requirements

官网文档 :https://www.zabbix.com/documentation/3.4/zh/manual/installation

添加Zabbix存储库
[root@localhost ~]#rpm -ivh  http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.noarch.rpm
启用yum仓库
[root@localhost ~]#yum-config-manager --enable rhel-7-server-optional-rpms
使用Mysql数据库安装Zabbix server、WEB前端的示例
[root@localhost ~]#yum -y install zabbix-server-mysql zabbix-web-mysql
安装zabbix server端,agent客户端
[root@localhost ~]#yum -y install zabbix-server zabbix-agent
安装mysql(mariadb)
[root@localhost ~]#yum -y install mairadb mariadb-server[root@localhost ~]#systemctl start mariadb[root@localhost ~]#mysql -u root -pMariaDB > create database zabbix character set utf8;MariaDB > grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'zabbix' with grant option;MariaDB > flush privileges;MariaDB > quit;
导入初始架构(Schema)和数据
[root@localhost ~]#cd /usr/share/doc/zabbix-server-mysql-3.4.15[root@localhost ~]#zcat create.sql.gz | mysql -uzabbix -p zabbix
在zabbix_server.conf中编辑数据库配置
[root@localhost ~]#vim /etc/zabbix/zabbix_server.confLogFile=/var/log/zabbix/zabbix_server.logLogFileSize=0PidFile=/var/run/zabbix/zabbix_server.pidSocketDir=/var/run/zabbixDBHost=localhostDBName=zabbixDBUser=zabbixDBPassword=zabbixSNMPTrapperFile=/var/log/snmptrap/snmptrap.logTimeout=4AlertScriptsPath=/usr/lib/zabbix/alertscriptsExternalScripts=/usr/lib/zabbix/externalscriptsLogSlowQueries=3000
修改zabbix时区
[root@localhost ~]#vim /etc/httpd/conf.d/zabbix.conf#取消注释“date.timezone”设置为亚洲上海时区php_value date.timezone Asia/Shanghai
启动Zabbix
[root@localhost ~]#systemctl start httpd[root@localhost ~]#systemctl start zabbix-server [root@localhost ~]#systemctl start zabbix-agent

Zabbix前端可以在浏览器中通过 http://ip/zabbix 进行访问。
默认的用户名/密码为 Admin/zabbix。

解决中文乱码

在本地Windows电脑上拷贝一份字体(C:\Windows\Fonts)上传到服务器/usr/share/zabbix/fonts 目录下
把上传的字体后缀名修改为:.ttf

把zabbix默认的字体graphfont.ttf 修改为你上传的字体:

sed -i 's@graphfont@xxx@g' /usr/share/zabbic/include/defines.inc.php
来源:https://www.icode9.com/content-3-578501.html
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
zabbix入门(二):zabbix的安装与配置
# 【Zabbix】Zabbix 分布式监控
60秒内快速搭建完整zabbix3.4.6监控系统
Zabbix分布式监控系统
不给电脑,我用手机敲命令十分钟完成了zabbix监控,面试官当场下offer
centos7手把手教你搭建zabbix监控
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服