Ad Widget

Collapse

Zabbix 5.0 installation php dependencies problem using remi.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anonamoose
    Junior Member
    • May 2019
    • 16

    #1

    Zabbix 5.0 installation php dependencies problem using remi.

    This is a Centos 7.8 server.

    We use puppet to manage our servers and I was going to spin up a new zabbix server rather than upgrade the old one with puppet. The puppet module for php uses remi which I'd prefer anyway since I can install PHP 7.4.

    Here are my installed packages:

    php.x86_64 7.4.8-2.el7.remi @remi-php74
    php-bcmath.x86_64 7.4.8-2.el7.remi @remi-php74
    php-cli.x86_64 7.4.8-2.el7.remi @remi-php74
    php-common.x86_64 7.4.8-2.el7.remi @remi-php74
    php-devel.x86_64 7.4.8-2.el7.remi @remi-php74
    php-fedora-autoloader.noarch 1.0.1-2.el7.remi @remi
    php-fpm.x86_64 7.4.8-2.el7.remi @remi-php74
    php-gd.x86_64 7.4.8-2.el7.remi @remi-php74
    php-json.x86_64 7.4.8-2.el7.remi @remi-php74
    php-ldap.x86_64 7.4.8-2.el7.remi @remi-php74
    php-mbstring.x86_64 7.4.8-2.el7.remi @remi-php74
    php-mysqlnd.x86_64 7.4.8-2.el7.remi @remi-php74
    php-pdo.x86_64 7.4.8-2.el7.remi @remi-php74
    php-pear.noarch 1:1.10.12-1.el7.remi @remi
    php-process.x86_64 7.4.8-2.el7.remi @remi-php74
    php-sodium.x86_64 7.4.8-2.el7.remi @remi-php74
    php-xml.x86_64 7.4.8-2.el7.remi @remi-p


    Documentation says:

    Using third party PHP repositories


    If for some reasons Red Hat Software Collections can not be used, these alternative methods are available:
    • Using any third-party repository that provides PHP.
    • Building PHP from source.
    However when I try to install zabbix-web-mysql-scl this gets output:

    Error: Package: zabbix-web-deps-scl-5.0.2-1.el7.noarch (zabbix-frontend)
    Requires: rh-php72-php-gd
    Error: Package: zabbix-web-deps-scl-5.0.2-1.el7.noarch (zabbix-frontend)
    Requires: rh-php72
    Error: Package: zabbix-web-deps-scl-5.0.2-1.el7.noarch (zabbix-frontend)
    Requires: rh-php72-php-mbstring
    Error: Package: zabbix-web-deps-scl-5.0.2-1.el7.noarch (zabbix-frontend)
    Requires: rh-php72-php-bcmath
    Error: Package: zabbix-web-deps-scl-5.0.2-1.el7.noarch (zabbix-frontend)
    Requires: rh-php72-php-xml
    Error: Package: zabbix-web-mysql-scl-5.0.2-1.el7.noarch (zabbix-frontend)
    Requires: rh-php72-php-mysqlnd
    Error: Package: zabbix-web-deps-scl-5.0.2-1.el7.noarch (zabbix-frontend)
    Requires: rh-php72-php-ldap
    Error: Package: zabbix-web-deps-scl-5.0.2-1.el7.noarch (zabbix-frontend)
    Requires: rh-php72-php-fpm
    I thought maybe I could just install zabbix-web.noarch. The web page doesn't load though, so I'm assuming I have to install the zabbix-web-mysql-scl which seems to be indicated in the directions and there's no zabbix.conf file under /etc/httpd/conf.d

    So if I can use a third party PHP how do I get around this dependency problem?

    I did try to get the redhat repo installed but had some issues including being asked to register using an account to install it.

    Thanks for any input.
    Last edited by anonamoose; 13-07-2020, 23:10.
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    Zabbix official packages for RHEL 7 cannot coexist with remi because it depends on SCL. Even CentOS 7 has an SCL package for CentOS, so if you use PHP of SCL, you can build the environment using the Zabbix official package dependency as it is.

    When using remi's PHP package, the only Zabbix official package that can be used for the web front end is the zabbix-web package. (For Japan, you can also use zabbix-web-japanese.) In this case, it is necessary to prepare the configuration file because it does not include the linkage with the web server and the PHP-FPM settings.

    If you use CentOS 7 standard httpd and also use PHP-FPM, I think it is easy to extract the configuration file from the RHEL 8 package and use it. The procedure for extracting the configuration file from the RHEL 8 package will be as follows.

    Code:
    # mkdir temp
    # cd temp/
    # wget https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-apache-conf-5.0.1-1.el8.noarch.rpm
    # wget https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-web-5.0.1-1.el8.noarch.rpm
    # rpm2cpio zabbix-apache-conf-5.0.1-1.el8.noarch.rpm | cpio -id
    # rpm2cpio zabbix-web-5.0.1-1.el8.noarch.rpm | cpio -id
    # cp etc/httpd/conf.d/zabbix.conf /etc/httpd/conf.d/
    # cp etc/php-fpm.d/zabbix.conf /etc/php-fpm.d/
    # vi /etc/php-fpm.d/zabbix.conf
    -----
    listen.acl_users = apache,nginx
    -----

    -----
    listen.acl_users = apache
    -----
    -----
    ; php_value[date.timezone] = Europe/Riga
    -----

    -----
    php_value[date.timezone] = YourTimeZone
    -----

    If you have other environment, please create your own configuration file according to the environment.

    Comment


    • anonamoose
      anonamoose commented
      Editing a comment
      Okay. Thank you very much for you quick reply. I'll give the config extraction a try
  • riridulum
    Junior Member
    • Apr 2021
    • 2

    #3
    RHEL 7 use rh-php 72/73 not epel and remi php72/73 ---yum remove remi*

    Comment

    Working...