Gateway未来科技

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 109|回复: 0

centos系统一键安装zabbix客户端2023

[复制链接]

219

主题

229

帖子

884

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
884
发表于 2023-4-6 21:01:10 | 显示全部楼层 |阅读模式
yum -y install net-tools wget
cd /home
wget http://repo.zabbix.com/zabbix/5. ... .4-1.el7.x86_64.rpm
rpm -ivh zabbix-agent-5.4.4-1.el7.x86_64.rpm
    NETWORK_CARD_NAME=`ls /sys/class/net | grep -v "\`ls /sys/devices/virtual/net/\`"`
    for net_name in $NETWORK_CARD_NAME
    do
        possible_ip=`ifconfig $net_name | grep 'inet ' | sed 's/^.*inet //g' | sed 's/  netmask.*$//g'`
        if [ $possible_ip ]; then
            ip=$possible_ip
        fi
    done
sed -i 's/Server=127.0.0.1/Server=zaip.7iidc.com/g' /etc/zabbix/zabbix_agentd.conf
sed -i "s/Hostname=Zabbix server/Hostname=$ip/g" /etc/zabbix/zabbix_agentd.conf
systemctl restart zabbix-agent
systemctl enable zabbix-agent
systemctl stop firewalld.service
systemctl status firewalld.service
systemctl disable firewalld.service

------------------------------------------------------------------------

yum install wget

wget wget http://soft.7iidc.com/sh/za.sh
sh  za.sh

systemctl stop firewalld.service
systemctl status firewalld.service
systemctl disable firewalld.service

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Comsenz Inc.

GMT+8, 2024-12-23 07:26 , Processed in 0.074288 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc. Templated By 【未来科技 www.veikei.com】设计

快速回复 返回顶部 返回列表