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

Red Hat 7 sets up Zabbix monitoring

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Zabbix is an enterprise-level open source solution based on WEB interface that provides distributed system monitoring and network monitoring capabilities.

Zabbix can monitor various network parameters to ensure the safe operation of the server system, and provides a flexible notification mechanism to enable system administrators to quickly locate / solve various problems. The experimental environment of zabbix is LAMP. We have already built the LAMP environment before. In order to facilitate future review, let's write down detailed notes here. In the experiment, some software packages are downloaded online, so the environment of the linux server must be able to surf the Internet.

Configure epel Feed

Wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Rpm-ivh epel-release-latest-7.noarch.rpm

Yum repolist # # check if it has been added to the source list

The environment for LAMP is as follows:

Yum install httpd-y # install httpd

Yum install mariadb mariadb-server # install mariadb

Because Red Hat 7's php5.4 lacks php-bcmath and php-mbstring packages by default. So I upgraded php to php5.6 version!

# execute the following command to upgrade the software repository

Rpm-Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm

Rpm-Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

Yum install-y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-intl php56w-mbstring # install PHP5.6

Systemctl restart httpd # restart the service

Vim / var/www/html/phpinfo.php # tests whether PHP can be called, adding the following to the phpinfo.php document

Client test: OK

Systemctl start mariadb # launch mariadb

Mysql_secure_installation # initialize database service

Enter to set the password

Select Y to set the password

Select Y to delete anonymous account

Select Y to prevent root users from logging in remotely

Select Y to delete the test database and remove access to it

Select Y to refresh the authorization table so that the initialization settings take effect immediately

Mysql-u root-p logs in to the database using the root user:

MariaDB [(none)] > create database zabbix default character set utf8 collate utf8_bin

MariaDB [(none)] > show databases; # View existing databases

MariaDB [(none)] > create user zabbix@localhost IDENTIFIED BY 'zabbix'; # create zabbix account password

MariaDB [(none)] > grant all on zabbix.* to 'zabbix'@'%' identified by' zabbix'; # create the table

MariaDB [(none)] > exit

Systemctl stop firewalld # Firewall shutdown command

Setenforce 0

Iptables-F

After setting up the LAMP environment, install zabbix3.0

Rpm-ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm # install zabbox3.0

Yum-y install zabbix-server-mysql zabbix-web-mysql zabbix-get # installation

Import zabbix's database

Cd / usr/share/doc/zabbix-server-mysql-3.0.9/

Zcat create.sql.gz | mysql-u root-p1 zabbix

Modify the configuration file for vim / etc/zabbix/zabbix_server.conf.

DBName=zabbix

DBHost=localhost

DBPassword=zabbix # password

DBUser=zabbix # user

Note: some exist, some should be added by yourself, do not overlap in the file!

Modify the configuration file of vim / etc/httpd/conf.d/zabbix.conf by adding the following

Php_value date.timezone Asia/Chongqing

Systemctl restart zabbix-server

Systemctl restart httpd

The client configures the browser (enter the 192.168.23.20/zabbix of the http://linux server for access)

Click Next step (next)

Enter the password of the database user zabbix created earlier

Language change Chinese select avatar, then select chinese (zh_CN), and then click Update

Although it appears to be in Chinese, there is still a problem with supporting Chinese. We configure it to fully support Chinese.

Find the italics in the local C:\ Windows\ Fonts in the window client, select copy, and send it to the zabiix server (upload to the server according to your own choice)

SIMKAI.TTL is the font I copied.

Chmod 777 SIMKAI.TTL # Grant permission

Cp SIMKAI.TTL / usr/share/zabbix/fonts/ # is copied to the specified path

Cp SIMKAI.TTL graphfont.ttf # replace fonts.

There is no garbled code anymore.

Let's configure zabbix-agent now.

Yum install zabbix-agent # installation

Configure vim / etc/zabbix/zabbix_agentd.conf

Server,serverActive is the ip address of the server, and hostname is the IP address being monitored. Since we need to monitor the zabbix server, we fill in 127.0.0.1 here. (note that it is available by default in the configuration file and only needs to be modified, not added below)

Systemctl restart zabbix-agent # restart the service

Systemctl restart zabbix-server # restart the service

Zabbix has been configured. For more detailed configuration of zabbix, please help yourself to Baidu.

Note, refer to the article http://dongxin.blog.51cto.com/3486403/1771720

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