English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
يتم تشغيل نظام Zabbix على بيئة PHP، لذا يجب أن يكون هناك بيئة تشغيل PHP في النظام، سواء كانت بيئة LNMP أو LAMP
إذا لم تكن تعرف كيفية تثبيت بيئة PHP تحت Linux، قد تكون المقالات التالية مفيدة لك
تثبيت بيئة LNMP: https://ar.oldtoolbag.com/article/97754.htm
تثبيت بيئة LAMP: https://ar.oldtoolbag.com/article/68480.htm
يرجى التأكد من أن بيئة PHP في نظامك تعمل بشكل صحيح
أولاً دعونا نقدم لكم Zabbix
One,Zabbix characteristics
Data collection
Availability and performance checks
Support SNMP (including capture and active polling), IPMI, JMX, VMware monitoring
Custom check
Collect the required data at a custom interval
Executed by Server/Proxy and agents
Flexible threshold definition
Highly configurable alerts
Real-time chart drawing
Using the built-in chart drawing function, the content of the monitoring item can be immediately drawn into a chart
Web monitoring function
Support custom graphics
Rich visualization options
Multiple monitoring items are displayed in one view
Network topology diagram
Based on template grouping check
Secure user authentication
Written in C language, high performance
Two,Zabbix composition
Zabbix server end
Zabbix Server is the core storage of all configuration information, statistical information and operation data. It is used to report system availability, system integrity and statistical information, etc.
Zabbix data storage end
Configuration information and data collected by Zabbix are stored in the database, supporting mysql, pg, oracle.
Zabbix Web display end
Provide a web-based access interface (written in PHP language)
Zabbix client
Zabbix agents monitoring proxy deployed on the monitoring target, can actively monitor local resources and applications, and report the collected data to Zabbix Server.
Zabbix Proxy agent server
Zabbix proxy can collect performance and availability data on behalf of Zabbix Server. Proxy agent server is an optional part of Zabbix software deployment; of course, Proxy agent server can help a single Zabbix Server to share the load pressure.
Three,Zabbix typical architecture deployment diagram
Four,Install Zabbix
View CentOS version number
# more /etc/redhat-release ##demonstration environment CentOS Linux release 7.4.1708 (Core)
Disable selinux
# vi /etc/selinux/config ##disable selinux SELINUX=disabled # setenforce 0
Install mariadb database, if you have successfully installed MYSQL this step can be skipped (mariadb is a branch of MYSQL, with the same functions as MYSQL)
# yum install mariadb-server mariadb -y ##install mariadb database # systemctl start mariadb # systemctl enable mariadb
yadd yum li Zabbix wa idhhar an-nashr wa an-nizam al-mantiqyah
## yadd yum li Zabbix wa idhhar an-nashr wa an-nizam al-mantiqyah # rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm # yum install zabbix-server-mysql zabbix-web-mysql -y
idhhar ila mysql ila an-nashr wa an-nizam
# mysql ## idhhar ila mysql ila an-nashr wa an-nizam مرحبًا بك في مراقب MariaDB. أوامر تنتهي بـ ; أو \g. id tashkil al-mawadat ila MariaDB 3 Server version: 5.5.56-MariaDB MariaDB Server MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix#1235'; Query OK, 0 rows affected (0.00 sec)
yadd al-ma'adidat Zabbix ila mariadb
## yadd al-ma'adidat Zabbix ila mariadb # zcat /usr/share/doc/zabbix-server-mysql-3.4.4/create.sql.gz | mysql -uzabbix -pzabbix#1235 zabbix
al-farqahmawaddat Zabbix
# cp /etc/zabbix/zabbix_server.conf /etc/zabbix/zabbix_server.conf.1121 ## qabz al-fayl al-ghayr al-awwal # vim /etc/zabbix/zabbix_server.conf ## استخدام إعدادات الافتراضية، فقط تعيين كلمة المرور للبيانات الأساسية DBPassword=zabbix#1235 # vim /etc/httpd/conf.d/zabbix.conf ## تعديل منطقة الزمن الخاصة بـ apache zabbix php_value date.timezone Asia/Shanghai # cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bk # vim /etc/httpd/conf/httpd.conf ## Author : Leshami Listen 3080 ## يستخدم ميناء 80 غير القياسي ## Blog : http://blog.csdn.net/leshami
إطلاق الخدمات ذات الصلة
# systemctl start zabbix-server.service # systemctl enable zabbix-server.service # systemctl start httpd # systemctl enable httpd # netstat -nltp|egrep "zabbix|httpd|mysql" tcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 15720/zabbix_server tcp 0 0 0.0.0.0:3080 0.0.0.0:* LISTEN 15385/httpd tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 14146/mysqld tcp6 0 0 :::10051 :::* LISTEN 15720/zabbix_server
إعداد جدار الحماية
# firewall-cmd --add-port=3080/tcp --permanent ## إضافة ميناء WEB # firewall-cmd --add-port=10051/tcp --permanent ## إضافة ميناء zabbix_server # systemctl reload firewalld.service
النقطة السادسة:تثبيت وتكوين واجهة Zabbix
افتح المتصفح، أدخلhttp://IP:3080/zabbix
تكوين معلومات قاعدة بيانات Zabbix واسم المستخدم والمحفظة الخاصة بمدير Zabbix
تعيين IP، المنفذ والاسم لـ Zabbix الخادم
النقطة السابعة:تثبيت وتكوين Zabbix العميل
يمكن أيضًا مراقبة Zabbix الخادم نفسه. لمراقبة الذات، يجب تثبيت agent
للتنصيب على agent غير المضيف، يجب تكوين مصدر yum أولاً، ثم تثبيت agent وتعديل تكوين agent ليربط بخادم الخدمة
# yum install zabbix-agent -y # systemctl enable zabbix-agent.service تكوين agent [root@ydq-mnt zabbix]# vim /etc/zabbix/zabbix_agentd.conf Server=127.0.0.1,10.80.234.38 ServerActive=127.0.0.1,10.80.234.38 # systemctl start zabbix-agent.service
النقطة الثامنة: بعض الإشارات المهمة
1- قبل التثبيت، يُنصح بتكوين ملف /etc/hosts الخاص بالخادم والعميل، أي إضافة علاقة IP لمضيف الخادم والعميل إلى مضيف الحالي
2- استخدم اسم المضيف الموحد في ملفات التكوين الخاصة بالخادم وagent، مع الاعتراف بالحالة الكبيرة والصغيرة. وإلا يمكن أن يحدث أن لا يمكن الاتصال
3- فتح منافذ الحماية، لـ agent غير المحلي، افتح المنفذ 10050
إلى هنا تم تثبيت Zabbix 3.4 بشكل أساسي بنجاح، يمكنك العثور على استخدامات مفصلة على موقعنا