How to Install and Configure Zabbix on Ubuntu/Debian – MUO – MakeUseOf

Need to monitor a server or other online device? Install and set up Zabbix to manage your devices from one machine.
System administrators often use monitoring tools such as Zabbix to keep an eye on servers, virtual machines, devices connected to their network, and more. Zabbix is a great tool that provides a graphical interface to control and manage these services efficiently.
But the installation process of Zabbix on Linux is quite long and confusing. This article will demonstrate how to easily install Zabbix and its prerequisites on a system running Ubuntu or Debian.
To successfully install Zabbix on your desktop or server, you’ll need:
Since Zabbix is written in PHP, you will have to download PHP and Apache server on your machine.
Add the following PPA repository to your system using add-apt-repository:
Launch the terminal and update your system’s repository list using APT:
Upgrade the installed packages to ensure that no outdated packages are present on your computer.
Next, download the necessary packages related to Apache and PHP:
After downloading the packages, the system will automatically configure the Apache service to start during boot. Check whether the service is currently running on your machine using systemctl:
If the status displays active (running), then everything’s fine. However if not, you’ll have to manually start the service.
Issue the below-given command in the terminal to install MySQL.
Now, you have to install the database on your Ubuntu machine. To make your work easier, MySQL provides an installation script that automatically installs the database for you.
Launch the terminal and type:
Type the root user password and press Enter. The script will ask you some questions to configure the database installation such as:
Type y and press Enter for all the questions.
Now it’s time to create a new database for Zabbix. Launch the terminal and enter the following command:
Execute the following database commands to create a new database and grant appropriate privileges to the new user. Make sure to replace password in the second command with a strong password of your choice.
Once done, quit the MySQL shell by typing:
To install Zabbix on Ubuntu and Debian, download the DEB package from the official Zabbix repository. Use wget to download the package file:
Install the downloaded package using APT.
Next, download the Zabbix server, agent packages, and the web frontend.
Now, create and load the Zabbix database schema.
Although you have installed Zabbix on your system, it is not configured to use the database you created before.
Open the Zabbix configuration file located at /etc/zabbix using your favorite Linux text editor.
Now, locate the following lines in the configuration file and change the hostname, username, and password.
Make sure to replace password with a strong password of your choice.
Related: How to Create a Strong Password That You’ll Not Forget
Before moving forward, you need to make some changes to the Zabbix Apache configuration file.
To do that, reload the Apache server using systemctl first.
Open the configuration file using nano or any other text editor.
Find the line php_value date.timezone <time_zone> and replace <time_zone> with the time zone corresponding to your geographical location.
Now that you have finished tweaking the files, it is time to start the services and set up Zabbix graphically.
Restart the Apache service using systemctl.
Start the Zabbix server and agent by typing the following command:
Enable the Zabbix services from the command line.
Verify if the Zabbix server is running on your system using the systemctl status command.
Proceed if the status displays active in green font.
To ensure that Zabbix works properly on your system, you’ll have to open ports 80 and 443 on your network. On Linux, UFW is a great utility that will help you in configuring firewalls and managing ports.
Open ports 80 and 443 by typing the following command:
Reload your firewall to save the changes.
Launch any web browser on your Linux system and head over to the following address:
If you’ve installed Zabbix on a Linux server, replace localhost with the IP address of the server. The browser will display the Zabbix Welcome page. Click on the Next Step button to continue.
Now, Zabbix will check the prerequisites required for the application. If you find a missing package, go ahead and install it using the terminal. Once done, click Next Step.
Enter the database password entered in the configuration file before. Then select Next Step.
The system will ask you for information related to the server. Enter an appropriate server name and proceed by clicking on Next Step.
Zabbix will quickly summarize all the configurations and settings that you’ve done. Review these settings and click on Next Step if everything looks good.
The installation process will now begin. Select Finish once Zabbix has finished installing.
The system will redirect you to the login page. Enter Admin and zabbix as the username and password respectively. You can change the password later by heading over to Administrator > Users.
Zabbix is a great way to control and monitor devices on your network. It consists of several tools that a user may need to keep an eye on cloud services, virtual machines, servers, and other devices on their network.
You can also set up a portable network monitor using a Raspberry Pi and Nagios Enterprise Monitoring Server (NEMS). Making use of a Raspberry Pi as a network monitoring device is much better than dedicating a complete desktop to the task.
Deepesh is the Section Editor for Linux at MUO. He writes informational guides on Linux, aiming to provide a blissful experience to all newcomers. Not sure about movies, but if you want to talk about technology, he’s your guy.
Join our newsletter for tech tips, reviews, free ebooks, and exclusive deals!

source

We will be happy to hear your thoughts

Leave a reply

LINXGO
Logo
Compare items
  • Total (0)
Compare