How to Install Zabbix on Debian and Ubuntu Linux

How to Install Zabbix on Debian and Ubuntu Linux

Zabbix is ​​a complex for monitoring your server. Zabbix will also allow you to track the status of a computer network and network equipment. Zabbix is ​​also often used to monitor web servers. In this article, we will look at how to put Zabbix on the lamp stack. Today, we learn how to install zabbix on Debian and Ubuntu Linux. Let’s proceed with the installation:

We update the system:

sudo apt update 

If necessary:

sudo apt upgrade 

Download the package that will add the repository we need:

wget https://repo.zabbix.com/zabbix/4.0/debian/pool/main/z/zabbix-release/zabbix-release_4.0-2+stretch_all.deb 

We launch:

sudo dpkg -i zabbix-release_4.0-2+stretch_all.deb  

Updated:

sudo apt update 

Let’s install with mysql database support (mariadb):

sudo apt-get install zabbix-server-mysql zabbix-frontend-php zabbix-agent  

Let’s create a database:

mysql -uroot -p  
 CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin; 
CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'zabbix';
GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost';
FLUSH PRIVILEGES;
EXIT

Import the initial schema and data into the database:

sudo zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p zabbix  

I make a config:

sudo nano /etc/zabbix/zabbix_server.conf 

We bring it to this form:

 DBHost=localhost 
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix

In the zabbix.conf file, you need to specify the time zone:

sudo nano /etc/apache2/conf-enabled/zabbix.conf 

We are looking for the line php_value date.timezone is correct. In my case, it will look like this:

php_value date.timezone Europe/Moscow
 

Bottles developers join the GNOME Foundation

Restart apache and start zabbix:

 sudo service apache2 restart  
 sudo service zabbix-server start  

Now we go to the browser at the specified ip address where zabbix is ​​installed and complete the installation. On the first page, click Next step:

How to Install Zabbix on Debian and Ubuntu Linux

On the next page, we pay attention that all items have the value Ok. If everything is in order, click Next step:

Installing Zabbix on Debian

Specify the data for connecting to the database that we created a little earlier:

Installing Zabbix on Debian

Here you can leave everything by default:

Installing Zabbix on Debian

We complete the installation by clicking on Finish:

Installing Zabbix on Debian

Default login and password Admin/zabbix

Installing Zabbix on Debian

This completes the installation. You can start creating graphs and setting up monitoring of your servers.

Be the first to comment

Leave a Reply

Your email address will not be published.


*