29
2020
11
15:00:50

Centos7部署安装zabbix5.0

首先确保关闭防火墙和selinux:

systemctl stop firewalld

setenforce 0

服务器配置:

Server IP :

Disk : 25 GB

RAM : 1GB

vCPU : 2

Service : ZABBIX 5.0

Web : Apache

Database : Mariadb

Php : 7.2 must

User Name : Admin [‘A’一定大写]

Password : zabbix

第一步:检查服务器IP地址

[root@Zabbix-Srv ~]# cat /etc/redhat-release

[root@Zabbix-Srv ~]# ip r

[root@Zabbix-Srv ~]# yum install epel-release -y

[root@Zabbix-Srv ~]# yum -y update

第二步:从官网下载zabbix 5.0 repo

[root@Zabbix-Srv ~]# rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm

[root@Zabbix-Srv ~]# yum clean all

[root@Zabbix-Srv ~]# yum install zabbix-server-mysql zabbix-agent

[root@Zabbix-Srv ~]# yum install centos-release-scl

编辑[zabbix+frontend]

[root@Zabbix-Srv ~]# vi /etc/yum.repos.d/zabbix.repo

Change enable=0 to enable=1

[zabbix+frontend]

enabled=1

然后保存

第三步:安装zabbix web mysql和mariadb数据库

[root@Zabbix-Srv ~]# yum install zabbix-web-mysql-scl zabbix-apache-conf-scl

[root@Zabbix-Srv ~]# yum -y install mariadb-server

[root@Zabbix-Srv ~]# systemctl start mariadb

[root@Zabbix-Srv ~]# systemctl enable mariadb

创建zabbix 数据库并导入默认数据库

[root@Zabbix-Srv ~]# mysql -u root -p

After mysql terminal then run below command.

MariaDB [(none)] create database zabbix character set utf8 collate utf8_bin;

MariaDB [(none)] create user zabbix@localhost identified by 'zabbix';

MariaDB [(none)] grant all privileges on zabbix.* to zabbix@localhost;

MariaDB [(none)] flush privileges;

MariaDB [(none)] \q

Import default Zabbix 5.0 database using below command. Run this command then type password for zabbix

[root@Zabbix-Srv ~]# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix

第四步:修改zabbix服务器配置文件

[root@Zabbix-Srv ~]# vi /etc/zabbix/zabbix_server.conf

Edit below details into conf file. If this is missing so you can’t start Zabbix service.

DBName=zabbix

DBUser=zabbix

DBPassword=123456

第五步:开启zabbix相关服务

[root@Zabbix-Srv ~]# systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm

[root@Zabbix-Srv ~]# systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm

第六步:点击下一步来完成web安装

浏览器输入:http://ip/zabbix

 

点击下一步:

 
 
 
 
 
 

根据提示,点击下一步完成安装。

登录用户名:Admin

密码:zabbix




推荐本站淘宝优惠价购买喜欢的宝贝:

image.png

本文链接:https://hqyman.cn/post/1516.html 非本站原创文章欢迎转载,原创文章需保留本站地址!

分享到:
打赏





休息一下~~


« 上一篇 下一篇 »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

请先 登录 再评论,若不是会员请先 注册

您的IP地址是: