当前位置:网站首页>ZABBIX monitoring system deployment
ZABBIX monitoring system deployment
2022-07-04 07:40:00 【Embrace cloud primordial】
zabbix Program components
zabbix The components are :
- Zabbix_server, Server daemons .
- Zabbix_agentd,agent Daemon
- zabbix_proxy, proxy server
- zabbix_database, The storage system ,mysql,pgsql
- Zabbix_web,web GUI Graphical interface
- Zabbix_get, Command line tools , Test direction agent Initiate data collection request .
- Zabbix_sender, Command line tools , Test direction server send data
- Zabbix_java_gateway,java gateway
zabbix Server deployment
zabbix5.0 Version pair php Version requirements , Is the minimum 7.2.0 edition ; Yes php The extension component version also has requirements , See the official documents for details
https://www.zabbix.com/documentation/5.0/zh/start
Get one ready Linux The server , Set it up IP Address ,yum Source, etc
1. Set host name
[[email protected] ~]# hostnamectl set-hostname server
[[email protected] ~]# hostname
server
2. Turn off firewall ,selinux
[[email protected] ~]# systemctl stop firewalld && systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[[email protected] ~]# setenforce 0
[[email protected] ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
3.zabbix-server Try to have more memory ,4G For good ( following 2G)
[[email protected] ~]# free -m
total used free shared buff/cache available
Mem: 1980 120 1446 9 414 1661
Swap: 2047 0 2047
4. obtain zabbix Download source
rpm -Uvh https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
5. Replace zabbix.repo From Ali
sed -i 's#http://repo.zabbix.com#https://mirrors.aliyun.com/zabbix#' /etc/yum.repos.d/zabbix.repo
6. Empty yum Source cache , Generate new cache
yum clean all
yum makecache
7. install zabbix server and agent
yum install -y zabbix-server-mysql zabbix-agent
8. install Software Collections, It is convenient for later installation of higher version of php, Default yum install php Version is 5.4 too low ;SCL(Software Collections) You can install and use multiple versions of software on the same operating system , Without affecting the installation package of the whole system ; The package will be installed in /opt/rh Under the table of contents ;/etc/opt/rh/ All configuration files of the software package are stored in the corresponding directory in the directory
[[email protected] ~]# yum install -y centos-release-scl
9. stay zabbix.repo Source on zabbix-front Front end source
[zabbix-frontend]
name=Zabbix Official Repository frontend - $basearch
baseurl=https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/$basearch/frontend
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
10. install zabbix Front end environment , And it is installed in scl In the environment
[[email protected] ~]# yum install -y zabbix-web-mysql-scl zabbix-apache-conf-scl
11. install azbbix The required database ,mariadb/mysql
[[email protected] ~]# yum install mariadb-server -y
12. Configure the database startup
[[email protected] ~]# systemctl enable --now mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
13. Initialize the database and set root password
[[email protected] ~]# mysql_secure_installation
14. Add database users and zabbix Required database information
[[email protected] ~]# mysql -uroot -pqhj666
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> create user [email protected] identified by 'qhj666';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> grant all on zabbix.* to [email protected];
Query OK, 0 rows affected (0.00 sec)
15. Use zabbix-mysql command , Import database information ( here -p What is specified later is zabbix database )
[[email protected] ~]# zcat /usr/share/doc/zabbix-server-mysql-5.0.11/create.sql.gz | mysql -uzabbix -p zabbix
Enter password:
16. modify zabbix server The configuration file , Change the password of the database
[[email protected] ~]# grep "^DBP" /etc/zabbix/zabbix_server.conf
DBPassword=qhj666
17. modify zabbix Of php The configuration file
[[email protected] ~]# tail -1 /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
php_value[date.timezone] = Asia/Shanghai
18. start-up zabbix Related services
[[email protected] ~]# systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
[[email protected] ~]# systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm
19. Browser Test Access zabbix( Default account Admin, password zabbix)
192.168.10.50/zabbix
After deployment
Use browser access :http://192.168.10.50/zabbix
Default password :Admin/zabbix
边栏推荐
- Computer connects raspberry pie remotely through putty
- Go learning notes - constants
- 【FreeRTOS】FreeRTOS學習筆記(7)— 手寫FreeRTOS雙向鏈錶/源碼分析
- MYCAT middleware installation and use
- Basic DOS commands
- [kubernetes series] kubesphere is installed on kubernetes
- L1-025 positive integer a+b (15 points)
- JVM中堆概念
- Introduction to rce in attack and defense world
- When JDBC connects to es query, is there a God who meets the following situation?
猜你喜欢
果果带你写链表,小学生看了都说好
This monitoring system can monitor the turnover intention and fishing all, and the product page has 404 after the dispute appears
Routing decorator of tornado project
Oceanbase is the leader in the magic quadrant of China's database in 2021
win10微软拼音输入法输入文字时候下方不出现中文提示
[Mori city] random talk on GIS data (I)
深入浅出:了解时序数据库 InfluxDB
Zephyr learning notes 1, threads
Zephyr 學習筆記2,Scheduling
JVM -- class loading process and runtime data area
随机推荐
Project 1 household accounting software (goal + demand description + code explanation + basic fund and revenue and expenditure details record + realization of keyboard access)
PCIe knowledge points -010: where to get PCIe hot plug data
Label management of kubernetes cluster
Directory of tornado
Linear algebra 1.1
2022-021ARTS:下半年开始
在所有SwiftUI版本(1.0-4.0)中原生实现Charts图表视图之思路
OKR vs. KPI 一次搞清楚这两大概念!
时序数据库 InfluxDB 2.2 初探
促进OKR落地的工作总结该如何写?
Zephyr study notes 2, scheduling
Rhcsa the next day
Preliminary study on temporal database incluxdb 2.2
Experience installing VMware esxi 6.7 under VMware Workstation 16
The IP bound to the socket is inaddr_ The meaning of any htonl (inaddr_any) (0.0.0.0 all addresses, uncertain addresses, arbitrary addresses)
[freertos] freertos Learning notes (7) - written freertos bidirectionnel Link LIST / source analysis
Would you like to go? Go! Don't hesitate if you like it
Summary of MySQL common judgment functions!! Have you used it
Blue Bridge Cup Quick sort (code completion)
OKR vs. KPI figure out these two concepts at once!