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 simple deployment yum installation to solve picture display garbled

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

1. Install lamp environment first

yum install php-fpm.x86_64 httpd mariadb-server -y

2. Install zabbix backend plus web side

rpm -Uvh https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-2.el7.noarch.rpm

yum clean all

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

3. configure mariadb (mysql),

mysql> create database zabbix character set utf8 collate utf8_bin;

#Create zabbix library

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

#Authorize zabbix@localhost user to have full permissions on zabbix library. Note that mysql and zabbix-server are on the same host, so only authorized local users.

flush privileges; #Refresh privileges

zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p123456 zabbix

#Preprocess zabbix library (create table) File path of each version may be different Use rpm -ql zabbix-server-mysql to get path

After testing, the above versions have BUG recommendations to use the latest official version

https://www.zabbix.com/cn/download? zabbix=4.4&os_distribution=centos&os_version=7&db=mysql&ws=apache

4. Change php time zone

vim /etc/php.ini

date.timezone =Asia/shanghai

#date.timezone Uncomment this item and add Asia Shanghai

5. Modify zabbix-server configuration

vim /etc/zabbix/zabbix_server.conf

DBName=zabbix #Specifies which library the data is stored in

DBUser=zabbix #Specifies the user of the store

DBPassword=123456

systemctl restart zabbix-server

netstat -nltp

Check if 10051 is listening.

6. Log in zabbix web

systemctl restart httpd #Start httpd service

193.192.168.0.13/zabbix

Installation requires filling in information, default account is Admin zabbix

Log in, there will be an error because the server side will add itself to the monitoring host by default, and I do not have an agent installed here.

7. Install server-side agent

yum install zabbix-agent.x86_64 -y

vim /etc/zabbix/zabbix_agentd.conf #Modify agent configuration file

Server=127.0.0.1 #Passive mode, the server actively pulls data

ServerActive=127.0.0.1 #Active mode, agent actively sends data

systemctl restart zabbix-agent.service #Restart agent

After restarting, the server will be able to monitor itself.

8. Monitoring other hosts

rpm -Uvh https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-2.el7.noarch.rpm #install zabbix official yum source

yum install zabbix-agent.x86_64 #Install agent

vim /etc/zabbix/zabbix_agentd.conf #Modify agent configuration file

Server=192.168.0.13 #Passive mode, the server actively pulls data

ServerActive=192.168.0.13 #Active mode, agent actively sends data

systemctl restart zabbix-agent.service #Restart agent

netstat -nltp #See if 10050 is monitored

add a host

Open the dashboard and select Configure> Hosts> Create Host

Select template to add. The template is a preset monitoring item for you.

9. View monitored hosts

Look at the graphics.

10. Picture shows garbled code small bug solution

cd /usr/share/zabbix/assets/fonts #This folder is zabbix-web fonts folder

rz #Use rz last font up

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

/FONT_NAME # /Search for characters and modify the font file to your last one. Be careful not to add suffixes

systemctl restart httpd #Restart httpd service

11. Resolving Unit Conversion

zabbix value to 1000 will automatically help you convert to 1k, do not want to let it change

The requested URL/usr/share/zabbix/include/funct.inc.php was not found on this server.

Find the item "$blackList" and add a unit

$blackList = ['%', 'ms', 'rpm', 'RPM'];

Modified to: $blackList = ['%',' ms','rpm', 'RPM', 'Kb/min'];

#It means that the unit in here will not be converted. After changing it, use 'Kb/min' in the monitoring item and the unit will not be converted

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

Servers

Wechat

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

12
Report