updated to Zabbix 6 and added Debian 9 OS
This commit is contained in:
@@ -34,9 +34,17 @@ ZABBIX_SERVER="gauntzabbix.home.johnhgaunt.com, 10.0.10.16"
|
||||
|
||||
if [ ${OS} == 'Debian' ]; then
|
||||
# Install the repository configuration package. This package contains apt (software package manager) configuration files.
|
||||
if [[ ${OS_VER} =~ ^9.* ]]; then
|
||||
wget -P /tmp/ https://repo.zabbix.com/zabbix/6.0/debian/pool/main/z/zabbix-release/zabbix-release_6.0-1+debian9_all.deb
|
||||
dpkg -i /tmp/zabbix-release_6.0-1+debian9_all.deb
|
||||
fi
|
||||
if [[ ${OS_VER} =~ ^10.* ]]; then
|
||||
wget -P /tmp/ https://repo.zabbix.com/zabbix/5.0/debian/pool/main/z/zabbix-release/zabbix-release_5.0-1+buster_all.deb
|
||||
dpkg -i /tmp/zabbix-release_5.0-1+buster_all.deb
|
||||
wget -P /tmp/ https://repo.zabbix.com/zabbix/6.0/debian/pool/main/z/zabbix-release/zabbix-release_6.0-1+debian10_all.deb
|
||||
dpkg -i /tmp/zabbix-release_6.0-1+debian10_all.deb
|
||||
fi
|
||||
if [[ ${OS_VER} =~ ^11.* ]]; then
|
||||
wget -P /tmp/ https://repo.zabbix.com/zabbix/6.0/debian/pool/main/z/zabbix-release/zabbix-release_6.0-1+debian11_all.deb
|
||||
dpkg -i /tmp/zabbix-release_6.0-1+debian11_all.deb
|
||||
fi
|
||||
# update the cache
|
||||
apt update
|
||||
@@ -49,8 +57,12 @@ if [ ${OS} == 'Debian' ]; then
|
||||
elif [ ${OS} == 'Ubuntu' ]; then
|
||||
# Install the repository configuration package. This package contains apt (software package manager) configuration files.
|
||||
if [[ ${OS_VER} =~ 20.04 ]]; then
|
||||
wget -P /tmp/ https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.0-1+focal_all.deb
|
||||
dpkg -i /tmp/zabbix-release_5.0-1+focal_all.deb
|
||||
wget -P /tmp/ https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-1+ubuntu20.04_all.deb
|
||||
dpkg -i /tmp/zabbix-release_6.0-1+ubuntu20.04_all.deb
|
||||
fi
|
||||
if [[ ${OS_VER} =~ 22.04 ]]; then
|
||||
wget -P /tmp/ https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-2+ubuntu22.04_all.deb
|
||||
dpkg -i /tmp/zabbix-release_6.0-2+ubuntu22.04_all.deb
|
||||
fi
|
||||
# update the cache
|
||||
apt update
|
||||
@@ -60,12 +72,12 @@ elif [ ${OS} == 'Ubuntu' ]; then
|
||||
elif [ ${OS} == 'CentOS' ]; then
|
||||
# Install the repository configuration package. This package contains yum (software package manager) configuration files.
|
||||
if [ ${OS_VER} == 7 ]; then
|
||||
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
|
||||
rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/7/x86_64/zabbix-release-6.0-1.el7.noarch.rpm
|
||||
yum clean all
|
||||
yum install -y zabbix-agent
|
||||
fi
|
||||
if [ ${OS_VER} == 8 ]; then
|
||||
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-release-5.0-1.el8.noarch.rpm
|
||||
rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-1.el8.noarch.rpm
|
||||
dnf clean all
|
||||
dnf install -y zabbix-agent
|
||||
fi
|
||||
@@ -84,7 +96,7 @@ EOF
|
||||
|
||||
else
|
||||
echo "You are running an unsupported OS"
|
||||
echo "Support OSes: Debian 9/10, Ubuntu 16.04/18.04, CentOS 7"
|
||||
echo "Support OSes: Debian 9/10/11, Ubuntu 16.04/18.04, CentOS 7"
|
||||
echo "Your OS: ${OS} ${OS_VER}"
|
||||
exit
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user