此脚本是Zabbix_Agentd安装脚本,有需要朋友可以参考,脚本内容如下:
系统环境:CentOS 7.4
软件版本:4.4.3
[root@localhost ~]# vim auto_install_zabbix_agentd.sh
代码语言:javascript复制#!/bin/bash
#Date:2018-5-20 14:08:55
#Author Blog:
# https://www.yangxingzhen.com
#Author WeChat:
# 微信公众号:小柒博客
#Author mirrors site:
# https://mirrors.yangxingzhen.com
#About the Author
# BY:YangXingZhen
# Mail:xingzhen.yang@yangxingzhen.com
#Auto Install Zabbix_Agent
#Define Zabbix path variables
ZABBIX_URL=http://mirrors.yangxingzhen.com/zabbix
ZABBIX_FILES=zabbix-4.4.3.tar.gz
ZABBIX_FILES_DIR=zabbix-4.4.3
ZABBIX_PREFIX=/usr/local/zabbix
function Install_Zabbix_Agent (){
#Install Zabbix_Agent
if [ ! -d ${ZABBIX_PREFIX} ];then
#Install Package
yum -y install pcre pcre-devel libevent libevent-devel wget gcc gcc-c
wget -c ${ZABBIX_URL}/${ZABBIX_FILES}
tar xf ${ZABBIX_FILES}
cd ${ZABBIX_FILES_DIR}
./configure --prefix=${ZABBIX_PREFIX} --enable-agent
if [ $? -eq 0 ];then
make && make install
echo -e "