Please note this process can take some time as it needs to insert a lot of data into the SQL database.
zcat /usr/share/doc/zabbix-sql-scripts/mysql/ | mysql -uzabbix -p zabbixīefore proceeding, you will need to enter the password you set for the “ zabbix” user earlier in this guide. Run the following command to pass the SQL data directly into the MySQL CLI. This data was downloaded to your Raspberry Pi when we installed the Zabbix packages earlier. Our final task with the database is to import the tables and initial Zabbix data. To exit, all you need to do is type in “ quit ” and press the ENTER key. GRANT ALL PRIVILEGES on zabbix.* to We are now finally done with the database so we can quit out of the MySQL CLI. Grant all privileges to the “ zabbix” database to the “ zabbix” user by running the following command. We lock this user so that it can only connect via the localhost by using “ Finally, with both the user and database created, we need to grant some privileges. We will need the password that you set here later on in this guide. CREATE USER IDENTIFIED BY ' PASSWORDHERE' Next, we need to create a user called “ zabbix” that will be used to access the new database.īefore entering the following command, make sure that you replace “ PASSWORDHERE” with a unique and strong password of your choosing. CREATE DATABASE zabbix CHARACTER SET utf8 collate utf8_bin ģ. Run the following command within the MySQL CLI to create the database. For our first step, we will create a new SQL database called “ zabbix“. You should have set this up while following the guide we linked earlier.Ģ. If prompted, enter the password for your root MySQL account. To launch into this, you need to run the following command on your Raspberry Pi. We need to start by loading up the MySQL command-line tool. In our case, this means creating a new user and database on our SQL server.ġ. Configure the SQL Database for Zabbixįor Zabbix to be able to work, it needs somewhere to store its data.
sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-nginx-conf zabbix-sql-scripts zabbix-agent Setting up the Zabbix Serverīefore using Zabbix on our Raspberry Pi, we still need to create its database and configure NGINX. Running the following command will get us everything we need for Zabbix to run on our Raspberry Pi. Finally, we can install the Zabbix server, its frontend interface, and its agent software. If we do not run this update, the operating system won’t be aware of the new Zabbix packages. As we have made changes to the repository sources, we need to rerun an update. sudo dpkg -i zabbix-release_5.4-1+debian10_all.debģ. Run the following command to install this package to your Pi. Please note, the version we are downloading with this command is for Raspberry Pi OS Buster.
We can start this process by using wget to download the Zabbix 5.4 Debian package to the Raspberry Pi. Our first task is to add the Zabbix server repository to our device.
Now that we have done some preparation, we can finally move on to install the Zabbix software to your Raspberry Pi.ġ.
You will need to follow our guide on installing MySQL to your Raspberry Pi before continuing.įrom this tutorial, please follow the “ Setting up MYSQL on a Raspberry Pi” section. The Zabbix software will use MySQL on your Raspberry Pi to store its data. Once you have NGINX installed, you will now need to install the MySQL database server. You will need to follow both the “ Setting up NGINX on the Raspberry Pi” and “ Configuring NGINX for PHP” sections included within that tutorial.ģ. With your Raspberry Pi now up to date, we will need to install the NGINX web server.īefore continuing, please follow our installing NGINX Web server tutorial.
These commands will update the package list, then upgrade all packages that have a pending update. Before we do anything, let us first run an update on our Raspberry Pi. Mainly we will need to install both the NGINX and MySQL servers on our device.ġ. Recommendedīefore we can install Zabbix to our Raspberry Pi, we need to do some prep work. Equipment Listīelow is a list of the equipment we used when installing the Zabbix server to our Raspberry Pi. The newer Bullseye release is not supported at the time of writing. Please note, Zabbix will currently only run on Raspberry Pi Buster or older. You can even use Zabbix to monitor your Raspberry Pi’s CPU load, network utilization, disk space consumption, and more.įor this guide on installing Zabbix to your Raspberry Pi, we will be using a clean installation of the Raspberry Pi OS.Īdditionally, we will also be choosing to set this software up with NGINX as the backend web server. Zabbix is a popular open-source monitoring software tool for a wide range of things, such as networks, servers, and virtual machines.