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

Monitoring deployment of zabbix system (part I)

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Why use zabbix?

zabbix is a recently popular open source system monitoring software, he is characterized by simple configuration, can be directly managed and maintained through the web interface, while being able to customize the monitoring data and graphics, from the use of relatively easy, but she also has shortcomings, such as alarm function is weak, for some special map requirements can not be achieved. In actual production scenarios, reasonable choices can be made according to their own needs.

II. Installation of zabbix

zabbix official update speed is relatively fast, so far has been updated to version 3.4, the latest version or beta version, in the production environment we'd better use the long-term support version 3.0. For versions above 3.0, the official requirement is that PHP is above 5.4, which needs to be noted.

https://www.zabbix.com/life_cycle_and_release_policy

zabbix is a CS architecture system, which requires a server, and the monitored device needs to install client agent software. Of course, zabbix also supports snmp, fping, port monitoring and other methods to monitor remote servers or network status.

Preparing the installation environment

zabbix server needs to have a local database, monitoring data and information are stored in the local database, and because it is managed using the web interface, we need to install Apache or nginx.

The server and client I am currently using are CentOS 6.5, and the database uses mysql.

At the same time, during the installation process, we need to turn off selinx and firewall. Of course, if the production environment needs to use firewall, we can add a firewall rule to the client (because the client is passively accepting requests from the server, the default port is 10050).

# iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 10050 -j ACCEPT

2. Dependency packages needed to install eple source and zabbix.

Direct use of Alibaba Cloud epel:

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo

Set the host name. The configuration of the host name needs to be planned uniformly. The host name needs to be identified when configuring it early and later. At the same time, if there is no intranet DNS, hosts need to be bound.

Install the required packages, the web service used here is Apache:

yum install httpd mysql mysql-server gcc gcc-c++ glibc mysql-devel libxml2-devel libcurl curl curl-devel net-snmp net-snmp-devel libssh3-devel OpenIPMI-devel

3. Install or upgrade php

The default installation of epel source here is php5.3 version, configuration zabbix server requires 5.4 or above, need to upgrade this version. Upgrading php requires configuring a remi source. For this step, please refer to the php upgrade method I reproduced earlier:

http://tryingstuff.blog.51cto.com/4603492/1854343

rpm -i http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

Install a later version of php using yum:

yum install --enablerepo=remi --enablerepo=remi-php56 php php-gd php-xml php-mbstring php-bcmath php-pdo php-mysql -y

3. Configure LAMP environment

/etc/init.d/httpd start

cp /usr/share/mysql/my-medium.cnf /etc/my.cnf

vim /etc/my.cnf

Put the following configuration under the mysqld module:

default-storage-engine = innodb

innodb_file_per_table

collation-server = utf8_general_ci

init-connect = 'SET NAMES utf8'

character-set-server = utf8

Start mysql : /etc/init.d/mysqld start

Write phpinfo.php to test whether lamp successfully loads the module we need, or simply execute "php -m".

cd /var/www/html

vim phpinfo.php

1

Visit http://local-ip/phpinfo.php to test and delete this file after successful testing.

4. Configure zabbix server database

Here we download the official version 3.2 source code for compilation and installation. Zabbixd database files are included in the extracted installation package

Do the following to the database:

mysqlmysql> create database zabbix;mysql> grant all on zabbix.* to zabbix@localhost identified by'zabbix';mysql> flush privileges;mysql> exit

In the extracted database/mysql directory

Import zabbix data, note the order:

cd to download the extracted zabbix directory:

cd /software-tools/zabbix-3.2.1/database/mysql

Import database sequentially:

mysql -u zabbix -pzabbix zabbix -S /data/3306/mysql.sock

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