Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Install Zabbix Server  (Read 1816 times)

0 Members and 1 Guest are viewing this topic.

sibij

  • Guest
Install Zabbix Server
« on: July 28, 2018, 01:31:55 pm »
Install Zabbix Server

Install Zabbix server and Zabbix PHP frontend application by adding the official Zabbix repositories to your system package manager by issuing the following commands with root privileges.

Install Zabbix on Debian

Code: [Select]
# wget http://repo.zabbix.com/zabbix/3.4/debian/pool/main/z/zabbix-release/zabbix-release_3.4-1+stretch_all.deb
# dpkg -i zabbix-release_3.4-1+stretch_all.deb
# apt update
# apt install zabbix-server-mysql zabbix-frontend-php

Install Zabbix on Ubuntu

Code: [Select]
# wget http://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1+xenial_all.deb
# dpkg -i zabbix-release_3.4-1+xenial_all.deb
# apt-get update
# apt install zabbix-server-mysql zabbix-frontend-php

Install Zabbix on CentOS

Code: [Select]
# rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
# yum install zabbix-server-mysql zabbix-web-mysql

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

8. Next, issue the below command with root privileges in order to install Zabbix agent in your system. Zabbix client will be used to actively monitor server’s local system resources.
Code: [Select]
# apt install zabbix-agent    [On Debian/Ubuntu]
# yum install zabbix-agent    [On RHEL/CentOS 7]

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

Code: [Select]
# systemctl restart apache2   [On Debian/Ubuntu]
# systemctl restart httpd     [On RHEL/CentOS 7]
# setenforce 0                [Disable SELinux on RHEL/CentOS 7]

Step 4: Configure Zabbix Server and Agent

10. Before configuring the server, first, import Zabbix initial database schema to MySQL database. Import the schema against the database created for Zabbix application, by issuing the below command.

Code: [Select]
# zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -u zabbixuser zabbixdb -p
11. On the next step, setup Zabbix server by opening the main configuration file for editing with the following command.

Code: [Select]
# nano /etc/zabbix/zabbix_server.conf
In zabbix_server.conf file search and modify the following lines as presented in the below excerpt. Update the variables to reflect your own database settings.

Code: [Select]
DBHost=localhost
DBName=zabbixdb
DBUser=zabbixuser
DBPassword=password1

12. Finally, save and close Zabbix server configuration file by pressing Ctrl+o and Ctrl+x file and restart Zabbix daemon to apply changes by issuing the below command.

Code: [Select]
# systemctl restart zabbix-server.service
13. Next, configure Zabbix Agent configuration file by updating the following lines. First, open the file for editing.

Code: [Select]
# nano /etc/zabbix/zabbix_agentd.conf
Zabbix agent configuration file excerpt:

Server=127.0.0.1
ListenPort=10050

14. Save and close Zabbix agent configuration file and restart Zabbix Agent to reflect changes by issuing the following command.

Code: [Select]
# systemctl restart zabbix-agent.service
Install and Configure Zabbix Frontend Interface

 it’s time to install Zabbix Server Frontend web interface. In order to accomplish this step open a browser and navigate to your server IP Address using HTTP or HTTPS protocol and the welcome screen should appear. Hit the Next button to move forward.

Code: [Select]
http://192.168.1.151/setup.php
OR
https://192.168.1.151/setup.php

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

2. After a series of checks, if all pre-requires values are satisfied, hit the Next button to proceed further.

3. On the next step provide the settings for MySQL database, hit the Test connection button to test MySQL connectivity and move to the step by pressing the Next button.

4. On the next step provide the settings for MySQL database, hit the Test connection button to test MySQL connectivity and move to the step by pressing the Next button.

5. Next, check all the configurations parameters, enter command line and issue the following command to grant zabbix permissions to write the apache web configuration file in conf directory.

Then switch back to web interface and hit Next button to write zabbix configuration file.

6. After the installation process completes, a congratulations message will appear in your browser. Hit on Finish button to exit Zabbix frontend installer.

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

Code: [Select]
https://your_domain.tld/zabbix/
Username: Admin
Password: zabbix

8. After you’ve logged in to Zabbix admin panel, you can start to configure Zabbix and add new network resources to be monitored by Zabbix server.

9. To change Zabbix frontend admin account password, navigate to Administration -> Users –> User and hit on Change password button and add your new password, as illustrated in the below screenshot. Finally, hit on the bottom Update button in order to save admin account new password.