您的位置:首页 > 运维架构 > Linux

centos7 安装zabbix-agent

2016-06-22 15:23 495 查看
关闭selinux

sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config
setenforce 0
防火墙设置
允许zabbix-agent的10050端口通过

firewall-cmd --permanent --add-port=10050/tcpfirewall-cmd --reload

安装zabbix 软件源

rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-2.4-1.el7.noarch.rpm

安装zabbix-agent

yum install -y zabbix-sender zabbix-agent zabbix
sed -i "s/Server=127.0.0.1/Server=10.0.0.101/" /etc/zabbix/zabbix_agentd.conf
后面的ip地址为zabbix服务端的主机ip地址
sed -i "s/ServerActive=127.0.0.1/ServerActive=10.0.0.101/" /etc/zabbix/zabbix_agentd.conf
后面的ip地址为zabbix服务端的主机ip地址
sed -i "s/Hostname=Zabbix server/Hostname=10.0.0.105/" /etc/zabbix/zabbix_agentd.conf
后面的ip地址为zabbix客户端的主机ip地址

启动并设置开机自启

systemctl restart zabbix-agent.service
systemctl enable zabbix-agent.service
最后一步,验证10050端口是否打开
netstat -tlnp | grep 10050
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  zabbix agent centos7