Zabbix is an open source monitoring software that helps in monitoring the performance and availability of servers, network devices, and other IT infrastructure components. In this tutorial, we will learn how to install Zabbix on MXLinux Latest.
Before we begin with the installation process, let's ensure that the system is up-to-date by running the following command:
sudo apt update && sudo apt upgrade
Zabbix requires Apache, PHP, and MariaDB to be installed on the system. Apache is a popular web server used to host websites, PHP is a server-side scripting language used for web development, and MariaDB is an open-source database management system.
To install these packages, run the following command:
sudo apt install -y apache2 php mariadb-server mariadb-client
Once the installation is completed successfully, start Apache and MariaDB services using the following commands:
sudo systemctl start apache2
sudo systemctl start mariadb
After installing MariaDB, we need to create a database and a user for Zabbix. Run the following command:
sudo mysql -u root -p
This command will open the MySQL command prompt. Enter your MySQL root password when prompted.
CREATE DATABASE zabbixdb character set utf8 collate utf8_bin;
CREATE USER 'zabbixuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON zabbixdb.* TO 'zabbixuser'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit
Replace the password with the desired one.
Now, download Zabbix from their official website using the following command:
wget https://repo.zabbix.com/zabbix/5.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.4-1+ubuntu20.04_all.deb
After downloading, install the package by running the following command:
sudo dpkg -i zabbix-release_5.4-1+ubuntu20.04_all.deb
Once the installation is done, update the system repositories by running:
sudo apt update
Now we can proceed with the installation of Zabbix.
sudo apt install -y zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-agent
During the installation process, you will be prompted to enter the database details that you created earlier, so make sure to enter them correctly.
After the installation is completed, we need to modify the configuration files to start the Zabbix service.
sudo nano /etc/zabbix/zabbix_server.conf
Find the following lines and modify them as shown below:
DBHost=localhost
DBName=zabbixdb
DBUser=zabbixuser
DBPassword=password
Save and close the file.
sudo nano /etc/apache2/conf-available/zabbix.conf
Find the following lines and modify them as shown below:
php_value date.timezone Europe/Riga
<Directory /usr/share/zabbix>
Options FollowSymLinks
AllowOverride None
Require all granted
<IfModule mod_php5.c>
php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value max_input_vars 10000
php_value always_populate_raw_post_data -1
php_value date.timezone Europe/Riga
</IfModule>
</Directory>
Save and close the file.
Now, enable the newly created config file and restart Apache service:
sudo a2enconf zabbix
sudo systemctl restart apache2
Finally, start the Zabbix service using the following command:
sudo systemctl start zabbix-server
And enable it to start automatically at boot time:
sudo systemctl enable zabbix-server
To monitor other hosts, we need to install the Zabbix agent on the respective hosts. Run the following command on the host you want to monitor:
sudo apt install -y zabbix-agent
Now, open the Zabbix Web Interface at http://your-server-ip/zabbix and login with the default username "Admin" and password "zabbix".
That's it! You have successfully installed Zabbix on MXLinux Latest. Now, you can start monitoring your servers and other IT infrastructure components.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!