zabbix monitoring deployment manual

Zabbix monitoring installation (you can build it successfully by following the document steps) The
document has been installed on the zabbix-server side. Later, I will write a monitoring client document. Welcome to collect.
##### When following the document deployment, be sure to read each word carefully. Be sure to have it (every word is important) #Private
reprint, please contact the blogger, otherwise the copyright must be investigated. There is WeChat under the copyright.
System environment: centos7

IP Node name
192.168.128.151 admin-zabbix

1. Modify the host name.
admin-zabbix node execution

[root@admin-zabbix ~]# hostnamectl set-hostname admin-zabbix

2. Turn off the firewall and selinux
admin-zabbix node execution

[root@admin-zabbix ~]#systemctl stop firewalld
[root@admin-zabbix ~]#systemctl disable firewalld
[root@admin-zabbix ~]#setenforce 0

3. Install the yum source code repository configuration package and install zabbix. (There may be an error, I marked it out on the
spot ) admin-zabbix node execution

[root@admin-zabbix ~]# rpm -ivh http://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm  ##在这一步如果报错的话执行下面命令
[root@admin-zabbix ~]# rpm -ivh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm##上面如果为报错不用执行
[root@admin-zabbix ~]# yum -y install yum-utils   ##如果在这一步报错的话执行下面操作
修改/etc/yum.repos.d/zabbix.repo 文件成如下内容
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=https://repo.zabbix.com/zabbix/4.0/rhel/7/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591

[zabbix-non-supported]
name=Zabbix Official Repository non-supported - $basearch
baseurl=https://repo.zabbix.com/non-supported/rhel/7/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
gpgcheck=1
[root@admin-zabbix ~]# yum -y install yum-utils
[root@admin-zabbix ~]# yum-config-manager --enable rhel-7-server-optional-rpms
##安装 Zabbix server
[root@admin-zabbix ~]# yum install zabbix-server-mysql -y
##安装 Zabbix proxy 并使用 MySQL 数据库
[root@admin-zabbix ~]# yum install zabbix-proxy-mysql -y
[root@admin-zabbix ~]# yum -y install mariadb-server
##安装 Zabbix 前端
[root@admin-zabbix ~]# yum install zabbix-web-mysql -y
[root@admin-zabbix ~]# yum -y install httpd

4. Set up database remote login authorization and import database files.
admin-zabbix node execution

[root@admin-zabbix ~]# systemctl restart mariadb
[root@admin-zabbix ~]# gunzip /usr/share/doc/zabbix-server-mysql-4.0.27/create.sql.gz
[root@admin-zabbix ~]# mysql                                   
MariaDB [zabbix]> create database zabbix character set utf8 collate utf8_bin;##这里注意一定要设置utf8_bin 要不然后期会出错
MariaDB [(none)]> grant all  PRIVILEGES on zabbix.* to zabbix@'%' IDENTIFIED BY 'zabbix';
MariaDB [(none)]> flush privileges;
[root@admin-zabbix ~]# mysql -h 192.168.182.151 -uzabbix -pzabbix
MariaDB [zabbix]> use zabbix
MariaDB [zabbix]> source /usr/share/doc/zabbix-server-mysql-4.0.27/create.sql

5. Configure the database for zabbix server/proxy.
admin-zabbix node execution
Use vim to modify the configuration file /etc/zabbix/zabbix_server.conf
##Below I marked the line number and modify it to be the same, so you can keep other configurations as default (do not write the line number)

 91行 DBHost=192.168.182.151
 100行 DBName=zabbix
 116行 DBUser=zabbix
 124行 DBPassword=zabbix

6. Start the zabbix-server process and turn on automatic startup.
admin-zabbix node execution

[root@admin-zabbix ~]# systemctl start  zabbix-server.service
[root@admin-zabbix ~]# systemctl enable  zabbix-server.service 

7. Configure the front-end web configuration file.
admin-zabbix node execution
Use vim to modify the configuration file /etc/httpd/conf.d/zabbix.conf.
##Below I marked the line number and modify it to be the same, so you can keep other configurations as default (do not write the line number)

  20行         php_value date.timezone Asia/Shanghai
  [root@admin-zabbix ~]# systemctl start  httpd

8. Open the browser and enter the admin-zabbix node address.
Click Next stop to
Insert picture description here
check permissions issues (there will be no permissions issues, just click Next stop directly) and click Next stop.
Insert picture description here
Enter the required database information (to match the previous one, if it is done according to the document, there is no problem).

It is not necessary to enter the host name and port name. Click Next stop.

Insert picture description here
Click Next stop directly.
Insert picture description here
Click Finish. The question is that we have successfully installed and written a file
Insert picture description here
. The default user name of zabbix on the web side is Admin and the password is zabbix (note that the user name is a capital A).
Insert picture description here
Now we can see the web interface.
Insert picture description here
Here our zabbix monitoring system is installed

Email alarm document link https://blog.csdn.net/zeorg/article/details/112128191

The document parameters come from the official document (https://www.zabbix.com) If there is any infringement, please contact the blogger to delete
wx: a1362623821

Guess you like

Origin blog.csdn.net/zeorg/article/details/111937751