{"id":7151,"date":"2024-10-04T10:00:44","date_gmt":"2024-10-04T10:00:44","guid":{"rendered":"https:\/\/blog.ssdnodes.com\/blog\/?p=7151"},"modified":"2025-05-15T15:27:34","modified_gmt":"2025-05-15T15:27:34","slug":"how-to-install-zabbix-on-ubuntu-24-04","status":"publish","type":"post","link":"https:\/\/www.ssdnodes.com\/blog\/how-to-install-zabbix-on-ubuntu-24-04\/","title":{"rendered":"How to Install Zabbix on Ubuntu 24.04 and Configure it"},"content":{"rendered":"<p>In this tutorial, you will install the Zabbix on an Ubuntu 24.04 server, and configure a MariaDB database, in which Zabbix will store its monitoring data. You will also configure Nginx and PHP on this monitoring server to serve the Zabbix web interface.<\/p>\n<h2>Introduction<\/h2>\n<p>Zabbix is an open-source <a href=\"https:\/\/www.ssdnodes.com\/blog\/tools-to-manage-multiple-linux-servers-free\/\">Linux management software<\/a> that monitors the availability and performance of IT infrastructure components.<\/p>\n<p>Zabbix provides real-time monitoring of thousands of metric data from servers, virtual machines, network devices, and web applications. Analyzing the data Zabbix gathers will give you a general idea of the health of your servers and web applications, in addition to helping you detect potential problems before your users report them.<\/p>\n<p>To monitor a server and collect data from it, Zabbix uses an <em>agent<\/em> that gathers data from different services and sends it to the Zabbix monitoring server. Zabbix supports encrypted communication between the monitoring server and its monitored clients. This ensures that your data is transferred securely over the network.<\/p>\n<p>Zabbix provides a web interface that allows you to monitor your servers (also known as Zabbix clients) and their internal services and manage system settings.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10685 size-full\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/Zabix-article.png\" alt=\"install Zabbix on Ubuntu 24.04\" width=\"600\" height=\"400\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/Zabix-article.png 600w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/Zabix-article-300x200.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<h2>Installing Zabbix on Ubuntu 24.04<\/h2>\n<p>To install Zabbix 7 on Ubuntu 24.04, you'll first download the Zabbix repository configuration package, install the Zabbix web frontend with MariaDB database support, Zabbix server, and Zabbix Nginx configuration packages. Next, you'll configure MariaDB for Zabbix, set up Nginx and PHP, then finish up your Zabbix installation through the Zabbix web interface.<\/p>\n<h3>Note<\/h3>\n<p>If you want to skip all the technical steps of setting up Zabbix on your server and have it installed in minutes, then I have some great news for you! Our team of engineers has prepared a ready-to-use 1-click Zabbix application for your convenience. Just choose one of our <a href=\"https:\/\/www.ssdnodes.com\/pricing\/\">servers<\/a>, and while prompted to choose the operating system, choose\u00a0<strong>Zabbix<\/strong> from the dropdown menu.<\/p>\n<h2>Prerequisites<\/h2>\n<p>To follow this tutorial you need:<\/p>\n<ul>\n<li>An Ubuntu 24.04 server with a non-root user with <code>sudo<\/code> privileges. \u00a0If you haven't noticed, we offer extremely powerful Ubuntu 24.04 VPS servers at a bargain. Take a look at our <a href=\"https:\/\/ssdnodes.com\/\" target=\"_blank\" rel=\"noopener\">offerings<\/a>\u00a0and prepare for your mind to be blown \ud83e\udd2f.<\/li>\n<li>The LEMP stack (<a href=\"https:\/\/www.ssdnodes.com\/blog\/cheap-linux-vps-comparison-report\/\">Linux<\/a>, Nginx, MariaDB, and PHP) installed on your server. Use our <a href=\"https:\/\/www.ssdnodes.com\/blog\/installing-lemp-on-ubuntu-22-04-lts-jammy-jellyfish\/\">Installing LEMP on Ubuntu 24.04 LTS<\/a> guide to set it up. Or you can use our <strong>LEMP 1-Click App<\/strong>\u00a0to set up LEMP automatically when creating a server.<\/li>\n<li>A TLS\/SSL certificate, because Zabbix can access sensitive information about your infrastructure. <strong>Fun fact<\/strong>: All our 1-click applications (including LEMP and Zabbix) come preinstalled with an SSL certificate \ud83d\ude42<\/li>\n<\/ul>\n<p>Check out our\u00a0<a href=\"https:\/\/www.ssdnodes.com\/blog\/tutorial-setting-up-and-securing-ssh-based-authentication\/\">How to access your server using SSH<\/a>\u00a0guide to learn how to access your server and create a\u00a0<code>sudo<\/code>\u00a0user.<\/p>\n<h2>Step 1: Installing the Zabbix Server<\/h2>\n<p>You first need to install Zabbix onto the server where MariaDB and Nginx should be already be installed. Zabbix offers installation packages for different Linux distributions. Zabbix can be found in Ubuntu's package manager, but it is outdated. To install the most recent stable version, use the <a href=\"https:\/\/repo.zabbix.com\/\" target=\"_blank\" rel=\"noopener\">official Zabbix repository<\/a>.<\/p>\n<p>To download and install the latest Zabbix server, first get the Zabbix repository configuration package. This can be done by downloading the <code>Zabbix.deb<\/code> file using the <code>wget<\/code> command. This <code>.deb<\/code> file will be used to add the repository.<\/p>\n<p>Run the following command:<\/p>\n<pre><code>wget https:\/\/repo.zabbix.com\/zabbix\/7.0\/ubuntu\/pool\/main\/z\/zabbix-release\/zabbix-release_7.0-2+ubuntu24.04_all.deb<\/code><\/pre>\n<p>Once the download finishes, you can install it with the <code>dpkg<\/code> command:<\/p>\n<pre><code>sudo dpkg -i zabbix-release_7.0-2+ubuntu24.04_all.deb<\/code><\/pre>\n<p>After you run the command above, you will see an output like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10519\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/dpkg-i-1024x257.webp\" alt=\"installing the Zabbix package repository\" width=\"600\" height=\"151\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/dpkg-i-1024x257.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/dpkg-i-300x75.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/dpkg-i-768x193.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/dpkg-i.webp 1426w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Next, refresh the package index to use this new repository:<\/p>\n<pre><code>sudo apt update<\/code><\/pre>\n<p>You should see the following as part of the output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10520\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/sudo-apt-update-1024x349.webp\" alt=\"updating packages for Zabbix\" width=\"600\" height=\"204\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/sudo-apt-update-1024x349.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/sudo-apt-update-300x102.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/sudo-apt-update-768x262.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/sudo-apt-update.webp 1426w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>We are now able to install Zabbix after our server has been updated.<\/p>\n<p>Next, we will install the Zabbix web frontend with MySQL database support and the Zabbix server. Note that we will be using MariaDB, but because its compatible with MySQL, you can just install the MySQL packages and they will work as expected:<\/p>\n<pre><code>sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-sql-scripts<\/code><\/pre>\n<p>Here you install the following packages:<\/p>\n<ul>\n<li><code>zabbix-server-mysql<\/code>: Adds MySQL\/MariaDB support to zabbix.<\/li>\n<li><code>zabbix-frontend-php<\/code>: The PHP Zabbix web interface.<\/li>\n<li><code>zabbix-sql-scripts<\/code>: Zabbix SQL scripts that will create the Zabbix database and its tables.<\/li>\n<\/ul>\n<p>This command's will take some time to run. Below are the last few lines of the output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10521\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/last-few-lines-1024x349.webp\" alt=\"installing Zabbix server and sql scripts\" width=\"600\" height=\"204\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/last-few-lines-1024x349.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/last-few-lines-300x102.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/last-few-lines-768x262.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/last-few-lines.webp 1426w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Finally, install the <em>Zabbix Agent<\/em>, which allows you to collect data about the Zabbix server status.<\/p>\n<pre><code>sudo apt install zabbix-agent<\/code><\/pre>\n<p>An output similar to the following will signify a successful installation:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10522\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/install-zabbix-agent-1024x289.webp\" alt=\"install zabbix-agent\" width=\"600\" height=\"169\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/install-zabbix-agent-1024x289.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/install-zabbix-agent-300x85.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/install-zabbix-agent-768x217.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/install-zabbix-agent.webp 1426w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>To use Zabbix, you must first set up a database that stores the data the Zabbix server will gather from its agents (also known as Zabbix clients). This is the next step.<\/p>\n<h2>Step 2: Configuring MariaDB<\/h2>\n<p>To configure Zabbix with a functional database, you will need to create a MariaDB database and fill it with basic information. To ensure that Zabbix doesn't log in to your MariaDB database using the root account, you will also create a unique user for this database.<\/p>\n<p>To create a MySQL\/MariaDB database, use the <code>mysql<\/code> client to connect to MariaDB and access its command line interface with the following command:<\/p>\n<pre><code>sudo mysql<\/code><\/pre>\n<p>If you get an error that contains <code>Access denied for user 'root'<\/code>, this means that the default authentication method has changed, and connecting to MariaDB requires a password for the root account. To solve this issue, use the following command to connect to MariaDB using the root user and a password:<\/p>\n<pre><code>mysql -u root -p<\/code><\/pre>\n<p>You'll be asked for your MySQL root password, enter it and then press Enter.<\/p>\n<p><strong>Note:<\/strong> If you've installed the LEMP stack using our 1-Click App, you'll find your MySQL root password in the <strong>App Details<\/strong> widget on your SSDNodes Dashboard. As demonstrated in the following image:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10538\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/SSDNodes-LEMP-Info.webp\" alt=\"SSDNodes LEMP 1-CA info\" width=\"829\" height=\"776\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/SSDNodes-LEMP-Info.webp 829w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/SSDNodes-LEMP-Info-300x281.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/SSDNodes-LEMP-Info-768x719.webp 768w\" sizes=\"auto, (max-width: 829px) 100vw, 829px\" \/><\/p>\n<p>You should get a prompt similar to the following:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10523\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/mysql-u-root-p-1024x319.webp\" alt=\"Mysql Zabbix configuration on Ubuntu\" width=\"600\" height=\"187\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/mysql-u-root-p-1024x319.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/mysql-u-root-p-300x93.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/mysql-u-root-p-768x239.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/mysql-u-root-p.webp 1426w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Now you can create a database for Zabbix, We'll name the database <code>zabbix<\/code>, and add UTF-8 characters support to it:<\/p>\n<pre><code>create database zabbix character set utf8mb4 collate utf8mb4_bin;<\/code><\/pre>\n<p>If you receive an error upon entering the preceding command, make sure you've typed it in correctly, and that you end it with a semicolon (<code>;<\/code>).<\/p>\n<p>To create a new MariaDB user account for Zabbix, use the following statement in the MariaDB command line interface. Remember to replace <code>password<\/code> with a strong password for your user account:<\/p>\n<pre><code>create user zabbix@localhost identified by 'password';<\/code><\/pre>\n<p>Here, <code>zabbix<\/code> is your database user for Zabbix, and <code>password<\/code> is its password.<\/p>\n<p>Next, you'll need to give all access permissions to the user account that will manage your Zabbix database:<\/p>\n<pre><code>grant all privileges on zabbix.* to zabbix@localhost;<\/code><\/pre>\n<p>Refresh the privileges for the preceding command to take effect and apply the permission changes to the database server:<\/p>\n<pre><code>FLUSH PRIVILEGES;<\/code><\/pre>\n<p>This will take care of both the user and the database. You can exit the database console with the following command:<\/p>\n<pre><code>EXIT;<\/code><\/pre>\n<p>Next, you need to import the initial Zabbix SQL schema and data that Zabbix needs. To do this, run the following command to set up the schema and import data into the Zabbix database. Because the data is compressed, use <code>zcat<\/code>:<\/p>\n<pre><code>sudo zcat \/usr\/share\/zabbix-sql-scripts\/mysql\/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix<\/code><\/pre>\n<p>When prompted, enter the password for your <code>zabbix<\/code> MariaDB user.<\/p>\n<p>The command will take a while. If you get an error that says <code>ERROR 1045 (28000): Access denied for user <\/code><code>zabbix<\/code><code>@'localhost' (using password: YES)<\/code> or something similar, make sure you used the right password for your <code>zabbix<\/code> user that you've set up earlier in the MariaDB command line.<\/p>\n<p>You must set the database password in the Zabbix configuration file to allow the Zabbix client to access this database. Use your preferable text editor to open the configuration file. In this tutorial, we will be using <code>nano<\/code>:<\/p>\n<pre><code>sudo nano \/etc\/zabbix\/zabbix_server.conf<\/code><\/pre>\n<p>Look for the following section of the file:<\/p>\n<pre><code>\r\n### Option: DBPassword                           \r\n#       Database password. Ignored for SQLite.   \r\n#       Comment this line if no password is used.\r\n#                                                \r\n# Mandatory: no                                  \r\n# Default:                                       \r\n# DBPassword=<\/code><\/pre>\n<p>The file must be modified to change the <code>DBPassword<\/code> value to the password of the database user. To configure the database, add this line to the end of these comments:<\/p>\n<pre><code>\r\nDBPassword=your_zabbix_db_password<\/code><\/pre>\n<p>Make sure to replace <code>your_zabbix_db_password<\/code> with your database password.<\/p>\n<p>Save and close the file, press <code>CTRL+X<\/code>, followed by <code>Y<\/code> and then <code>ENTER<\/code>.<\/p>\n<p>Now you have configured the Zabbix server for connection to the database. Next, configure Nginx to serve the Zabbix frontend.<\/p>\n<h2>Step 3: Setting up Nginx<\/h2>\n<p>Install the automatic configuration package to configure Nginx automatically:<\/p>\n<pre><code>sudo apt install zabbix-nginx-conf<\/code><\/pre>\n<p>As an output of the above command, you should get the configuration file <code>\/etc\/zabbix\/nginx.conf<\/code>, and also a link to it in the Nginx configuration directory <code>\/etc\/nginx\/conf.d\/zabbix.conf<\/code>.<\/p>\n<p>Next, you need to make some necessary changes to the <code>\/etc\/zabbix\/nginx.conf<\/code> file. Open it with <code>nano<\/code> with the following command:<\/p>\n<pre><code>sudo nano \/etc\/zabbix\/nginx.conf<\/code><\/pre>\n<p>This file contains an Nginx server configuration automatically generated by Nginx. It includes two lines which determine the server\u2019s name as well as what port it listens on:<\/p>\n<pre><code>server {\r\n#        listen          8080;\r\n#        server_name     example.com;<\/code><\/pre>\n<p>Uncomment these lines and replace <code>example.com<\/code> by your domain name, and replace port <code>8080<\/code> with port <code>80<\/code>:<\/p>\n<pre><code>server {\r\n        listen          80;\r\n        server_name     your_domain;<\/code><\/pre>\n<h3>Set up a Let's Encrypt Certificate<\/h3>\n<p>To set up a Let's Encrypt SSL certificate for Zabbix, first install the Certbot client for Nginx:<\/p>\n<pre><code>sudo apt install certbot python3-certbot-nginx -y<\/code><\/pre>\n<p>Next, generate a certificate using the following command, replacing <code>zabbix.example.com<\/code> with your domain name:<\/p>\n<pre><code>sudo certbot --nginx -d zabbix.example.com<\/code><\/pre>\n<p>Enter your email address and type <strong>Y <\/strong>to agree on the terms of service. You'll also be asked whether you want to subscribe to receive emails from the Electronic Frontier Foundation, a founding<br \/>\npartner of the Let's Encrypt project. Type <strong>N <\/strong>if you don't want to subscribe to this emailing list.<\/p>\n<p>Next, unlink the default Nginx configuration from the \/sites-enabled\/ directory. This forces Nginx to use your Zabbix configuration instead of the default configuration:<\/p>\n<pre><code>sudo unlink \/etc\/nginx\/sites-enabled\/default<\/code><\/pre>\n<p>Next, test your configuration\u2019s syntax using the following command:<\/p>\n<pre><code>sudo nginx -t<\/code><\/pre>\n<p>You should receive an output that\u2019s similar to the following:<\/p>\n<pre><code>nginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\r\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful<\/code><\/pre>\n<p>This output shows that there are no errors in the configuration file.<\/p>\n<p>If you receive any errors, review your configuration file and make sure you\u2019ve set your directives and values properly.<\/p>\n<p>Next, reload Nginx for the changes you\u2019ve made to take effect by running the following command:<\/p>\n<pre><code>sudo systemctl reload nginx<\/code><\/pre>\n<p>Next, you will need to modify your PHP configuration to ensure that Nginx can be used to serve Zabbix's frontend.<\/p>\n<h2>Step 4: Configuring PHP<\/h2>\n<p>The Zabbix web interface uses PHP and requires special PHP server settings. These settings were created by Zabbix during installation, and can be found in the directory <code>\/etc\/zabbix<\/code> and are automatically loaded by PHP-FPM. This file should be modified to set your specific time zone. Open the <code>php-fpm<\/code> configuration of Zabbix:<\/p>\n<pre><code>sudo nano \/etc\/zabbix\/php-fpm.conf<\/code><\/pre>\n<p>This file contains PHP settings that satisfy the requirements of the Zabbix web interface. The default timezone setting is not commented out. You must set the appropriate timezone to ensure Zabbix displays the correct time for you, make sure to replace <code>Africa\/Casablanca<\/code> with your specific time zone:<\/p>\n<pre><code>\r\nphp_value[max_execution_time] = 300\r\nphp_value[memory_limit] = 128M\r\nphp_value[post_max_size] = 16M\r\nphp_value[upload_max_filesize] = 2M\r\nphp_value[max_input_time] = 300\r\nphp_value[max_input_vars] = 10000\r\nphp_value[date.timezone] = Africa\/Casablanca<\/code><\/pre>\n<p>Save the file and close it.<\/p>\n<p>You may have to uncomment the highlighted timezone line in the code block before you change it to your timezone. This <a href=\"http:\/\/php.net\/manual\/en\/timezones.php\" target=\"_blank\" rel=\"noopener\">list contains all supported time zones<\/a>.<\/p>\n<h3>Setting up System Locale<\/h3>\n<p>In some Ubuntu servers, the default system locale is <code>C.UTF-8<\/code>, which provides a basic UTF-8 locale for computer usage, while Zabbix need a more comprehensive locale tailored for your language. For example, for English speakers in the United States the full <strong><code>en_US.UTF-8<\/code><\/strong> locale is required by Zabbix.<\/p>\n<p>To see which system locale your server is currently using, use the following command:<\/p>\n<pre><code class=\"language-python\">locale\r\n<\/code><\/pre>\n<p>If your output is similar to the following:<\/p>\n<pre><code class=\"language-python\">LANG=C.UTF-8\r\nLANGUAGE=\r\nLC_CTYPE=\"C.UTF-8\"\r\nLC_NUMERIC=\"C.UTF-8\"\r\nLC_TIME=\"C.UTF-8\"\r\nLC_COLLATE=\"C.UTF-8\"\r\nLC_MONETARY=\"C.UTF-8\"\r\nLC_MESSAGES=\"C.UTF-8\"\r\nLC_PAPER=\"C.UTF-8\"\r\nLC_NAME=\"C.UTF-8\"\r\nLC_ADDRESS=\"C.UTF-8\"\r\nLC_TELEPHONE=\"C.UTF-8\"\r\nLC_MEASUREMENT=\"C.UTF-8\"\r\nLC_IDENTIFICATION=\"C.UTF-8\"\r\nLC_ALL=\r\n<\/code><\/pre>\n<p>Then you should set up a more appropriate locale in order for Zabbix to function correctly.<\/p>\n<p>To set up a comprehensive locale and use it instead of the default <code>C.UTF-8<\/code> on Ubuntu 24.04, first install the <code>locales<\/code> package:<\/p>\n<pre><code>sudo apt install locales\r\n<\/code><\/pre>\n<p>\u200cNext, edit the system locale file:<\/p>\n<pre><code>sudo nano \/etc\/locale.gen\r\n<\/code><\/pre>\n<p>Search your locale, and uncomment it. In this example, we\u2019ll uncomment\u00a0<code>en_US.UTF-8<\/code>:<\/p>\n<pre><code># en_US.UTF-8 UTF-8\r\n<\/code><\/pre>\n<p>Save and exit the file.<\/p>\n<p>Generate the locales you just configured:<\/p>\n<pre><code>sudo locale-gen\r\n<\/code><\/pre>\n<p>The output should indicate that the locale is correctly configured:<\/p>\n<pre><code>Generating locales (this might take a while)...\r\n  en_US.UTF-8... done\r\nGeneration complete.\r\n<\/code><\/pre>\n<p>Set up your locale using the <code>update-locale<\/code> and <code>export<\/code> commands:<\/p>\n<pre><code>sudo update-locale LANG=en_US.UTF-8\r\nexport LANG=en_US.UTF-8\r\n<\/code><\/pre>\n<p>Now, check your current locale:<\/p>\n<pre><code>locale\r\n<\/code><\/pre>\n<p>You should see your chosen locale set up correctly:<!-- notionvc: b8841c8a-9429-43bd-a0a0-e6c37995c691 --><\/p>\n<pre><code>LANG=en_US.UTF-8\r\nLANGUAGE=\r\nLC_CTYPE=\"en_US.UTF-8\"\r\nLC_NUMERIC=\"en_US.UTF-8\"\r\nLC_TIME=\"en_US.UTF-8\"\r\nLC_COLLATE=\"en_US.UTF-8\"\r\nLC_MONETARY=\"en_US.UTF-8\"\r\nLC_MESSAGES=\"en_US.UTF-8\"\r\nLC_PAPER=\"en_US.UTF-8\"\r\nLC_NAME=\"en_US.UTF-8\"\r\nLC_ADDRESS=\"en_US.UTF-8\"\r\nLC_TELEPHONE=\"en_US.UTF-8\"\r\nLC_MEASUREMENT=\"en_US.UTF-8\"\r\nLC_IDENTIFICATION=\"en_US.UTF-8\"\r\nLC_ALL=\r\n<\/code><\/pre>\n<p><!-- notionvc: 0752e823-b73f-4083-8ca0-6b3eab2bd182 --><\/p>\n<h3>Restart PHP<\/h3>\n<p>Now restart <code>PHP-FPM<\/code> to apply these new settings:<\/p>\n<pre><code>sudo systemctl restart php8.3-fpm.service<\/code><\/pre>\n<p><strong>Note:<\/strong> You may have another version of php-fpm installed on your system, so you might have to change <code>8.3<\/code> in the preceding command with your version of PHP. To check your <code>php-fpm<\/code> version, use the following command:<\/p>\n<pre><code>sudo systemctl status php* | grep fpm.service<\/code><\/pre>\n<p>You should receive the full name and version of your php-fpm service:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10524\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/php_for_zabbix-1024x227.webp\" alt=\"php for zabbix on Ubuntu\" width=\"600\" height=\"133\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/php_for_zabbix-1024x227.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/php_for_zabbix-300x66.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/php_for_zabbix-768x170.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/php_for_zabbix.webp 1426w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>After configuring your time zone, you can now start and enable the Zabbix server, Zabbix Agent, Nginx server, and PHP:<\/p>\n<pre><code>sudo systemctl restart zabbix-server zabbix-agent nginx php8.3-fpm<\/code><\/pre>\n<p>Then check whether the Zabbix server is running properly, run the following command:<\/p>\n<pre><code>sudo systemctl status zabbix-server<\/code><\/pre>\n<p>You should see the following output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10525\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/systemctl-status-zabbix-server-1024x319.webp\" alt=\"zabbix server status\" width=\"600\" height=\"187\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/systemctl-status-zabbix-server-1024x319.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/systemctl-status-zabbix-server-300x93.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/systemctl-status-zabbix-server-768x239.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/systemctl-status-zabbix-server.webp 1426w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Next, enable all the components to start at boot time:<\/p>\n<pre><code>systemctl enable zabbix-server zabbix-agent nginx php8.3-fpm<\/code><\/pre>\n<p>You now need to configure the Zabbix Web Interface. You will do this in the next step.<\/p>\n<h2>Step 5: Configuring Settings for the Zabbix Web Interface<\/h2>\n<p>To set up your Zabbix web interface.<\/p>\n<p>Launch your browser and go to the domain name or IP address associated with your Zabbix server:<\/p>\n<pre><code>http:\/\/your_zabbix_server_domain_or_ip<\/code><\/pre>\n<p>You will see the following screen:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10526\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/Zabbix_UI.webp\" alt=\"Zabbix UI Welcome Page\" width=\"860\" height=\"540\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/Zabbix_UI.webp 860w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/Zabbix_UI-300x188.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/Zabbix_UI-768x482.webp 768w\" sizes=\"auto, (max-width: 860px) 100vw, 860px\" \/><\/p>\n<p>Click <strong>Next step<\/strong>.<\/p>\n<p>The next screen will show a table listing all the prerequisites for Zabbix. All items should have an <strong>OK<\/strong> tag on the right.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10527\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/Zabbix_UI_prereqs.webp\" alt=\"Zabbix Prerequisites Screen\" width=\"850\" height=\"544\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/Zabbix_UI_prereqs.webp 850w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/Zabbix_UI_prereqs-300x192.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/Zabbix_UI_prereqs-768x492.webp 768w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>Scroll down to see all the prerequisites. After you have verified that everything is OK, click <strong>Next step<\/strong> to continue.<\/p>\n<p>The next screen will ask you for your database connection information.<\/p>\n<p>Your Zabbix server has been informed about your database earlier, but Zabbix's web interface also needs to have access to it.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/Zabbix-MariaDB.jpg\" alt=\"Zabbix MariaDB\" \/><\/p>\n<p>Enter your MariaDB credentials that you created earlier in step 2, then click <strong>Next step<\/strong>.<\/p>\n<p>You'll be moved to a <strong>Settings<\/strong> screen, just click <strong>Next step<\/strong> and leave the default values.<\/p>\n<p>The <strong>Zabbix server name<\/strong> is an optional parameter used in the web interface to identify each server in case you are monitoring a lot of servers at once.<\/p>\n<p>The next screen shows a Pre-installation summary so you can confirm everything is correct:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/Zabbix-Pre-installation.jpg\" alt=\"Zabbix Pre-installation\" \/><\/p>\n<p>Click <strong>Next step<\/strong>.<\/p>\n<p>You will be shown a screen that confirms that the installation has been successfully completed. This screen also informs you that a configuration file was created at <code>\/usr\/share\/zabbix\/conf\/zabbix.conf.php<\/code>. You can back up this file to preserve your Zabbix setup.<\/p>\n<p>Finally, Click <strong>Finish<\/strong>.<\/p>\n<p>You will be redirected to a login screen. The default username is <code>Admin<\/code> and the default password is <code>zabbix<\/code>.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/Zabbix-Login.jpg\" alt=\"Zabbix Login\" \/><\/p>\n<p>You'll be taken to the Zabbix dashboard:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/10\/ZabbixDashboard.jpg\" alt=\"ZabbixDashboard\" \/><\/p>\n<p>You now have Zabbix installed and you can use it to monitor your servers remotely. Check out the <a href=\"https:\/\/www.zabbix.com\/manuals\" target=\"_blank\" rel=\"noopener\">official documentation<\/a> to learn more about the capabilities of Zabbix.<\/p>\n<h2>Reader Alert<\/h2>\n<p>If you feel that the technical instructions in this tutorial are time-consuming, or beyond your expertise, you can choose a very convenient and practical solution, ready-made, fully and professionally tested, and developed by SSD Nodes (That is us \ud83d\ude0a). Just visit <a href=\"https:\/\/www.ssdnodes.com\/\">our website<\/a>, choose the server\u2019s specifications that fit your needs, and while prompted to choose among the operating systems and the 1-Click Applications we have, choose <strong>Zabbix<\/strong> from the dropdown menu, complete your checkout, and in a couple of minutes our algorithms will take care of all the technical aspects smoothly and effortlessly, just for you!<\/p>\n<h2>FAQ: Frequently Asked Questions on Zabbix<\/h2>\n<h3>Zabbix vs Checkmk<\/h3>\n<p>Zabbix and Checkmk are both powerful monitoring tools. Zabbix excels in scalability and a rich set of features for diverse environments, while Checkmk offers a more user-friendly interface and simpler configuration. The choice depends on your specific needs and technical expertise.<\/p>\n<h3>How to Deploy Zabbix with Docker Compose?<\/h3>\n<p>To deploy Zabbix with Docker Compose, use the official Zabbix Docker images and create a <code>docker-compose.yml<\/code> file. This file should define the services required for a Zabbix instance, such as Zabbix Server, Web Interface, and Database.<\/p>\n<h3>What is Zabbix's Default Username and Password?<\/h3>\n<p>The default username for Zabbix is \"Admin\" with a capital \"A,\" and the default password is \"zabbix.\" It's recommended to change these credentials after the initial login for security purposes.<\/p>\n<h3>Zabbix vs Icinga<\/h3>\n<p>Zabbix and Icinga are both open-source monitoring tools. Zabbix is known for its robust and scalable architecture, while Icinga offers better integration with other tools and a flexible configuration. Your choice should be based on your specific monitoring needs and environment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Comprehensive Guide to Installing and Configuring Zabbix on Ubuntu 24.04: Monitor Your Infrastructure with Ease.<\/p>\n","protected":false},"author":19,"featured_media":10683,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[18,30],"tags":[185,192],"class_list":["post-7151","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","category-tutorials","tag-ubuntu","tag-zabbix"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/7151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/comments?post=7151"}],"version-history":[{"count":27,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/7151\/revisions"}],"predecessor-version":[{"id":12915,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/7151\/revisions\/12915"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/media\/10683"}],"wp:attachment":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/media?parent=7151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/categories?post=7151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/tags?post=7151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}