{"id":3067,"date":"2025-04-15T00:05:47","date_gmt":"2022-11-02T05:37:00","guid":{"rendered":""},"modified":"2025-02-02T00:46:19","modified_gmt":"2025-02-01T23:46:19","slug":"how-to-install-and-configure-zabbix-server-and-client-on-rocky-linux-9","status":"publish","type":"post","link":"https:\/\/netcloud24.com\/knowledgebase\/how-to-install-and-configure-zabbix-server-and-client-on-rocky-linux-9\/","title":{"rendered":"Linux VPS &#038; VPS Windows Setup Guide | NetCloud24 and Configure Zabbix Server and Client on Rocky Linux 9"},"content":{"rendered":"<p>\u00a0<\/p>\n<\/p>\n<header>\n<h1>\u00a0<\/h1>\n<\/header>\n<article>\n<p><strong>Zabbix<\/strong> is a popular open-source monitoring solution that allows you to monitor the health and performance of servers, network devices, and other IT infrastructure. In this guide, we will walk you through how to install and configure Zabbix Server and Client on <strong>Rocky Linux 9<\/strong>. Hosting your Zabbix server on a  ensures optimal performance and scalability with the dedicated resources of a <strong>VPS server<\/strong>.<\/p>\n<h2>Step 1: Update Your VPS Server<\/h2>\n<p>Before installing Zabbix, ensure your <a href=\"https:\/\/ie.netcloud24.com\">VPS server<\/a> is up to date. Run the following commands to update your Rocky Linux system:<\/p>\n<pre><code>sudo dnf update -y<\/code><\/pre>\n<p>Running Zabbix on a <strong>Windows VPS<\/strong> allows you to take advantage of dedicated CPU, memory, and storage resources, ensuring better performance for monitoring large environments.<\/p>\n<h2>Step 2: Install Apache, MariaDB, and PHP (LAMP Stack)<\/h2>\n<p>Zabbix requires a web server, a database, and PHP to run. Install the LAMP stack (Linux, Apache, MariaDB, PHP) by running the following command:<\/p>\n<pre><code>sudo dnf install httpd mariadb-server mariadb php php-mysqlnd php-fpm php-json -y<\/code><\/pre>\n<p>Start and enable Apache and MariaDB:<\/p>\n<pre><code>\r\nsudo systemctl start httpd\r\nsudo systemctl enable httpd\r\nsudo systemctl start mariadb\r\nsudo systemctl enable mariadb\r\n<\/code><\/pre>\n<h2>Step 3: Secure MariaDB<\/h2>\n<p>It is important to secure MariaDB. Run the following command to start the security script:<\/p>\n<pre><code>sudo mysql_secure_installation<\/code><\/pre>\n<p>Follow the prompts to set a root password and secure the database.<\/p>\n<h2>Step 4: Add the Zabbix Repository and Install Zabbix Server<\/h2>\n<p>Next, add the Zabbix repository for Rocky Linux 9. Run the following commands to install the Zabbix repository and the Zabbix server package:<\/p>\n<pre><code>\r\nsudo rpm -Uvh https:\/\/repo.zabbix.com\/zabbix\/6.0\/rhel\/9\/x86_64\/zabbix-release-6.0-1.el9.noarch.rpm\r\nsudo dnf clean all\r\nsudo dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-agent -y\r\n<\/code><\/pre>\n<h2>Step 5: Create a Database for Zabbix<\/h2>\n<p>Log in to MariaDB and create a database for Zabbix:<\/p>\n<pre><code>sudo mysql -u root -p<\/code><\/pre>\n<p>Run the following SQL commands to create the database and user for Zabbix:<\/p>\n<pre><code>\r\nCREATE DATABASE zabbix CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;\r\nCREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'your_password';\r\nGRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost';\r\nFLUSH PRIVILEGES;\r\nEXIT;\r\n<\/code><\/pre>\n<p>Replace <code>your_password<\/code> with a secure password of your choice.<\/p>\n<h2>Step 6: Import the Initial Zabbix Database Schema<\/h2>\n<p>To initialize the Zabbix database schema, run the following command (you will be prompted for the password of the <code>zabbix<\/code> user):<\/p>\n<pre><code>\r\nzcat \/usr\/share\/zabbix-sql-scripts\/mysql\/server.sql.gz | mysql -u zabbix -p zabbix\r\n<\/code><\/pre>\n<h2>Step 7: Configure the Zabbix Server<\/h2>\n<p>Edit the Zabbix server configuration file to set the database information:<\/p>\n<pre><code>sudo nano \/etc\/zabbix\/zabbix_server.conf<\/code><\/pre>\n<p>Update the following parameters with your database credentials:<\/p>\n<pre><code>\r\nDBName=zabbix\r\nDBUser=zabbix\r\nDBPassword=your_password\r\n<\/code><\/pre>\n<h2>Step 8: Configure PHP for Zabbix<\/h2>\n<p>Edit the PHP configuration for Zabbix by opening the following file:<\/p>\n<pre><code>sudo nano \/etc\/php-fpm.d\/zabbix.conf<\/code><\/pre>\n<p>Ensure the following settings are configured correctly:<\/p>\n<pre><code>\r\nphp_value[date.timezone] = Europe\/London\r\n<\/code><\/pre>\n<p>Replace <code>Europe\/London<\/code> with your own timezone.<\/p>\n<h2>Step 9: Start Zabbix Server and Agent<\/h2>\n<p>Start the Zabbix server and agent services, and enable them to run on boot:<\/p>\n<pre><code>\r\nsudo systemctl restart zabbix-server zabbix-agent httpd php-fpm\r\nsudo systemctl enable zabbix-server zabbix-agent httpd php-fpm\r\n<\/code><\/pre>\n<h2>Step 10: Configure Firewall for Zabbix<\/h2>\n<p>If you have a firewall enabled, open the necessary ports for Zabbix (port 10051 for the server and port 10050 for the agent):<\/p>\n<pre><code>\r\nsudo firewall-cmd --permanent --add-port=10051\/tcp\r\nsudo firewall-cmd --permanent --add-port=10050\/tcp\r\nsudo firewall-cmd --reload\r\n<\/code><\/pre>\n<h2>Step 11: Complete Zabbix Installation via Web Interface<\/h2>\n<p>Now, open your web browser and navigate to <code>http:\/\/your-server-ip\/zabbix<\/code>. You will be guided through the installation process. Use the database information you configured earlier.<\/p>\n<p>Once the setup is complete, you can log in to the Zabbix web interface using the default username <strong>Admin<\/strong> and password <strong>zabbix<\/strong>. It is recommended to change the default password immediately after the first login.<\/p>\n<h2>Step 12: Install Zabbix Agent on Client Machines<\/h2>\n<p>To monitor other machines (clients), install the Zabbix agent on those machines. For each client, run the following commands:<\/p>\n<pre><code>\r\nsudo rpm -Uvh https:\/\/repo.zabbix.com\/zabbix\/6.0\/rhel\/9\/x86_64\/zabbix-release-6.0-1.el9.noarch.rpm\r\nsudo dnf clean all\r\nsudo dnf install zabbix-agent -y\r\n<\/code><\/pre>\n<p>Edit the Zabbix agent configuration file to point to your Zabbix server:<\/p>\n<pre><code>sudo nano \/etc\/zabbix\/zabbix_agentd.conf<\/code><\/pre>\n<p>Update the following parameters:<\/p>\n<pre><code>\r\nServer=your-zabbix-server-ip\r\nServerActive=your-zabbix-server-ip\r\nHostname=your-client-hostname\r\n<\/code><\/pre>\n<p>Start the Zabbix agent on the client machine:<\/p>\n<pre><code>\r\nsudo systemctl start zabbix-agent\r\nsudo systemctl enable zabbix-agent\r\n<\/code><\/pre>\n<h2>Step 13: Optimize Your VPS Server for Zabbix<\/h2>\n<p>For optimal performance, hosting Zabbix on a  ensures that your monitoring platform has access to dedicated resources such as CPU, memory, and storage. A <strong>VPS server<\/strong> allows for better performance and scalability, especially when monitoring large-scale environments with many clients and devices. As your monitoring needs grow, you can easily scale your VPS resources to ensure Zabbix continues to operate efficiently.<\/p>\n<h2>Conclusion<\/h2>\n<p>Zabbix is a robust solution for monitoring infrastructure, and by following this guide, you can install and configure both the server and client on Rocky Linux 9. Hosting your Zabbix server on a  ensures your monitoring setup performs optimally and scales with your needs.<\/p>\n<p>For more information about VPS hosting and optimizing your Zabbix setup, visit  today.<\/p>\n<\/article>\n<footer>\n<p>\u00a9 2024 Windows VPS &#8211; All Rights Reserved<\/p>\n<\/footer>\n<div class=\"post-author-box\" style=\"border-top:1px solid #ddd;margin-top:20px;padding-top:15px;\">\n<p><strong>Author:<\/strong> \u0141ukasz Bodziony<\/p>\n<p><strong>Website:<\/strong> <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a><\/p>\n<p><em>\u0141ukasz Bodziony is the CEO and founder of <a href=\"https:\/\/netcloud24.com\" target=\"_blank\" rel=\"dofollow\">NETCLOUD24<\/a>, a global VPS hosting brand proudly originating from Poland. With extensive experience in cloud computing, virtualization, and server management, he delivers high-performance <strong>Windows VPS<\/strong> and <strong>Remote Desktop Services (RDS)<\/strong> solutions to clients across Europe, North America, and beyond.<\/em><\/p>\n<p><em>His expertise covers a wide range of technologies, including <strong>Microsoft Azure<\/strong>, <strong>Proxmox VE<\/strong>, <strong>Amazon Web Services (AWS)<\/strong>, and numerous other virtualization and cloud platforms.<\/em><\/p>\n<p><em>Beyond running his hosting business, \u0141ukasz also provides <strong>professional paid server configuration and optimization services<\/strong> for companies and individuals. Outside of work, he is dedicated to caring for his children and building a secure future for them.<\/em><\/p>\n<p><em>If you are interested in working with him or need expert assistance with your hosting, cloud environment, or server setup, feel free to reach out via <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a>.<\/em><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 \u00a0 Zabbix is a popular open-source monitoring solution that allows you to monitor the health and performance of servers, network devices, and other IT infrastructure. In this\u2026<\/p>\n","protected":false},"author":1,"featured_media":3421,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[],"tags":[14,12,11,23,20,21,22,17,7,8,6,10,18,19,15,24,16,5,13,9],"class_list":["post-3067","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-cheapvps","tag-cloudvps","tag-hostingvps","tag-rds","tag-rdscal","tag-remotedesktop","tag-remotedesktopvps","tag-servervps","tag-ukvps","tag-virtualserver","tag-vpshosting","tag-vpsserver","tag-vpssolutions","tag-vpswindows","tag-vpswithwindows","tag-windowsrds","tag-windowsserver","tag-windowsvps","tag-windowsvpshosting","tag-windowsvpsuk"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/3067","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=3067"}],"version-history":[{"count":0,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/3067\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media\/3421"}],"wp:attachment":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=3067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=3067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=3067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}