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