(Created page with "== Install Zabbix == Install zabbix on ubuntu 22.04: run shell as root:<syntaxhighlight lang="bash"> sudo -s </syntaxhighlight>install Zabbix repo<syntaxhighlight lang="bash"> wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_7.0-2+ubuntu24.04_all.deb dpkg -i zabbix-release_7.0-2+ubuntu24.04_all.deb apt update </syntaxhighlight>Install Zabbix server, frontend, agent<syntaxhighlight lang="bash"> apt install zabbix-server-mysql zabbi...") |
No edit summary |
||
| Line 34: | Line 34: | ||
systemctl restart zabbix-server zabbix-agent apache2 | systemctl restart zabbix-server zabbix-agent apache2 | ||
systemctl enable zabbix-server zabbix-agent apache2 | systemctl enable zabbix-server zabbix-agent apache2 | ||
</syntaxhighlight> | |||
== Install Zabbix Agent and configure == | |||
Install with the following commands: | |||
Install Zabbix repo<syntaxhighlight lang="bash"> | |||
wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-4+ubuntu22.04_all.deb | |||
sudo dpkg -i zabbix-release_6.0-4+ubuntu22.04_all.deb | |||
sudo apt update | |||
</syntaxhighlight>Install Agent<syntaxhighlight lang="bash"> | |||
sudo apt install zabbix-agent | |||
</syntaxhighlight>Configure Zabbix Agent<syntaxhighlight lang="bash"> | |||
sudo nano /etc/zabbix/zabbix_agentd.conf | |||
</syntaxhighlight>Replace the following variables with those required in the deployment:<syntaxhighlight lang="bash"> | |||
Server=<Zabbix_Server_IP> | |||
ServerActive=<Zabbix_Server_IP> | |||
Hostname=<Hostname_Of_Ubuntu_Client> | |||
</syntaxhighlight>Start and enable agent service:<syntaxhighlight lang="bash"> | |||
sudo systemctl start zabbix-agent | |||
sudo systemctl enable zabbix-agent | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 17:39, 13 September 2024
Install Zabbix
Install zabbix on ubuntu 22.04:
run shell as root:
sudo -s
install Zabbix repo
wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_7.0-2+ubuntu24.04_all.deb
dpkg -i zabbix-release_7.0-2+ubuntu24.04_all.deb
apt update
Install Zabbix server, frontend, agent
apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent
Install MySQL if running database on same server:
apt install mysql-server
Create initial database
mysql -uroot -p
password
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
mysql> create user zabbix@localhost identified by 'password';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> set global log_bin_trust_function_creators = 1;
mysql> quit;
On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.
zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
Disable log_bin_trust_function_creators option after importing database schema:
mysql -uroot -p
password
mysql> set global log_bin_trust_function_creators = 0;
mysql> quit;
Configure database for zabbix server: Edit file /etc/zabbix/zabbix_server.conf
nano /etc/zabbix/zabbix_server.conf
#add to file:
DBPassword=password
Start Zabbix server and agent processes and make it start at system boot:
systemctl restart zabbix-server zabbix-agent apache2
systemctl enable zabbix-server zabbix-agent apache2
Install Zabbix Agent and configure
Install with the following commands:
Install Zabbix repo
wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-4+ubuntu22.04_all.deb
sudo dpkg -i zabbix-release_6.0-4+ubuntu22.04_all.deb
sudo apt update
Install Agent
sudo apt install zabbix-agent
Configure Zabbix Agent
sudo nano /etc/zabbix/zabbix_agentd.conf
Replace the following variables with those required in the deployment:
Server=<Zabbix_Server_IP>
ServerActive=<Zabbix_Server_IP>
Hostname=<Hostname_Of_Ubuntu_Client>
Start and enable agent service:
sudo systemctl start zabbix-agent
sudo systemctl enable zabbix-agent