Get the App
SLTechnology News&Howtos  ›  Servers  › 

Install zabbix agent in ubuntu intranet environment

Shulou Source: shulou.com Published: 2022-06-03 09:49:35 12月06日 Update

one。 Make an offline installation package on a ubuntu of the same system that can connect to the external network.

1.1. Download the deb package required by the zabbix agent software with the following instructions

$sudo apt-get-d install zabbix-agent

$sudo apt-get install-y fping openssl libsnmp-dev libpcre3-dev

After executing the above instructions, the installation package and related dependencies of the zabbix-agent software are downloaded to the / var/cache/apt/archives directory

1.2. Generate dependencies

1.2.1 create a folder under the root directory

$sudo mkdir zabbix-offlinepackage

1.2.2. Copy the downloaded deb package to the newly created folder above

$sudo cp-r / var/cache/apt/archives / zabbix-offlinepackage

1.2.3. Modify the permissions of a folder, readable, writable and executable

$sudo chmod 777-R / zabbix-offlinepackage/

1.2.4. Establish dependencies for deb packages

$sudo dpkg-scanpackages / zabbix-offlinepackage/ / dev/null | gzip > / zabbix-offlinepackage/Packages.gz

If an error occurs: sudo: dpkg-scanpackages: command not found

You need to install the dpkg-dev tool:

$sudo apt-get install dpkg-dev

1.2.5 copy the generated Packages.gz package to the same directory as deb

$sudo cp / zabbix-offlinepackage/Packages.gz / zabbix-offlinepackage/archives/Packages.gz

1.2.6 packed as a compressed package for later use

$tar cvzf zabbix-offlinepackage.tar.gz zabbix-offlinepackage/

Save the zabbix-offlinepackage.tar.gz file to a USB drive or server

two。 Copy the made offline source to the intranet server

Copy the zabbix-offlinepackage.tar.gz to the root directory and extract it

$sudo tar-the original source of the xvf zabbix-offlinepackage.tar.gz backup system

Note: we can back up the original source before adding it

$sudo cp / etc/apt/sources.list / etc/apt/sources.list.back adds the installation package and source path to the system source source.list

$sudo vi / etc/apt/sources.list

Deb file:///zabbix-offlinepackage archives/

Then log out all other deb and update the system source

$sudo apt-get update offline installation

At this point, without the network, we can install the zabbix agent software that we downloaded between us.

$sudo apt-get install zabbix-agent starts zabbix agent

Service start zabbix-agent to view service startup status

Service status zabbix-agent

Netstat-ntpl | grep 10050

Tags: Files systems folders software services backups copies instructions servers root directories directories production generation between tools situations location permissions status network Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Linux MySQL NVidia macOS