Ad Widget

Collapse

Trying to install Zabbix 4 on CentOS 7.6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • funkytwig
    Member
    • Jun 2016
    • 37

    #1

    Trying to install Zabbix 4 on CentOS 7.6

    Been using instructions at https://www.zabbix.com/documentation...es/rhel_centos it says it covers RHEL 7 and CentOS 7 at top but then just talks about RHEL 7 so I followed the RHEL 7 instructions. I also at https://computingforgeeks.com/how-to...0-on-centos-7/

    Everything seemed to work.

    I copied the www files using

    # cp -a /usr/share/zabbix/. /var/www/html/zabbix/.

    but when I went to http://87.237.65.151/zabbix/ I got

    "Forbidden

    You don't have permission to access /zabbix/ on this server."

    Any ideas?
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    If you installed using the package, you do not need to copy the files for the web front end.
    For what reason did you copy?

    Comment

    • funkytwig
      Member
      • Jun 2016
      • 37

      #3
      OK, fixed it

      Added following to
      /etc/httpd/conf/httpd.conf
      LoadModule php5_module modules/libphp5.so AddType application/x-httpd-php .php

      Comment

      • funkytwig
        Member
        • Jun 2016
        • 37

        #4
        Originally posted by Atsushi
        If you installed using the package, you do not need to copy the files for the web front end.
        For what reason did you copy?
        Because it did not work. Also seemed logical because URL I was using was http://87.237.65.151/zabbix/


        Anyway as you see above I fixed it, php was not set up correctly.

        Comment


        • Atsushi
          Atsushi commented
          Editing a comment
          If you are doing the procedure described in the URL that you introduced and if you are using CentOS 7 standard httpd or PHP package, you can set date.timezone in /etc/httpd/conf.d/zabbix.conf Just by setting, the Web front end is working. If you are doing a non-standard repository or your own configuration changes, you will need to take into account the settings and procedures.

          The settings of LoadModule and AddType are set in the following files if you are using standard packages.
          /etc/httpd/conf.modules.d/10-php.conf
          /etc/httpd/conf.d/php.conf
      • funkytwig
        Member
        • Jun 2016
        • 37

        #5
        Yes, added LoadModule and AddType.

        Works but I have to go to http://87.237.65.151/zabbix/index.php, http://87.237.65.151/zabbix does not work;(.

        Comment


        • Atsushi
          Atsushi commented
          Editing a comment
          By default, the configuration files in the following directories are read from httpd.conf.

          /etc/httpd/conf.modules.d/
          /etc/httpd/conf.d/

          If it has not been loaded, was it deleted the setting when editing httpd.conf, or was it replaced with httpd.conf brought from another environment?
          Specific settings in /etc/httpd/conf/httpd.conf are the following two lines.

          Include conf.modules.d/*.conf
          IncludeOptional conf.d/*.conf

          If the settings in httpd.conf remain, then did you change MPM to something other than prefork?
          In CentOS 7, PHP execution via php5_module is only supported in prefork environment.
      • louis-m
        Member
        • Nov 2013
        • 70

        #6
        in http.conf

        <Directory /zabbix>
        DirectoryIndex index.php
        </Directory>

        Comment

        • funkytwig
          Member
          • Jun 2016
          • 37

          #7
          Thanks, put me on right track. I changed /etc/httpd/conf/httpd.conf

          <IfModule dir_module>

          DirectoryIndex index.php index.html

          </IfModule>

          Comment


          • Atsushi
            Atsushi commented
            Editing a comment
            If the configuration of the standard package is set, it is set to the following file.

            /etc/httpd/conf.d/php.conf

            If you are using the default /etc/httpd/conf/httpd.conf, it will be loaded automatically.
        Working...