ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Installation of Zabbix in Centos 7

    Scheduled Pinned Locked Moved IT Discussion
    linuxzabbixcentos 7centos
    126 Posts 6 Posters 58.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      Lakshmana
      last edited by

      The PHP installed by the following command

      sudo yum install php php-mysql php-gd php-pear -y

      Test PHP:
      Create a sample “testphp.php” file in Apache document root folder and append the lines as shown below:

      vi /var/www/html/testphp.php
      Add the following lines.

      <?php
      phpinfo();
      ?>
      Restart httpd service:

      systemctl restart httpd

      1 Reply Last reply Reply Quote 0
      • L
        Lakshmana
        last edited by

        Navigate to http://server-ip-address/testphp.php. It will display all the details about php such as version, build date and commands etc.

        phpinfo() - Mozilla Firefox_002

        If you want to install all php modules, enter the command yum install php* -y and restart the httpd service. To verify for the modules, open web browser and navigate to http://server-ip-address/testphp.php. You will then see all php modules.

        1 Reply Last reply Reply Quote 0
        • L
          Lakshmana
          last edited by

          phpMyAdmin is a free open-source web interface tool used to manage your MySQL databases. By default phpMyAdmin will not be not found in CentOS/RHEL/Scientific Linux official repositories. So let us install it from EPEL repository.

          To add EPEL repository, just follow the link.

          Install EPEL Repository on RHEL/CentOS/Scientific Linux 7
          Now, install phpMyAdmin:

          sudo yum install phpmyadmin -y
          Configure phpMyAdmin
          By default, phpMyAdmin can only be accessed from the localhost itself. To make it to accessible globally, do the following steps.

          Edit the phpmyadmin.conf file:

          vi /etc/httpd/conf.d/phpMyAdmin.conf

          1 Reply Last reply Reply Quote 0
          • L
            Lakshmana
            last edited by

            In the above path Why I have to put hashes in the configuration files?

            1 Reply Last reply Reply Quote 0
            • S
              scottalanmiller
              last edited by

              Hashes denote comments.

              1 Reply Last reply Reply Quote 1
              • L
                Lakshmana
                last edited by

                Find and comment the whole /<Directory> section and add the lines as shown below:

                [...]
                Alias /phpMyAdmin /usr/share/phpMyAdmin
                Alias /phpmyadmin /usr/share/phpMyAdmin

                Comment the following Section

                #<Directory /usr/share/phpMyAdmin/>

                <IfModule mod_authz_core.c>

                # Apache 2.4

                <RequireAny>

                Require ip 127.0.0.1

                Require ip ::1

                </RequireAny>

                </IfModule>

                <IfModule !mod_authz_core.c>

                # Apache 2.2

                Order Deny,Allow

                Deny from All

                Allow from 127.0.0.1

                Allow from ::1

                </IfModule>

                #</Directory>

                Add the following lines:

                <Directory /usr/share/phpMyAdmin/>
                Options none
                AllowOverride Limit
                Require all granted
                </Directory>
                [...]
                Edit “config.inc.php” file and change from “cookie” to “http” to change the authentication in phpMyAdmin:

                vi /etc/phpMyAdmin/config.inc.php
                Change ‘cookie’ to ‘http’.

                [...]
                /* Authentication type */
                $cfg['Servers'][$i]['auth_type'] = 'http'; // Authentication method (config, http or cookie based)?
                [...]
                Restart the Apache service:

                systemctl restart httpd

                1 Reply Last reply Reply Quote 0
                • L
                  Lakshmana
                  last edited by

                  After this step I am unable to login to the Phpadmin page in the browser

                  1 Reply Last reply Reply Quote 1
                  • L
                    Lakshmana
                    last edited by

                    What may be the issue with this?

                    1 Reply Last reply Reply Quote 0
                    • L
                      Lakshmana
                      last edited by

                      Logged in now with proper username and password

                      1 Reply Last reply Reply Quote 0
                      • L
                        Lakshmana
                        last edited by

                        Create MySQL database and user for Zabbix

                        Login to MariaDB prompt with command:

                        mysql -u root -p
                        Create a database called ‘zabbixdb’ and database user called ‘zabbixuser’.

                        Welcome to the MariaDB monitor. Commands end with ; or \g.
                        Your MariaDB connection id is 10
                        Server version: 5.5.41-MariaDB MariaDB Server

                        Copyright (c) 2000, 2014, 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;
                        Query OK, 1 row affected (0.05 sec)

                        MariaDB [(none)]> grant all privileges on zabbixdb.* to 'zabbixuser'@'localhost' identified by 'password';
                        Query OK, 0 rows affected (0.21 sec)

                        MariaDB [(none)]> flush privileges;
                        Query OK, 0 rows affected (0.00 sec)

                        MariaDB [(none)]> exit
                        Bye

                        1 Reply Last reply Reply Quote 0
                        • L
                          Lakshmana
                          last edited by

                          Error comes here??
                          [lakshmana@dny-lnx-zabbix ~]$ mysql -u zabbixuser -p zabbixdb < /usr/share/doc/zabbix-server-mysql-2.4.5/create/schema.sql
                          -bash: /usr/share/doc/zabbix-server-mysql-2.4.5/create/schema.sql: No such file or directory

                          S 1 Reply Last reply Reply Quote 0
                          • mlnewsM
                            mlnews
                            last edited by

                            Well that password needs to be changed now 😉

                            1 Reply Last reply Reply Quote 2
                            • S
                              scottalanmiller @Lakshmana
                              last edited by

                              @Lakshmana said:

                              [lakshmana@dny-lnx-zabbix ~]$ mysql -u zabbixuser -p zabbixdb < /usr/share/doc/zabbix-server-mysql-2.4.5/create/schema.sql

                              Well the error tells us that this file does not exist. Have you looked for it yet?

                              1 Reply Last reply Reply Quote 1
                              • JaredBuschJ
                                JaredBusch @scottalanmiller
                                last edited by

                                @scottalanmiller said:

                                The EPEL is already installed as part of a base install

                                No it is not.

                                The default install choice is the minimal package. That has never included EPEL.

                                S 1 Reply Last reply Reply Quote 0
                                • L
                                  Lakshmana
                                  last edited by

                                  I have verified that the file is present in the path
                                  But the error is coming. Why??

                                  S 1 Reply Last reply Reply Quote 0
                                  • L
                                    Lakshmana
                                    last edited by

                                    Whether any issue in the permission of the files.since the files has the following permission

                                    -rw-r--r-- 1 root root 1978341 Aug 10 04:57 images.sql
                                    -rw-r--r-- 1 root root 104816 Aug 10 04:58 schema.sql
                                    -rw-r--r-- 1 root root 972942 Aug 10 13:16 data.sql
                                    drwxr-xr-x 4 root root 4096 Sep 7 12:38 ..

                                    S 1 Reply Last reply Reply Quote 0
                                    • S
                                      scottalanmiller @JaredBusch
                                      last edited by

                                      @JaredBusch said:

                                      @scottalanmiller said:

                                      The EPEL is already installed as part of a base install

                                      No it is not.

                                      You are missing context. He is on an NTG Lab machine where the base install installs it. It was in the base install handed to him.

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        scottalanmiller @Lakshmana
                                        last edited by

                                        @Lakshmana said:

                                        I have verified that the file is present in the path
                                        But the error is coming. Why??

                                        How did you verify? I verified on the same box and the file is not there.

                                        file /usr/share/doc/zabbix-server-mysql-2.4.5/create/schema.sql
                                        /usr/share/doc/zabbix-server-mysql-2.4.5/create/schema.sql: cannot open (No such file or directory)
                                        
                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          scottalanmiller @Lakshmana
                                          last edited by

                                          @Lakshmana said:

                                          Whether any issue in the permission of the files.since the files has the following permission

                                          -rw-r--r-- 1 root root 1978341 Aug 10 04:57 images.sql
                                          -rw-r--r-- 1 root root 104816 Aug 10 04:58 schema.sql
                                          -rw-r--r-- 1 root root 972942 Aug 10 13:16 data.sql
                                          drwxr-xr-x 4 root root 4096 Sep 7 12:38 ..

                                          Since the file does not exist, permissions will not be the issue.

                                          1 Reply Last reply Reply Quote 0
                                          • L
                                            Lakshmana
                                            last edited by Lakshmana

                                            I verified there by using this command

                                            cd /usr/share/doc/zabbix-server-mysql-2.4.5/create/
                                            ls
                                            there are three files in it

                                            S 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 7 / 7
                                            • First post
                                              Last post