2017-09-21  1,445 views 评论

linux系统下安装运维系统zabbix3.2步骤

1.官方文档地址:

https://www.zabbix.com/documentation/3.2/manual/installation/install_from_packages

2.导入源:

[zabbix@miyan ~]$ sudo rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm

3.安装zabbix包

[zabbix@miyan ~]$ sudoyuminstall zabbix-server-mysql zabbix-web-mysql

4.我们给本机也安装上客户端

[zabbix@miyan ~]$ sudoyuminstall zabbix-agent

5.安装数据库

[root@abcdocker ~]# yum install mariadb-server mariadb -y

[zabbix@miyan ~]$ sudo mysql_secure_installation

[zabbix@miyan ~]$ mysql -uroot -p

mysql> create database zabbix character set utf8 collate utf8_bin;

Query OK, 1 row affected (0.00 sec)

mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';

(2)进入到这个目录

[zabbix@miyan zabbix-server-mysql-3.0.1]$ pwd

/usr/share/doc/zabbix-server-mysql-3.0.1

[zabbix@miyan zabbix-server-mysql-3.0.1]$ ls

AUTHORS ChangeLog COPYING create.sql.gz NEWS README

运行命令

[zabbix@miyan zabbix-server-mysql-3.0.1]$ # zcat create.sql.gz | mysql -uroot -p zabbix

注意加红色部分,易错。

6.启动zabbix server服务

修改配置文件:

[zabbix@miyan ~]$ vim /etc/zabbix/zabbix_server.conf

DBHost=localhost

DBName=zabbix

DBUser=zabbix

DBPassword=zabbix

实际上我的配置文件修改的是DBHost和DBPassword去掉前面的#号。

启动zabbix服务,设置开机自启动

[zabbix@miyan ~]$ sudo systemctl start zabbix-server

[zabbix@miyan ~]$ sudo systemctl enable zabbix-server

Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-server.service to /usr/lib/systemd/system/zabbix-server.service.

7.编辑zabbix前端的PHP配合配置

[zabbix@miyan ~]$ sudo vim /etc/httpd/conf.d/zabbix.conf

复制代码

php_value max_execution_time 300

php_value memory_limit 128M

php_value post_max_size 16M

php_value upload_max_filesize 2M

php_value max_input_time 300

php_value always_populate_raw_post_data -1

php_value date.timezone Asia/Shanghai

复制代码

实际上我就是修改了时区

启动apache服务,设置开机自启动

[zabbix@miyan ~]$ sudo systemctl start httpd

[zabbix@miyan ~]$ sudo systemctl enable httpd

Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.

8.登陆zabbix

http://IP/zabbix/

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

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

找到第55行,将false改为true

http://images2015.cnblogs.com/blog/638371/201603/638371-20160326212921448-1833360430.png

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

http://images2015.cnblogs.com/blog/638371/201603/638371-20160326213104667-215461677.png

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

上传成功后,编辑

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

将'graphfont' 修改为msyh。

原创文章或网络摘录,转载请注明: 转载自守候的时光

本文链接地址: linux系统下安装运维系统zabbix3.2步骤

打赏

给我留言

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: