简单安装Zabbix

第一次安装,简直是一脸懵逼。

官方下载安装包,但是点进去之后。。。。

这些都是什么鬼啊,怎么这么多下载项,完全搞不懂什么爱什么。

听说zabbix把servr集成了

先安装这个源文件库

rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm

然后

安装软件包:

yum install -y zabbix-server-mysql zabbix-web-mysql zabbix-agent

安装数据库:

yum install -y mariadb-server mariadb

扫描二维码关注公众号,回复: 1465221 查看本文章

 

启动数据库进程:

systemctl restart mariadb.service

 

进入数据库:

mysql

create database zabbix character set utf8 collate utf8_bin;

grant all on zabbix.* to zabbix@'localhost' identified by '123456';

exit

修改时区

sed -i 's@# php_value date.timezone Europe/Riga@php_value date.timezone Asia/Shanghai@g' /etc/httpd/conf.d/zabbix.conf

 

修改zabbix配置文件

  1. [root@abcdocker ~]# vim /etc/zabbix/zabbix_server.conf
  2. DBHost = localhost
  3. DBName = zabbix
  4. DBUser = zabbix
  5. DBPassword = <password>

 

systemctl restart zabbix-server启动失败

解决办法

1. 点我去下载gnutls-3.1.18-8.el7.x86_64.rpm

2. 降级gnutls

rpm -Uvh –force gnutls-3.1.18-8.el7.x86_64.rpm

  • 备注:

如果遇到其他库依赖gnutls 3.3.8 卸载即可

[root@localhost ~]# rpm -Uvh –force gnutls-3.1.18-8.el7.x86_64.rpm warning: gnutls-3.1.18-8.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 192a7d7d: NOKEY error: Failed dependencies: gnutls(x86-64) = 3.3.8-12.el7 is needed by (installed) gnutls-dane-3.3.8-12.el7.x86_64 gnutls(x86-64) = 3.3.8-12.el7 is needed by (installed) gnutls-utils-3.3.8-12.el7.x86_64 [root@localhost ~]# yum -y remove gnutls-dane-3.3.8-12.el7.x86_64

3. 重启zabbix

systemctl restart zabbix-server

 

 

登陆zabbix

默认用户名密码:Admin/zabbix

 

下面部分来自网络其他人的博客,很好的解决了我的问题。

进入主页面:下面进行,将语言改为中文。

[zabbix@miyan zabbix-server-mysql-3.0.1]$ sudo vim /usr/share/zabbix/include/locales.inc.php

找到第55行,将false改为true

点击zabbix右上角小人,进行修改:

还是遇到了中文乱码问题,直接google。

参考这位大神的。

http://www.cnblogs.com/enjoycode/p/zabbix_3_installation_on_centos_7.html

Win+R打开运行,输入fonts,回车进入Windows字体目录,找到微软雅黑-常规字体,复制出来将文件名修改为msyh.ttf,然后上传到/usr/share/zabbix/fonts

上传成功后,编辑

sudo vim /usr/share/zabbix/include/defines.inc.php

将'graphfont' 修改为msyh。

修改完成后,点击刷新,即可完成。

开启服务器http服务:

systemctl start httpd.service

systemctl start zabbix-server

systemctl start mariadb.service

service start grafana-server

加入开机启动项:

systemctl enable httpd.service

systemctl enable zabbix-server

systemctl enable mariadb.service

systemctl enable grafana-server

猜你喜欢

转载自blog.csdn.net/yangyangblog/article/details/80554129
今日推荐