1.关闭防火墙
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
systemctl disable --now firewalld
2.注意时间正确
yum install ntpdate -y
ntpdate -u ntp.aliyun.com
3.时区的统一
mv /etc/localtime{,.bak}
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
4.部署流程:
rpm -Uvh https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
sed -i 's#http://repo.zabbix.com#https://mirrors.aliyun.com/zabbix#' /etc/yum.repos.d/zabbix.repo
yum install zabbix-agent2 -y
5.查看命令
ls -l /usr/sbin/zabbix_agent2
-rwxr-xr-x. 1 root root 17608104 Apr 26 16:27 /usr/sbin/zabbix_agent2
6.启动客户端
systemctl enable --now zabbix-agent2
7.配置agent2配置文件
vi /etc/zabbix/zabbix_agent2.conf
Server=192.168.3.80(Server端IP)
ServerActive=192.168.3.80(Server端IP)
Hostname=oracle11g(主机的名字)
显示刚刚修改的内容命令
grep -Ev '^#|^$' /etc/zabbix/zabbix_agent2.conf
8.最后重启
systemctl restart zabbix-agent2