Zabbix is an open-source monitoring software that allows you to track and monitor the performance of your servers, applications, and network devices. In this tutorial, we will guide you through the installation process of Zabbix on Fedora Server Latest.
Before installing Zabbix, we need to install some required packages that are important for the installation process.
Open up a terminal window and run the following command:
sudo dnf install -y httpd mariadb-server mariadb zabbix-server-mysql zabbix-web-mysql zabbix-agent
Zabbix requires PHP to be installed and configured. By default, Fedora Server Latest ships with PHP 7.4. To enable the necessary PHP modules for Zabbix, we need to edit the php.ini configuration file.
Open up the php.ini
file in your preferred editor:
sudo nano /etc/php.ini
Add the following lines to the end of the file:
max_execution_time = 300
max_input_time = 300
post_max_size = 16M
upload_max_filesize = 2M
memory_limit = 256M
Zabbix requires a database to store all of its monitoring data. MariaDB is a popular, open-source MySQL-compatible database server that we'll use for this setup.
We will start by logging in to the MariaDB server as the root user:
sudo mysql -u root -p
Enter your MariaDB root password when prompted.
Next, we will create a new database and user for Zabbix. Replace yourpassword
with a secure password for the Zabbix user:
CREATE DATABASE zabbixdb CHARACTER SET UTF8 COLLATE UTF8_BIN;
GRANT ALL PRIVILEGES ON zabbixdb.* TO zabbixuser@localhost IDENTIFIED BY 'yourpassword';
FLUSH PRIVILEGES;
exit;
Now that we have created a database and user for Zabbix, we will import the Zabbix database schema using the zcat
command.
Run the following command to import the Zabbix schema:
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -u zabbixuser -p zabbixdb
Enter the password you created for the zabbixuser
user when prompted.
Now that we have a database with the necessary schema in place, we need to configure the Zabbix server to connect to it.
Open up the Zabbix server configuration file:
sudo nano /etc/zabbix/zabbix_server.conf
Find the following lines:
DBName=
DBUser=
DBPassword=
Enter the database details we created in Step 3:
DBName=zabbixdb
DBUser=zabbixuser
DBPassword=yourpassword
Save and close the file.
The Zabbix web interface needs to be configured to connect to the Zabbix server.
Open up the Zabbix web configuration file:
sudo nano /etc/zabbix/web/zabbix.conf.php
Find the following lines:
$DB['DATABASE'] = '';
$DB['USER'] = '';
$DB['PASSWORD'] = '';
$DB['SERVER'] = '';
$DB['PORT'] = '';
$DB['SOCKET'] = '';
Enter the database details we created in Step 3:
$DB['DATABASE'] = 'zabbixdb';
$DB['USER'] = 'zabbixuser';
$DB['PASSWORD'] = 'yourpassword';
$DB['SERVER'] = 'localhost';
$DB['PORT'] = '3306';
$DB['SOCKET'] = '';
Save and close the file.
We are now ready to start the required services for Zabbix.
After starting these services, Zabbix should be fully functional and available to use.
sudo systemctl start httpd
sudo systemctl start mariadb
sudo systemctl start zabbix-server
sudo systemctl start zabbix-agent
Open up your preferred web browser and navigate to http://<your-server-ip>/zabbix
.
You will be prompted to enter the login details for the Zabbix web interface. The default username and password are:
Admin
zabbix
You should now have full access to the Zabbix web interface.
Congratulations! You have successfully installed Zabbix on your Fedora Server Latest. You can now start monitoring your servers, applications and network devices!
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!