Now we will create a new database on MySQL and configure it for Zabbix server. Configuring the Database for Zabbix Server Provide the password for the MySQL user “Zabbix” you created during the Zabbix database creation. $ zcat /usr/share/doc/zabbix-server-mysql*/ | mysql -uzabbix -p zabbix Now we will need to import the Zabbix initial schema to the newly created “Zabbix” database. It will also install the Zabbix agent that will let the Zabbix server to monitor itself. Once the repository is updated, you can install Zabbix using the below command: $ sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-agent Now update the local repository to include the Zabbix repository: $ sudo apt update $ sudo dpkg -i zabbix-release_5.2-1+ubuntu20.04_all.deb Issue the below commands in Terminal to do so: $ wget Install Zabbix Repositoryįirst, we will need to download and install the Zabbix official repository to our system. Now we will install and configure Zabbix on the same machine where we have installed all the prerequisites (Apache, MySQL, and PHP). Step 2: Installing and Configuring Zabbix When asked to set the root password, enter the password twice. It will set the root password for the MySQL server along with some other security options. Once the installation is completed, issue the below command to secure the SQL server. Issue the below command in Terminal to install MySQL server: $ sudo apt install mysql-server You can also follow our guide on Installing MySQL server. The version of MySQL currently available on Ubuntu 20.04 LTS repositories is 8.0. Now in this step, we will install and configure MySQL server to store the data collected by the Zabbix server from the agents. Make the same above changes in this file, then save, and close it. Now edit the “ php.ini” configuration file for PHP cli: $ sudo nano /etc/php/7.4/cli/php.ini Replace with the time zone of your server’s location. Remove the semicolon ( ) from the date.timezone line. Edit the “ php.ini” configuration file for Apache2: $ sudo nano /etc/php/7.4/apache2/php.ini Issue the following command in Terminal to do this: $ sudo apt install php-cli php-common php-dev php-pear php-gd php-mbstring php-mysql php-xml php-bcmath libapache2-mod-phpĪfter the installation of PHP packages is completed, we will need to do a little configuration. Now we will install PHP along with few dependencies. Now if a firewall is running on your system, allow the Apache through it: $ sudo ufw allow ‘Apache’ Installing and Configuring PHP Packages If the service is not enabled or running, you can manually enable and start is using the below commands: $ sudo systemctl enable apache2 Issue the below command: $ sudo systemctl status apache2 To verify if Apache service is enabled and running. You can also visit our post on How to install Apache web server on Linux. Issue the below commands in Terminal to install it: $ sudo apt update On the machine that you want to configure as Zabbix monitoring server, you will need to install:Īpache web server will be used to serve the Zabbix web interface. Zabbix uses MySQL as a backend database for storing the collected information while it uses Apache and PHP as the frontend for serving the web interface. For both machines, we will require Sudo privileges. Note: We will be using the Ubuntu 20.04 LTS (Focal Fossa) for both the Zabbix server and client machine. We will also install the Zabbix agent on the Zabbix monitoring server so that it can also monitor itself. On the client machine, we will install the Zabbix agent that will collect data and report to the Zabbix server. We will be using two Linux machines one as a monitoring server on which we will install and configure the Zabbix server and the other as a client that we want to monitor. In this post, we will be explaining how to install and configure Zabbix on Linux to monitor servers health. Zabbix agent collects data from the devices you want to monitor and forward it to the Zabbix server. Zabbix server is the main component that receives the collected data from the monitored devices. Zabbix has two major components: Zabbix server and Zabbix agent. Zabbix tools gather information from the devices being monitored and send it to a central authority. It helps to keep an eye on the network infrastructure and detect issues with hardware or software programs. Zabbix is an open-source utility for monitoring servers, network devices, network services, and applications.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |