零基础搭建Zabbix,简单易懂

zabbix监控

部署zabbix5.0服务端
1.准备机器,环境进行初始化
#关闭防火墙服务
systemctl stop firewalld
#修改安全策略
sed -i 's/SELINUX=enforcing/SELINUX=disabled/'   /etc/selinux/config
systemctl disable --now firewalld

2.获取zabbix下载源
rpm -Uvh https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm

3.更换zabbix.repo源为阿里的
sed -i 's#http://repo.zabbix.com#https://mirrors.aliyun.com/zabbix#'  /etc/yum.repos.d/zabbix.repo

4.清空缓存,下载zabbix服务器
yum clean all
yum makecache

yum install zabbix-server-mysql zabbix-agent -y

5.安装工具,可以在机器上,使用多个版本的软件,并且不会影响到整个系统的依赖环境
yum install centos-release-scl -y

6.修改zabbix-front前端源,修改以下参数
[zabbix-frontend]
name=Zabbix Official Repository frontend - $basearch
baseurl=https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/$basearch/frontend
enabled=1	#开启这里的参数
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591

7.安装zabbix前端环境,且是安装到scl环境下
yum install zabbix-web-mysql-scl zabbix-apache-conf-scl -y

8.安装zabbix所需要的数据库,mariadb
    yum install mariadb-server -y

9.配置数据库,开机启动
[root@root yum.repos.d]# systemctl enable --now mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.

10.初始化数据库
[root@root yum.repos.d]# mysql_secure_installation 
y , n ,y ,y

11.添加数据库用户,以及zabb
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值