当前位置:网站首页>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 do users in the insurance upgrade industry choose?
- [competition experience sharing] a problem-solving summary of the whole DFS (internal track)
- What is a first level domain name? What are the steps to purchase a primary domain name?
- How to get a secondary domain name? What does a secondary domain name mean?
- Technical dry goods | multi modal classification and recognition of audio-visual scenes in the stage of Tencent cloud smart media AI
- 2021, how to select a programming language?
- It is necessary to do the industry of waiting insurance evaluation. Let's see if you are on the list
- How to use a Chinese domain name? Would you prefer a Chinese domain name or an English domain name?
- Netaapp data recovery process
- Massif tool of Valgrind
猜你喜欢

How should we learn cloud native in 2022?
Learning routes and materials for cloud native O & M engineers
What cloud native knowledge should programmers master?

Answer questions! This article explains the automated testing framework in software testing from beginning to end
Easy to understand JDBC tutorial - absolutely suitable for zero Foundation
随机推荐
What kind of intelligent connection design do we need in an interconnected society?
How to buy a domain name? Do you need to file a domain name purchase?
What domain name is top? What are the advantages of the top domain name?
Oceanus practice consumption CMQ subject model data source
How to get a secondary domain name? What does a secondary domain name mean?
Massif tool of Valgrind
How to resolve Chinese domain names? What is domain name resolution?
[JS reverse hundred examples] Dangle login interface parameters reverse
His secret script of hard technology investment
Netaapp data recovery process
Adobe international certification wants to design! Understanding the style guide is your best introduction design
[Tencent cloud] enterprise micro marketing, private domain traffic value growth and operation efficiency improvement
Where to check the computer domain name and where to buy the domain name is more reliable
What is the relationship between IP address and domain name? How to select a domain name?
Wang Wei, senior architect of coding Devops, was selected as the first batch of tutors in Mulan open source community
Why storage?
What is the website domain name and how to register the secondary domain name?
What domain name is cheap? How much does it cost to register a domain name?
What is the domain name system? What are the effects of domain names on Enterprises
How to apply for a primary domain name? Is primary domain name good or secondary domain name good?