# 具体报错信息
failure: repodata/4bb73bd0742c638c3cd1e73a5f3dc8838c7b0d693c9f50b7ed8266c3e83308d3-filelists.sqlite.bz2 from zabbix: [Errno 256] No more mirrors to try.
http://zabbix.yanba.com/zabbix-files/zabbix-rpm/7/x86_64/repodata/4bb73bd0742c638c3cd1e73a5f3dc8838c7b0d693c9f50b7ed8266c3e83308d3-filelists.sqlite.bz2: [Errno 14] HTTP Error 404 - Not Found
# 处理方法
yum clean all
yum install zabbix-agent2 -y
# 具体报错信息
File "/usr/bin/yum", line 30
except KeyboardInterrupt, e:
^
SyntaxError: invalid syntax
# 处理方法:yum 是采用 Python 作为命令解释器,CentOS 自带的 Python 解释器是 Python2.7,但是自己安装了 Python 3.7,所以系统解释不了 yum 命令。
修改 /usr/bin/yum 文件中的第一行为 : #!/usr/bin/python2.7
# 具体报错信息
不能ping zabbix.yanba.com,telnet 80端口也不通
# 处理方法
iptables -I OUTPUT 1 -d zabbix_ip -j ACCEPT
service iptables save
# 具体报错信息
rpmdb: Thread/process 15613/139783923541760 failed: Thread died in Berkeley DB library
error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 - (-30974)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:
Error: rpmdb open failed
# 处理方法
rm -rf /var/lib/rpm/__db*
yum clean all
yum install zabbix-agent2 -y
# 具体报错信息如下还会有一个go字眼的报错
-bash: fork: Cannot allocate memory
# 处理方法
sysctl kernel.pid_max # 查看系统最大进程数
ps -eLf | wc -l # 查看系统占用最大进程数
echo 1000000 > /proc/sys/kernel/pid_max #修改最大进程数,临时修改,重启后回失效
echo "kernel.pid_max=1000000 " >> /etc/sysctl.conf && sysctl -p #修改最大进程数,永久修改
# 具体报错信息
error: Failed dependencies: libpcre.so.0()(64bit) is needed by zabbix-agent-5.2.1-1.el6.x86_64
# 处理方法
用《yum方法安装》,如果安装不成功再用《tar包安装》
# yum方法安装脚本
# tar包安装脚本
# 如果是其他机房可以用以下方式安装
yum install -y http://repo.zabbix.com/zabbix/5.2/rhel/7/x86_64/zabbix-agent2-5.2.1-1.el7.x86_64.rpm
tar xf zabbix.tar.gz
cp -a zabbix /etc/
wget -c http://zabbix.yanba.com/zabbix-files/zabbix-rpm/ubuntu/zabbix-agent2_5.2.1-1%2Bubuntu18.04_amd64.deb
mkdir -p /etc/zabbix/
wget -SO /etc/zabbix/zabbix_agent2.conf http://zabbix.yanba.com/zabbix-files/zabbix-rpm/ubuntu/zabbix_agent2.conf
apt-get install dpkg && dpkg -i zabbix-agent2_5.2.1-1+ubuntu18.04_amd64.deb && rm -f zabbix-agent2_5.2.1-1+ubuntu18.04_amd64.deb
/etc/init.d/zabbix-agent2 restart && netstat -lntup|grep 100 && tail -100f /var/log/zabbix/zabbix_agent2.log
cd /tmp/
wget -c http://zabbix.yanba.com/zabbix-files/zabbix-rpm/suse15/zabbix-agent2-5.2.1-1.sles15.x86_64.rpm
# 或者从官网下载:
wget -c https://repo.zabbix.com/zabbix/5.2/sles/15/x86_64/zabbix-agent2-5.2.1-1.sles15.x86_64.rpm
zypper install zabbix-agent2-5.2.1-1.sles15.x86_64.rpm
# 备注:install后有的机器会一直提示《正在检索软件源》,等待5-10分钟即可。
输入 y 输入 i
wget -c http://zabbix.yanba.com/zabbix-files/conf/zabbix-agent-conf.tar.gz
tar xf zabbix-agent-conf.tar.gz
cp -a zabbix /etc/
systemctl restart zabbix-agent2.service
systemctl enable zabbix-agent2.service
ps aux|grep zabbix
LogFile=C:\Program Files\Zabbix Agent 2\zabbix_agent2.log
Server=zabbix-server-in.yanba.com
ServerActive=zabbix-server-in.yanba.com
Hostname=srm-kvm-02.yanba.com
ControlSocket=\\.\pipe\agent.sock
cd C:\Program Files\Zabbix Agent 2
zabbix_agentd2.exe -s -c zabbix_agentd2.conf
netstat -an | findstr 100
cd /tmp/
wget -c http://zabbix.yanba.com/zabbix-files/zabbix-rpm/debian/zabbix-agent2_5.2.1-1+debian9_amd64.deb
或者从官网下载:
dpkg -i zabbix-agent2_5.2.1-1+debian9_amd64.deb
wget -SO /etc/zabbix/zabbix_agent2.conf http://zabbix.yanba.com/zabbix-files/zabbix-rpm/ubuntu/zabbix_agent2.conf
/etc/init.d/zabbix-agent2 start &
ss -lntup|grep 100
由于官网没有 对应的包,所以使用zabbix_agent代替
wget -c http://zabbix.yanba.com/zabbix-files/zabbix-rpm/ubuntu/zabbix-agent_5.2.1-1+ubuntu16.04_amd64.deb mkdir -p /etc/zabbix/ /etc/zabbix/scripts/base/ && useradd -s /sbin/nologin zabbix && echo "zabbix ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/90-cloud-init-users wget -SO /etc/zabbix/zabbix_agentd.conf http://zabbix.yanba.com/zabbix-files/zabbix-rpm/ubuntu/zabbix_agentd.conf
wget -SO /etc/zabbix/zabbix_agentd.d/common.userparams.conf http://zabbix.yanba.com/zabbix-files/zabbix-rpm/ubuntu/common.userparams.conf
wget -SO /etc/zabbix/scripts/base/tcp_connection_status.sh http://zabbix.yanba.com/zabbix-files/zabbix-rpm/ubuntu/tcp_connection_status.sh && chmod +x /etc/zabbix/scripts/base/tcp_connection_status.sh
apt-get --fix-broken install && apt-get install dpkg && dpkg -i zabbix-agent_5.2.1-1+ubuntu16.04_amd64.deb
systemctl start zabbix-agent && systemctl enable zabbix-agent && tail -100f /var/log/zabbix/zabbix_agentd.log
手机扫一扫
移动阅读更方便
你可能感兴趣的文章