当前位置:网站首页>Build ZABBIX on Tencent ECS
Build ZABBIX on Tencent ECS
2022-06-24 05:41:00 【User 8639654】
zabbix install
One 、 Introduce the main version
1.8 I began to know 2.0 2.2LTS hot 2.4 3.0 LTS 3.2 The standard version 3.4 The standard version 4.0 LTS 4.2 The standard version 4.4 The standard version 5.0 LTS LTS: Long term support About five years The standard version : Support for seven months
Two 、 Learning Planning
1、 Learning version
Study 4.0 edition , because 4.0 Is one of the long supported versions , Relatively new , Enterprises often use . When you have finished learning 4.0 To 5.0 The upgrade .
2、 learning environment
host :zabbix ip: 10.0.0.71 Operating system version :centos 7.6
3、 ... and 、zabbix Production environment installation
1、 To configure yum Source
1) download zabbix yum Warehouse
Method 1
rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-2.el7.noarch.rpm yum clean all
Method 2
wget https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-2.el7.noarch.rpm rpm -ivh zabbix-release-4.0-2.el7.noarch.rpm yum clean all
2) modify zabbix yum Source
all gpgcheck Set to 0
[[email protected] ~]# vim /etc/yum.repos.d/zabbix.repo [zabbix] name=Zabbix Official Repository - $basearch baseurl=http://repo.zabbix.com/zabbix/4.0/rhel/7/$basearch/ enabled=1 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591 [zabbix-debuginfo] name=Zabbix Official Repository debuginfo - $basearch baseurl=http://repo.zabbix.com/zabbix/4.0/rhel/7/$basearch/debuginfo/ enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591 gpgcheck=0 [zabbix-non-supported] name=Zabbix Official Repository non-supported - $basearch baseurl=http://repo.zabbix.com/non-supported/rhel/7/$basearch/ enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX gpgcheck=0
2、 install zabbix The server , front end , agent , database , client
[[email protected] ~]# yum install -y zabbix-server-mysql zabbix-web-mysql [[email protected] ~]# yum install -y mariadb-server.x86_64 [[email protected] ~]# yum install zabbix-agent.x86_64 -y
3、 Start the database and set the startup self startup
[[email protected] ~]# systemctl start mariadb.service [[email protected] ~]# systemctl enable mariadb.service
4、mariadb Security Configuration Wizard
[[email protected] ~]# mysql_secure_installation Enter current password for root (enter for none): Database password , Just downloaded , No password by default , Directly enter Set root password? [Y/n] Whether to set user password ,y Set the password Remove anonymous users? [Y/n] Whether to delete anonymous users ,y Disallow root login remotely? [Y/n] Whether to ban root User remote login ,y Remove test database and access to it? [Y/n] Whether to delete the..., which can be accessed by anyone text Test library ,y Reload privilege tables now? [Y/n] Reload authorization table ,y
5、 Confirm deletion , Authorized success
[[email protected] ~]# mysql -p Enter password: MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | +--------------------+ 3 rows in set (0.00 sec) MariaDB [(none)]> select user,host from mysql.user; +------+-----------+ | user | host | +------+-----------+ | root | 127.0.0.1 | | root | ::1 | | root | localhost | +------+-----------+
6、mariadb establish zabbix library , And authorize
[[email protected] ~]# mysql -p Enter password: Building database MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin; to grant authorization MariaDB [(none)]> grant all on zabbix.* to [email protected] identified by '123456';
7、 Import initial data
1) Find the initial data location
[[email protected] ~]# rpm -ql zabbix-server-mysql |grep create.sql /usr/share/doc/zabbix-server-mysql-4.0.29/create.sql.gz
2) Import initial data
[[email protected] ~]# zcat /usr/share/doc/zabbix-server-mysql-4.0.29/create.sql.gz | mysql -uzabbix -p123456 zabbix No need to look for generic commands zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p123456 zabbix
3) Check whether the import is successful
MariaDB [(none)]> use zabbix MariaDB [zabbix]> show tables; or [[email protected] ~]# mysql zabbix -p -e 'show tables'; Enter password:
8、 To configure zabbix server Configuration file for
Modify the following information [[email protected] ~]# vim /etc/zabbix/zabbix_server.conf DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=123456
9、 start-up zabbix server And add boot - up
[[email protected] ~]# systemctl start zabbix-server.service [[email protected] ~]# systemctl enable zabbix-server.service
10、 confirm zabbix Server started successfully
[[email protected] ~]# netstat -lntup Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 2210/mysqld tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1400/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1561/master tcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 18523/zabbix_server tcp6 0 0 :::22 :::* LISTEN 1400/sshd tcp6 0 0 ::1:25 :::* LISTEN 1561/master tcp6 0 0 :::10051 :::* LISTEN 18523/zabbix_server
11、 To configure zabbix web(httpd) The configuration file
[[email protected] ~]# vim /etc/httpd/conf.d/zabbix.conf php_value date.timezone Asia/Shanghai or [[email protected] ~]# vim /etc/php.ini date.timezone = Asia/Shanghai
12、 start-up httpd, And add boot - up
[[email protected] ~]# systemctl start httpd.service [[email protected] ~]# systemctl enable httpd.service Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/sys
边栏推荐
- How to renew the domain name when it expires
- How to check the domain name of the website? Are there any skills to speak of
- What is the website domain name and how to register the secondary domain name?
- What if the domain name is blocked? What can I do to quickly unseal?
- Disaster recovery series (III) -- cloud network disaster recovery construction
- 3D visualization of smart dam
- It is necessary to do the industry of waiting insurance evaluation. Let's see if you are on the list
- Wang Wei, senior architect of coding Devops, was selected as the first batch of tutors in Mulan open source community
- Technical dry goods | understand go memory allocation
- How to buy a website domain name? How to choose a website domain name?
猜你喜欢
What cloud native knowledge should programmers master?

Answer questions! This article explains the automated testing framework in software testing from beginning to end
Learning routes and materials for cloud native O & M engineers

How should we learn cloud native in 2022?
Easy to understand JDBC tutorial - absolutely suitable for zero Foundation
随机推荐
How to buy a website domain name? How to select a website domain name?
How to renew the domain name when it expires
How to register a secondary domain name? What are the precautions when registering?
Distributed background task load balancing
Pylin tool usage
What domain name is Io? The role of domain name for web address
How enterprises overcome the data security barrier with the imminent implementation of the new law | interview with think tank on industrial security concept
What is the third level domain name? How to choose a domain name agent
How to build a website after successfully registering a domain name? Can I build a website without registering a domain name?
Hacking with Golang
What is domain name filing? What is the role of domain name filing?
Easy to understand JDBC tutorial - absolutely suitable for zero Foundation
Spirit breath development log (8)
What is a domain name address? What is the reason for using a domain name address?
How to buy a domain name? What should I pay attention to when buying a domain name?
How to make a secondary domain name? What is the purpose of a secondary domain name?
Youtech sharing | the application of Tencent Youtu multimodal graphic content identification and positioning in content security
What cloud native knowledge should programmers master?
PV and PVC analysis and use in kubernetes
What is domain name resolution? How much does domain name registration cost