banner



How To Install Zabbix Server On Centos 7

Zabbix is an Open Source, high-level enterprise software designed to monitor and keep rail of networks, servers, and applications in real-time. Build in a server-customer model, Zabbix tin collect unlike types of information that are used to create historical graphics and output operation or load trends of the monitored targets.

The server has the ability to check standard networking services (HTTP, FTP, SMTP, IMAP, etc) without the need to install extra software on the monitored hosts.

However, in order to assemble data and create statistics near local services or other specific system resource that run on remote instances, such as CPU, disks, internal system process, RAM, etc, you need to install and configure a Zabbix amanuensis.

Following are the 4-commodity series near the Zabbix Monitoring awarding:

Part 1: Install Zabbix on Debian/Ubuntu and RHEL/CentOS/Fedora/Rocky Linux/AlmaLinux

This tutorial will focus on how to install the latest version of the Zabbix Server on Debian/Ubuntu and RHEL/CentOS /Fedora/Rocky Linux/AlmaLinux with MySQL/MariaDB backend database to shop nerveless data, PHP and Apache Web Server every bit the mainly web interface.

Of import: The given Zabbix instructions as well piece of work on all Debian derivatives and RedHat-based distros similar RHEL/CentOS/Fedora and Rocky Linux/AlmaLinux.

Step 1: Install Apache Web Server and PHP

i. First, update the software packages so install Apache Spider web Server alongside PHP and its extensions in guild to provide the web-backed functionality for Zabbix Server by issuing the post-obit command.

          --------------- On Debian/Ubuntu ---------------          $ sudo apt update && sudo apt upgrade $ sudo apt install apache2 php php-mysql php-mysqlnd php-ldap php-bcmath php-mbstring php-gd php-pdo php-xml libapache2-mod-php          --------------- On RHEL-based Distros ---------------          # yum update && yum upgrade # yum -y install epel-release # yum install httpd php php-mysqlnd php-ldap php-bcmath php-mbstring php-gd php-xml        

two. Side by side, you demand to tune the PHP interpreter and adjust some values in club to run Zabbix Server. So, open up Apache php.ini configuration file for editing by issuing the following command:

$ sudo nano /etc/php/vii.X/apache2/php.ini 	[On          Debian/Ubuntu]  # 6 /etc/php.ini				[On          RHEL/CentOS/]        

Now, search with CTRL+C and replace the following PHP values as it follows:

post_max_size = 16M upload_max_filesize = 2M max_execution_time 300 max_input_time = 300 memory_limit 128M session.auto_start = 0 mbstring.func_overload = 0 appointment.timezone = Europe/Bucharest        

Replace the appointment.timezone variable according to your server's geographical location. A list of PHP-supported Timezones tin exist plant here http://php.net/manual/en/timezones.php.

3. After updating the PHP configuration file, restart Apache daemon to reflect changes by issuing the following command.

$ sudo systemctl restart apache2.service	 [On          Debian/Ubuntu]  # systemctl restart httpd.service		 [On          RHEL/CentOS]        

Footstep 2: Install MariaDB Database and Library

4. On the next footstep install the MariaDB database and MySQL development library from binary packages. Every bit MariaDB installs on your system y'all will be asked to prepare a password for the database root user during installation (Only on Debian). Choose a strong password, echo it and wait for the installation to stop.

$ sudo apt-become install mariadb-server mariadb-client libmysqld-dev	 [On          Debian/Ubuntu]  # yum install mariadb-server mariadb-client mariadb-devel	         [On          RHEL/CentOS]        
Set MySQL root Password
Set MySQL root Countersign

5. When the installation of Mariadb finishes, start and secure the database by issuing mysql_secure_installation command with system root privileges ( answer with yeah for removing anonymous users, disable root login remotely, remove test database and access to information technology and employ all changes).

$ sudo systemctl start mariadb $ sudo mysql_secure_installation OR # systemctl offset mariadb # mysql_secure_installation        

Use the below screenshot as a guide.

Secure MySQL Installation

vi. The next requirement for Zabbix is setting upwardly an RDBMS database. Log in to your LAMP stack database component (MySQL or MariaDB) and create a Zabbix database and the credentials required to manage the database, past issuing the post-obit commands.

Brand sure you replace the database name, user, and password to match your own settings.

# mysql -u root -p          MariaDB [(none)]>          create database zabbixdb character ready utf8 collate utf8_bin;          MariaDB [(none)]>          grant all privileges on zabbixdb.* to 'zabbixuser'@'localhost' identified by 'password1';          MariaDB [(none)]>          flush privileges;          MariaDB [(none)]>          exit        

Step 3: Install Zabbix Server

vii. At present, start to install the Zabbix server and Zabbix PHP frontend application by adding the official Zabbix repositories to your organisation package manager by issuing the following commands with root privileges.

Install Zabbix on Debian

          --------------- On Debian eleven ---------------          $ sudo wget https://repo.zabbix.com/zabbix/5.4/debian/pool/chief/z/zabbix-release/zabbix-release_5.4-1+debian11_all.deb $ sudo dpkg -i zabbix-release_5.4-one+debian11_all.deb $ sudo apt update $ sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent          --------------- On Debian ten ---------------          $ sudo wget https://repo.zabbix.com/zabbix/5.4/debian/pool/master/z/zabbix-release/zabbix-release_5.four-1+debian10_all.deb $ sudo dpkg -i zabbix-release_5.four-1+debian10_all.deb $ sudo apt update $ sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-amanuensis        

