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

How to install and configure zabbix3.4.7 for Centos7.4

2025-01-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

Today, I would like to share with you the relevant knowledge points about how to install and configure zabbix3.4.7 in Centos7.4. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article.

I. Overview

Zabbix is an enterprise-level distributed open source monitoring scheme. Ability to monitor various network parameters as well as server health and integrity. Support flexible notification mechanism and provide excellent reporting and data visualization capabilities. Zabbix supports active polling and passive capture. The most important thing is that the source code is distributed for free and can be used by the public at will. This is also one of the important reasons why it is so popular in small and medium-sized enterprises.

Features and functions

Zabbix has supported elasticsearch as a historical data store since the 3.4.5rc1 version, and released 3.4.5 on December 28th, 17.

Bug

Recently, it was found that there was a general problem with pie graphics in the version after zabbix3.4.5.

II. Installation and configuration

1. Download the source package

Zabbix official website:

Zabbix download:

Wget http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-agent-3.4.7-1.el7.x86_64.rpm

2. Dependent installation packages

The copy code is as follows:

Yum-y install gcc* make php php-gd php-mysql php-bcmath php-mbstring php-xml curl curl-devel net-snmp net-snmp-devel perl-dbi httpd mariadb* mysql-devel libxml2-devel curl-devel unixodbc-devel net-snmp-devel openipmi-devel openldap openldap-devel libevent-devel

3. Create an installation directory

Mkdir-pv / app/zabbix

4. Create zabbix users and groups

Groupadd zabbixuseradd-g zabbix zabbix

5. Decompression and installation

Tar-xvf zabbix-3.4.7.tar.gz cd zabbix-3.4.7/./configure-prefix=/app/zabbix-enable-server-enable-agent-with-mysql-with-net-snmp-with-libcurl-with-libxml2-with-openipmi-with-unixodbc

6. Start and configure the database

Systemctl start mariadb.servicesystemctl status mariadb.servicemysqladmin-uroot-p password 10880347mysql-uroot-p10880347create database zabbix character set utf8 collate utf8_bin;grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix2018'

7. Import the database

Mysql-uzabbix-pzabbix2018 zabbix

< schema.sqlmysql -uzabbix -pzabbix2018 zabbix < images.sqlmysql -uzabbix -pzabbix2018 zabbix < data.sql 8、修改php的配置参数 vim /etc/php.ini date.timezone= asia/shanghaimax_execution_time = 300post_max_size = 32mmemory_limit = 128mmbstring.func_overload = 1max_input_time = 300 9、移动zabbix项目到httpd目录中去 cp -r frontends/php/ /var/www/html/zabbixll /var/www/html/chown -r apache.apache /var/www/html/zabbix/ 10、修改配置文件zabbix_server.conf 创建相关目录 mkdir logsmkdir alertscriptsmkdir externalscriptsgrep -n '^'[a-z] /app/zabbix/etc/zabbix_server.conf38:logfile=/app/zabbix/logs/zabbix_server.log68:pidfile=/app/zabbix/logs/zabbix_server.pid95:dbname=zabbix111:dbuser=zabbix119:dbpassword=zabbix440:timeout=4481:alertscriptspath=/app/zabbix/alertscripts490:externalscripts=/app/zabbix/externalscripts526:logslowqueries=3000 11、zabbix服务启动脚本 cp misc/init.d/fedora/core/zabbix_server /etc/init.d/ 将启动脚本的路径修改为/app/zabbix vim /etc/init.d/zabbix_serverbasedir=/app/zabbix 12、zabbix安装目录授权 cd /app/chown -r zabbix.zabbix zabbix/ 13、开机启动 chkconfig --add zabbix_serverchkconfig zabbix_server onsystemctl enable httpd.servicesystemctl enable mariadb.servicesystemctl start httpd.service/etc/init.d/zabbix_server restart 14、web服务初始化 输入服务器ip地址172.16.8.254 下一步 环境配置检测,如果不ok,应返回前面的步骤进行排查 问题:是因少一个/usr/lib64/php/modules/ldap.so 找不到这个文件 root@devops-zabbix modules]# tail -f /var/log/httpd/error_log php warning: php startup: unable to load dynamic library '/usr/lib64/php/modules/ldap.so' - /usr/lib64/php/modules/ldap.so: cannot open shared object file: no such file or directory in unknown on line 0 解决方法: 1、首先查看源码安装的php模块中是否有ldap.so 2、重新拷一个ldap.so文件到/usr/lib64/php/modules/目录 至此zabbix 前面安装 "check of pre-requisites"全部ok

The following configure the connection to the database

Next step

Server name and port configuration

Login, default user name admin, password zabbix

III. Bug

Recently, it has been found that the pie graph is only half displayed in the version after zabbix3.4.5-3.4.7.

IV. The problem of garbled codes displayed in Chinese

1. Modify the configuration file defines.inc.php

Cd / var/www/html/zabbix/include/vi defines.inc.php54 define ('zbx_graph_font_name',' msyh'); 103 define ('zbx_font_name',' msyh')

2. Copy fonts and license

Copy the win7 font c:\ windows\ fonts, first copy the desktop, then copy the msyh,msyhbd font / var/www/html/zabbix/fonts

Pay attention to the problem of permission (recently, many netizens have encountered the problem that the font is not valid)

Cd / var/www/html/zabbix/fontschown-r apache.apache *

These are all the contents of the article "how to install and configure zabbix3.4.7 for Centos7.4". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

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: 271

*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

Internet Technology

Wechat

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

12
Report