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:
On the next page, we pay attention that all items have the value Ok. If everything is in order, click Next step:
Specify the data for connecting to the database that we created a little earlier:
Here you can leave everything by default:
We complete the installation by clicking on Finish:
Default login and password Admin/zabbix
This completes the installation. You can start creating graphs and setting up monitoring of your servers.
Leave a Reply