Install Zabbix on Ubuntu

          --------------- On Ubuntu 20.04 ---------------          $ sudo wget https://repo.zabbix.com/zabbix/five.four/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.four-one+ubuntu20.04_all.deb $ sudo dpkg -i zabbix-release_5.4-i+ubuntu20.04_all.deb $ sudo apt update $ sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent          --------------- On Ubuntu 18.04 ---------------          $ sudo wget https://repo.zabbix.com/zabbix/5.4/ubuntu/pool/primary/z/zabbix-release/zabbix-release_5.4-1+ubuntu18.04_all.deb $ sudo dpkg -i zabbix-release_5.4-i+ubuntu18.04_all.deb $ sudo apt update $ sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent        

Install Zabbix on RHEL-based Distros

          --------------- On RHEL/CentOS 8 ---------------          # rpm -Uvh https://repo.zabbix.com/zabbix/5.four/rhel/eight/x86_64/zabbix-release-5.4-i.el8.noarch.rpm # dnf clean all # dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-amanuensis          --------------- On RHEL/CentOS 7 ---------------          # rpm -Uvh https://repo.zabbix.com/zabbix/v.iv/rhel/7/x86_64/zabbix-release-five.four-1.el7.noarch.rpm # dnf clean all # dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-amanuensis        

If you want to download and compile an older version, please visit Zabbix official Sourceforge repositories.

8. On the next step, restart the Apache HTTP server in order to apply the Zabbix configuration file installed for Apache.

$ sudo systemctl restart apache2   [On          Debian/Ubuntu]  # systemctl restart httpd     [On          RHEL/CentOS]  # setenforce 0                [Disable SELinux on          RHEL/CentOS]        

Step iv: Configure Zabbix Server and Amanuensis

nine. Before configuring the server, first, import Zabbix's initial database schema to the MySQL database. Import the schema against the database created for the Zabbix awarding, past issuing the beneath command.

$ sudo zcat /usr/share/md/zabbix-sql-scripts/mysql/create.sql.gz | mysql -u zabbixuser zabbixdb -p OR # zcat /usr/share/doc/zabbix-sql-scripts/mysql/create.sql.gz | mysql -u zabbixuser zabbixdb -p        

x. On the next step, ready up the Zabbix server by opening the main configuration file for editing with the following control.

$ sudo nano /etc/zabbix/zabbix_server.conf OR # nano /etc/zabbix/zabbix_server.conf        

In zabbix_server.conf file search and change the following lines as presented in the beneath excerpt. Update the variables to reflect your ain database settings.

DBHost=localhost DBName=zabbixdb DBUser=zabbixuser DBPassword=password1        

11. Finally, relieve and close the Zabbix server configuration file by pressing Ctrl+o and Ctrl+x file and restarting the Zabbix daemon to apply changes by issuing the beneath command.

# systemctl restart zabbix-server.service        

12. Side by side, configure the Zabbix Agent configuration file by updating the following lines. First, open up the file for editing.

# nano /etc/zabbix/zabbix_agentd.conf        

Zabbix agent configuration file excerpt:

Server=127.0.0.1 ListenPort=10050        

13. Save and shut the Zabbix agent configuration file and restart Zabbix Agent to reverberate changes by issuing the following command.

# systemctl restart zabbix-agent.service        

Stride 5: Install and Configure Zabbix Frontend Interface

15. At present it's time to install the Zabbix Server Frontend web interface. In order to achieve this step open a browser and navigate to your server IP Address using HTTP or HTTPS protocol and the welcome screen should appear. Hitting the Next button to motility frontward.

http://192.168.1.151/zabbix/setup.php OR https://192.168.1.151/zabbix/setup.php        

On the first welcome screen, just hit the Adjacent step button to move to the new step of the installation process.

Zabbix Web Installer
Zabbix Web Installer

16. Later on a series of checks, if all pre-requires values are satisfied, hit the Side by side push button to proceed further.

Zabbix Checks Pre-requisites
Zabbix Checks Pre-requisites

17. On the next step provide the settings for the MySQL database, hit the Test connectedness push button to examination MySQL connectivity, and motion to the step by pressing the Side by side button.

Zabbix Database Settings
Zabbix Database Settings

xviii. Next, supply the Host (or IP Address) and the Port of the Zabbix server (use the host localhost and the port 10051 because Zabbix server is configured to run on the aforementioned host as the Zabbix frontend spider web interface in this tutorial) and a Name for Zabbix frontend installation. When you're done hitting Side by side to go on.

Zabbix Server Details
Zabbix Server Details

19. Next, check all the configurations parameters.

Zabbix Pre Installation Summary
Zabbix Pre Installation Summary

twenty. After the installation process completes, a congratulations bulletin will announced in your browser. Hit on the Finish button to exit the Zabbix frontend installer.

Zabbix Installation Complete
Zabbix Installation Complete

21. Finally, navigate to your server IP address or domain name by appending /zabbix URL address and log in to the Zabbix web admin panel with the default credentials presented below.

https://your_domain.tld/zabbix/  Username: Admin Countersign: zabbix        
Zabbix Login
Zabbix Login

22. After yous've logged in to the Zabbix admin panel, yous tin can start to configure Zabbix and add new network resource to be monitored by the Zabbix server.

Zabbix Dashboard
Zabbix Dashboard

23. To change the Zabbix frontend admin account countersign, navigate to Assistants -> Users –> User and hit on the Change countersign button and add together your new password, as illustrated in the below screenshot. Finally, striking on the bottom Update push in order to salvage the admin account'south new password.

Zabbix Admin Password Change
Zabbix Admin Password Modify

That'll! The next series concerning the Zabbix monitoring system volition discuss how to set up the server further using the spider web interface and how to install and configure Zabbix agents on different Linux distributions or even Windows systems.

Source: https://www.tecmint.com/install-and-configure-zabbix-monitoring-on-debian-centos-rhel/

Posted by: vinsonareimis.blogspot.com

0 Response to "How To Install Zabbix Server On Centos 7"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel