Zabbix is a very popular monitor tool used widely to collect metrics related to Networks, Physical or Virtual Servers, and IT infra. It also has GUI to display the collected metrics and it is released under the terms of General Public License version 2. Thus, It is a free-to-use software.
In this article, we will explain to you how to install Zabbix on openSUSE 15.1.
Installing Zabbix
Database and Webserver
We will be using Apache and MySQL as web and database servers respectively for this installation.
- Update and upgrade your system.
$ sudo zypper update -y
- Install Apache along with the required PHP packages.
$
sudo zypper install php7 php7-zip php7-fpm php7-gd php7-gettext php7-mbstring php7-mysql
-
Zabbix requires a web server to function correctly, and in this case, we'll use the Apache web server. To install Apache, run the following command:
$ sudo zypper install apache2
- Start and enable Apache service.
$ sudo systemctl restart apache2
$ sudo systemctl enable apache2 - Install Maria DB
$ sudo zypper install mariadb-server mariadb-client libmariadb-dev
$ sudo systemctl start mariadb
- Create Zabbix Database and the user.
$ mysql -u root -p
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'password';
flush privileges;
exit;
Installing Zabbix Server
- Install the zabbix repo.
$
sudo rpm -Uvh --nosignature https://repo.zabbix.com/zabbix/6.0/sles/15/x86_64/zabbix-release-6.0-1.sles15.noarch.rpm
$
sudo zypper --gpg-auto-import-keys refresh 'Zabbix Official Repository'
$ sudo zypper update
- Install the Zabbix server, frontend, and agent.
$ sudo zypper install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent
- Import Initial schema data and the password for the Zabbix user.
$ sudo zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
- Configure the Zabbix Database password.
Search and provide value for the DBPassword and AllowUnsupportedDBVersions variables as shown below syntax.$ sudo vi /etc/zabbix/zabbix_server.conf
DBPassword=password
AllowUnsupportedDBVersions=1 - Restart Zabbix processes and Apache web server.
$ sudo systemctl restart zabbix-server zabbix-agent apache2
$ sudo systemctl enable zabbix-server zabbix-agent apache2
Access your Zabbix server at http://<yourhost_IPv4>/zabbix and finish the Initialization steps.