Linux Monitoring platform Introduction, Zabbix monitoring Introduction, installation Zabbix, forget admin password how to do

Source: Internet
Author: User
Tags mysql command line

Introduction to Linux Monitoring platform

Zabbix Monitoring Introduction


Zabbix He is also C/s architecture, there is a server and then go to the client to catch data, grasping data in the client must have a service to start, the service is to replicate the data collected, this data can be actively escalated to the service side, can also let the service side to connect the customer to capture this data, which means the client is divided into two modes , active mode and passive mode

Installing Zabbix



The experiment needs to prepare two machines, a service-side monitoring center, and a second customer-

Install Zabbix with yum, need to install Yum Source, visit official website download Yum Source, official website Www.zabbix.com/download

Two machines need to download after finding the download link on the website

[[email protected] ~]# wget https://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm

Install the RPM package after two machines have been downloaded

[[email protected] ~]# rpm -ivh zabbix-release-3.2-1.el7.noarch.rpm

Server Yum Installation Azbbix

[[email protected] ~]# yum install -y zabbix-agent zabbix-get zabbix-server-mysql zabbix-web zabbix-web-mysql

Client Installation Azbbix

[[email protected] ~]# yum install -y zabbix-agent

The server needs to install MySQL, which is not installed here.

Server-side edit MySQL configuration file, set the default character set, if not set the character set subsequent to set the Zabbix Web interface to Chinese will be problematic

[[email protected] ~]# vim /etc/my.cnf                  ##添加内容character_set_server = utf8

Restart under MySQL

[[email protected] ~]# systemctl restart mysql

The server enters the MySQL command line, creates the Zabbix library, creates the user

[[email protected] ~]# mysql -uroot -phanshuo1             ##进入数据库
mysql> create database zabbix character set utf8;     ##创建库的时候指定一下编码utf8
mysql> grant all on zabbix.* to ‘zabbix‘@‘127.0.0.1‘ identified by ‘han-zabbix‘;    ##创建用户这个用户是需要让web代码连接你的mysql,还有就是你的监控中心(zabbix 服务)他启动的前提也是需要能够连接你的mysql,客户端采集了数据,他需要把这些数据传递给服务端,这样数据才能用这个用户传递给服务端

Import raw data Without this data Zabbix can not work, can not be displayed under the Web interface,

[[email protected] ~]# cd /usr/share/doc/zabbix-server-mysql-3.2.11/   ##默认自带数据的目录

[[email protected] zabbix-server-mysql-3.2.11]# gzip -d create.sql.gz    ##解压create.sql.gz包

Then import the Create.sql file into the MySQL database

[[email protected] zabbix-server-mysql-3.2.11]# mysql -uroot -phanshuo1 zabbix < create.sql   

Start the Zabbix service

[[email protected] zabbix-server-mysql-3.2.11]# systemctl start zabbix-server

Start the httpd service

[[email protected] zabbix-server-mysql-3.2.11]# systemctl start httpd   ##启动这个的时候查看是否有占用80端口 [[email protected] zabbix-server-mysql-3.2.11]# systemctl enable httpd  ##开机启动httpd添加到开机启动列表[[email protected] zabbix-server-mysql-3.2.11]# systemctl enable zabbix-server     ##开机启动zabbix添加到开机启动列表  

Problem Zabbix display has started but port is not listening, troubleshooting
View Logs

[[email protected] ~]# less /var/log/zabbix/zabbix_server.log       ##日志路径

The above log shows that the error message is not connected to MySQL, which resolves into the MySQL configuration file to see

[[email protected] ~]# vim /etc/zabbix/zabbix_server.conf    ##进入配置文件后搜索DBHost,定义一些配置
DBHost=127.0.0.1      ##定义数据库的IPDBName=zabbix         DBUser=zabbixDBPassword=han-zabbix

After you change the configuration restart Zabbix

[[email protected] ~]# systemctl restart zabbix-server

Success

Configure the Web interface: The browser accesses the address of the 192.168.63.100/ZABBIX/Monitoring Center, which is configured under the Web interface Zabbix

Set PHP time zone

[[email protected] ~]# vim /etc/php.ini    ##php默认配置的路劲,进入设置时区/搜索timezone

Restart Apache after the definition is complete

Re-refresh the browser



Configuring the Client

Edit the Zabbix configuration file to add a whitelist IP to the client, specify the IP on the server, and do not see the data

[[email protected] ~]# vim /etc/zabbix/zabbix_agentd.conf



Start the client's Zabbix service

Forgot admin password how to do

Linux Monitoring platform Introduction, Zabbix monitoring Introduction, installation Zabbix, forget admin password how to do

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.