-->

DEVOPSZONES

  • Recent blogs

    How to Install Zabbix 4.4 in RHEL/CentOS 7

    How to Install Zabbix 4.4 in RHEL/CentOS 7


    Zabbix 4.4

    Set the SELinux in disabled mode, use the following command and reboot your server:

    [root@zabbixserver ~]# sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
    [root@zabbixserver ~]# reboot


    Install apache and mariadb 

    [root@zabbixserver ~]# yum update
    [root@zabbixserver ~]# yum install httpd mariadb-server -y



    Start Apache and mariaDB Services.


    [root@zabbixserver ~]# systemctl enable httpd && systemctl start httpd
    Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.

    [root@zabbixserver ~]# systemctl enable mariadb && systemctl start mariadb
    Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
    [root@zabbixserver ~]#









    Set Mariadb root Password:




    Install Zabbix Server with MySQL


    Before starting the installation we need to enable the zabbix repository using this commands:


    [root@zabbixserver ~]# rpm --import http://repo.zabbix.com/RPM-GPG-KEY-ZABBIX
    [root@zabbixserver ~]# rpm -ivh https://repo.zabbix.com/zabbix/4.3/rhel/7/x86_64/zabbix-release-4.3-3.el7.noarch.rpm

    Retrieving https://repo.zabbix.com/zabbix/4.3/rhel/7/x86_64/zabbix-release-4.3-3.el7.noarch.rpm
    warning: /var/tmp/rpm-tmp.JFk5lA: Header V4 RSA/SHA512 Signature, key ID a14fe591: NOKEYPreparing...                          ################################# [100%]Updating / installing...
       1:zabbix-release-4.3-3.el7         ################################# [100%]
    [root@zabbixserver ~]#





    Now use the below command to install Zabbix and necessary packages


    [root@zabbixserver ~]# yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-get zabbix-sender zabbix-java-gateway -y



     Edit PHP timezone

    Open the file /etc/httpd/conf.d/zabbix.conf created by Zabbix with your favorite editor.


    [root@zabbix ~]# vi /etc/httpd/conf.d/zabbix.conf

    It’s necessary to uncomment the “date.timezone” setting and replace it with your timezone:


    php_value date.timezone Asia/Kolkata

    Save the file and don’t forget to restart httpd service using the below command:


    [root@zabbix ~]# systemctl restart httpd





    Edit create and import initial zabbix database and user

    First we need to create zabbix database (zabbixdb) and create a zabbix user (zabbixuser).


    [root@zabbixserver ~]# mysql -u root -p
    Enter password:Welcome to the MariaDB monitor.  Commands end with ; or \g.Your MariaDB connection id is 10Server version: 5.5.60-MariaDB MariaDB ServerCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    MariaDB [(none)]> CREATE DATABASE zabbixdb CHARACTER SET utf8 COLLATE utf8_bin;
    Query OK, 1 row affected (0.00 sec)
    MariaDB [(none)]> GRANT ALL PRIVILEGES ON zabbixdb.* TO zabbixuser@localhost IDENTIFIED BY "Your Password";
    Query OK, 0 rows affected (0.00 sec)
    MariaDB [(none)]> FLUSH PRIVILEGES;
    Query OK, 0 rows affected (0.00 sec)
    MariaDB [(none)]> exit
    Bye
    [root@zabbixserver ~]#







    After creating the Zabbix database and user we need to import the zabbix initial database using the below commands:
    [root@zabbixserver ~]# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -u zabbixuser -p zabbixdb


    Now we need to edit database configuration in the Zabbix server configuration file zabbix_server.conf


    [root@zabbix ~]# vi /etc/zabbix/zabbix_server.conf
    Specify the database name for zabbix , database user name and the password
    DBHost=localhost
    DBName=zabbixdb
    DBUser=zabbixuser
    DBPassword=YOUR_PASSWORD







    Now enable and start zabbix service


    [root@zabbixserver ~]# systemctl enable zabbix-server
    Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-server.service to /usr/lib/systemd/system/zabbix-server.service.
    [root@zabbixserver ~]# systemctl start zabbix-server
    [root@zabbixserver ~]# systemctl enable zabbix-agent
    Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-agent.service to /usr/lib/systemd/system/zabbix-agent.service.
    [root@zabbixserver ~]# systemctl start zabbix-agent
    [root@zabbixserver ~]#





    Setup Zabbix Web Frontend

    Navigate to http://ip_address/zabbix or http://host_name/zabbix


    Make sure all configurations are ok.




    Please enter DB details:


    Please enter Zabbix Server details:


    Summary:

    Finish the installation:



    Login Prompt:
    Default username and password is "Admin" & "Zabbix"


    Zabbix dashboard: 


    Other Articles on Zabbix:


    Interesting Articles on Kubernetes:
    Kubernetes : Kubernetes Node Management, Maintenance, Delete
    How to add a  New Worker Node to a existing kubernetes Cluster
    MinIO Client Installation and Quickstart
    PLEG is not healthy: Kubernetes Worker Node is in "NotReady" state
    Backup MySQL databases in Kubernetes
    How to Run Automated Tasks in Kubernetes with a cronjob
    How to Completely remove Kubernetes

    No comments