当前位置:网站首页>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
边栏推荐
- What are the advantages of building a private cloud platform?
- Hacking with Golang
- Explain thoroughly and learn rotten binary tree (4): storage structure of binary tree - build heap - Search - sort
- Technical dry goods | multi modal classification and recognition of audio-visual scenes in the stage of Tencent cloud smart media AI
- What is a domain name? How to use a domain name?
- How to register a Chinese domain name? Is it necessary to register a Chinese domain name?
- [Tencent cloud 818] cloud product time limited spike & lightweight application server lighthouse & how to get the most affordable?
- How to renew the domain name when it expires
- How to change the domain name and why to rush to register the domain name
- What is the JS interface security domain name? What are the common domain names
猜你喜欢
Learning routes and materials for cloud native O & M engineers
Easy to understand JDBC tutorial - absolutely suitable for zero Foundation

How should we learn cloud native in 2022?

Answer questions! This article explains the automated testing framework in software testing from beginning to end
What cloud native knowledge should programmers master?
随机推荐
What are the stages from tradition to Tencent cloud
Adobe international certification wants to design! Understanding the style guide is your best introduction design
How to register a secondary domain name? What are the precautions when registering?
Hacking with Golang
Why storage?
Net is what domain name? What is the standard of a good domain name?
Where does the website domain name buy a normal domain name? What is the approximate price
Lightweight toss plan 3, develop in the browser - build your own development bucket (Part 1)
How to build a website after successfully registering a domain name? Can I build a website without registering a domain name?
Go's package management learning notes
How do users purchase domain names? What should I pay attention to when buying a domain name?
How to apply for a primary domain name? Is primary domain name good or secondary domain name good?
What are the benefits of deploying a private cloud platform for the enterprise?
How to register domain name and web address? What is the domain name and URL?
How to register a company domain name how to build a website with a domain name
What is the JS interface security domain name? What are the common domain names
What is a top-level domain name? What are the classifications of a top-level domain name
What is primary domain name? What are the divisions of domain names
What is the website domain name and how to register the secondary domain name?
What domain name is better? What should I pay attention to when buying a domain name