Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Zabbix topic: chapter 2 detailed explanation of zabbix3.0 installation

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Detailed explanation of zabbix3.0 installation

The outline of this program

Install and configure mariadb

Install the server side

Zabbix web configuration

Web page initialization

Change to Chinese

The problem of Chinese garbled code

Zabbix topic: chapter 2 detailed explanation of zabbix3.2 installation

Zabbix topic: chapter 2 detailed explanation of zabbix3.2 installation

Official document address:

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

I install the rpm package for zabbix, which can be downloaded from the source on the official website. If you need it, you can join the QQ group: 476794643 online communication, operation and maintenance discussion, if you are the one.

[root@localhost ~] # ls

Anaconda-ks.cfg zabbix-sender-3.0.2-1.el7.x86_64.rpm

Zabbix-agent-3.0.2-1.el7.x86_64.rpm zabbix-server-mysql-3.0.2-1.el7.x86_64.rpm

Zabbix-get-3.0.2-1.el7.x86_64.rpm zabbix-server-pgsql-3.0.2-1.el7.x86_64.rpm

Zabbix-java-gateway-3.0.2-1.el7.x86_64.rpm zabbix-web-3.0.2-1.el7.noarch.rpm

Zabbix-proxy-mysql-3.0.2-1.el7.x86_64.rpm zabbix-web-japanese-3.0.2-1.el7.noarch.rpm

Zabbix-proxy-pgsql-3.0.2-1.el7.x86_64.rpm zabbix-web-mysql-3.0.2-1.el7.noarch.rpm

Zabbix-proxy-sqlite3-3.0.2-1.el7.x86_64.rpm zabbix-web-pgsql-3.0.2-1.el7.noarch.rpm

Install and configure mariadb [root@localhost ~] # yum-y install mariadb / / install database

[root@localhost ~] # systemctl start mariadb.service / / start the database

[root@localhost ~] # mysql / / enter the database

MariaDB [(none)] > CREATE DATABASE zabbix CHARSET 'utf8'; / / create zabbix database

Query OK, 1 row affected (0.00 sec)

MariaDB [(none)] > GRANT ALL ON zabbix.* TO 'zbxuser'@'10.1.%.%' IDENTIFIED BY' zbxpass'; / / authorizes zbxuser users to log in to the zabbix database from the broadcast address of 10.0.255.255

Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)] > GRANT ALL ON zabbix.* TO 'zbxuser'@'localhost' IDENTIFIED BY' zbxpass'; / / authorize zbxuser users to log in to the zabbix database from the localhost broadcast address

Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)] > flush privileges; / / refresh permissions

Install server side [root@localhost ~] # yum-y install. / zabbix-server-mysql-3.0.2-1.el7.x86_64.rpm zabbix-get-3.0.2-1.el7.x86_64.rpm

Program environment

Configuration file: / etc/zabbix/zabbix_server.conf

Unit File:zabbix-server.service

Import database scripts to generate database environment

[root@localhost] # mysql-u zbxuser-h 10.1.252.96-pzbxpass zabbix

< /usr/share/doc/zabbix-server-mysql-3.0.2/create.sql 注意:zabbix 2的sql脚本有三个,需要依次导入; zabbix server配置启动 配置段 [root@localhost ~]# grep "^####" /etc/zabbix/zabbix_server.conf ############ GENERAL PARAMETERS ################# ############ ADVANCED PARAMETERS ################ ####### LOADABLE MODULES ####### ####### TLS-RELATED PARAMETERS ####### 通用配置相关的参数 ListenPort=10051 //监听端口 SourceIP= //zabbix的地址 LogType=file LogFile=/var/log/zabbix/zabbix_server.log //日志的文件路径 LogFileSize=0 //日志的转储 DebugLevel=3 //默认级别 DBHost=localhost //数据库的地址 DBName=zabbix //数据库名字 DBUser=zbxuser //数据库用户 DBPassword=zbxpass //数据库用户的密码 DBPort=3306 //数据库端口 DBSocket=/tmp/mysql.sock //连接数据库的sock [root@localhost ~]# systemctl start zabbix-server.service //启动zabbix-server zabbix web配置(1)解决依赖关系[root@localhost ~]# yum install httpd php php-mysql php-mbstring php-gd php-bcmath php-ldap php-xml (2) 安装web GUI[root@localhost ~]# yum -y install ./zabbix-web-3.0.2-1.el7.noarch.rpm ./zabbix-web-mysql-3.0.2-1.el7.noarch.rpm (3)配置php时区参数(a) php.ini (b) /etc/httpd/conf.d/zabbix.conf php_value date.timezone Asia/Shanghai (4)启动web服务[root@localhost ~]# systemctl start httpd.service (5)访问web http://HOST/zabbix web页面初始化 显示的界面 点击next会出现检查状态 点击next配置mysql 点击下一步。此步出现错误,发现无法连接数据库,最后发现zabbix这个数据库中,没有任何数据,检查时加红色的那部分出问题。 next到最后 安装后生成的配置文件:/etc/zabbix/web/zabbix.conf.php 登录的管理员: admin/zabbix 更改为中文 进入主页面:下面进行,将语言改为中文。 [root@localhost ~]# vim /usr/share/zabbix/include/locales.inc.php 找到第55行,将false改为true 点击zabbix右上角小人,进行修改

The problem of Chinese garbled code

Open and run Win+R, type fonts, enter to enter the Windows font directory, find the Microsoft Yahei-regular font, copy it, change the file name to msyh.ttf, and then upload it to / usr/share/zabbix/fonts

After the upload is successful, edit

Change 'graphfont' to msyh.

After the modification is completed, click Refresh to complete.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report