['8.0', '8.1'], 'RHEL 8' => ['7.4', '8.0'], 'RHEL 7' => '5.4', 'CentOS 9' => ['8.0', '8.1'], 'CentOS 8' => ['7.4', '8.0'], 'CentOS 7' => '5.4', 'Fedora 39' => '8.2', 'Fedora 38' => '8.2', ]; $osmin = [ 'RHEL 9' => '7.4', 'RHEL 8' => '5.6', 'RHEL 7' => '5.4', 'CentOS 9' => '7.4', 'CentOS 8' => '5.6', 'CentOS 7' => '5.4', 'Fedora 39' => '7.4', 'Fedora 38' => '7.4', ]; $osminbase = [ 'RHEL 9' => '7.4', 'RHEL 8' => '7.2', 'RHEL 7' => '5.4', 'CentOS 9' => '7.4', 'CentOS 8' => '7.2', 'CentOS 7' => '5.4', 'Fedora 39' => '7.4', 'Fedora 38' => '7.4', ]; $osmax = [ 'RHEL 9' => '8.3', 'RHEL 8' => '8.3', 'RHEL 7' => '8.3', 'CentOS 9' => '8.3', 'CentOS 8' => '8.3', 'CentOS 7' => '8.3', 'Fedora 39' => '8.3', 'Fedora 38' => '8.3', ]; $osname = [ ':rhel' => 'Red Hat Enterprise Linux', 'RHEL 9' => 'RHEL 9.3', 'RHEL 8' => 'RHEL 8.9', 'RHEL 7' => 'RHEL 7.9 (maintained until June 2024)', ':centos' => 'CentOS Stream, CentOS Linux, Alma Linux, Rocky Linux and other clones', 'CentOS 9' => 'EL 9', 'CentOS 8' => 'EL 8', 'CentOS 7' => 'EL 7 (maintained until June 2024)', ':fedora' => 'Fedora Linux', 'Fedora 39' => 'Fedora 39', 'Fedora 38' => 'Fedora 38', // 'Fedora 37' => 'Fedora 37 (End of Life since Dec 7th 2024)', ]; $types = [ 'base' => 'Default / Single version (simplest way)', 'scl' => 'Multiple versions simultaneously', ]; $arches = [ 'x86_64' => 'x86_64', 'aarch64' => 'aarch64', 'ppc64le' => 'ppc64le', 's390x' => 's390x', ]; $phpvers = [ // use false when only SCL '8.3' => 'remi-php83', '8.2' => 'remi-php82', '8.1' => 'remi-php81', '8.0' => 'remi-php80', '7.4' => 'remi-php74', '7.3' => 'remi-php73', '7.2' => 'remi-php72', '7.1' => 'remi-php71', '7.0' => 'remi-php70', '5.6' => 'remi-php56', '5.5' => 'remi-php55', '5.4' => 'remi-php54', ]; $phpname = [ // ':devel' => 'Development version, not ready for production', ':stable' => 'Stable versions - usage recommended', '8.3' => '8.3.2 (active support until November 2025)', '8.2' => '8.2.15 (active support until December 2024)', ':secure' => 'Security only versions', '8.1' => '8.1.27 (security only support until November 2024)', ':eol' => 'Deprecated versions - usage discouraged', '8.0' => '8.0.30 (no upstream support since November 2023)', '7.4' => '7.4.33 (no upstream support since November 2022)', '7.3' => '7.3.33 (no upstream support since December 2021)', '7.2' => '7.2.34 (no upstream support since November 2020)', '7.1' => '7.1.33 (no upstream support since December 2019)', '7.0' => '7.0.33 (no upstream support since December 2018)', '5.6' => '5.6.40 (no upstream support since January 2019)', '5.5' => '5.5.38 (no upstream support since July 2016)', '5.4' => '5.4.45 (no upstream support since September 2015)', ]; $php = (isset($_POST['php']) && isset($phpvers[$_POST['php']]) ? $_POST['php'] : false); $os = (isset($_POST['os']) && isset($osvers[$_POST['os']]) ? $_POST['os'] : false); $type = (isset($_POST['type']) && isset($types[$_POST['type']]) ? $_POST['type'] : false); $arch = (isset($_POST['arch']) && isset($arches[$_POST['arch']]) ? $_POST['arch'] : 'x86_64'); ?>

Remi's RPM repository - Configuration wizard

Blog | Forum | Repository | Wizard

Please STOP WAR NOW!

'; echo '

'; } ?>

Operating system and version selection

  • Operating system:

  • Wanted PHP version:

  • Type of installation:

  • Architecture:

Wizard answer

    Debug: $os, $type, $php (%s)

    ", print_r($_POST, true)); $err = false; if ($os) { list($dist, $ver) = explode(' ', $os, 2); if (($dist == 'Fedora' && $ver<=FC_EOL) || ($dist != 'Fedora' && $ver<=EL_EOL)) { printf("
  • %s has reached its end of life, upgrade is strongly recommended.

  • ", $os); } else if (($dist == 'Fedora' && $ver>=FC_DEV) || ($dist != 'Fedora' && $ver>=EL_DEV)) { printf("
  • WARNING: %s is a development version, not ready for production.

  • ", $os); } else if ($ver == 7 || $ver == 37) { $days = ($ver == 7 ? mktime(0,0,0,6,30,2024) : mktime(0,0,0,12,7,2023)); $eol = date("F Y", $days); $days = (int)(($days - time()) / (60 * 60 * 24)); $weeks = round($days/7); $months = round($days/30); if ($months >= 6) { printf("
  • WARNING: %s will reach its end of life in $eol, in $months months, upgrade is heartily recommended.

  • ", $os); } else if ($weeks >= 8) { printf("
  • WARNING: %s will reach its end of life in $eol, in $weeks weeks, upgrade is strongly recommended.

  • ", $os); } else { printf("
  • WARNING: %s will reach its end of life in $eol, in $days days, upgrade is urgently recommended.

  • ", $os); } } } if ($php && $os) { printf("
  • %s provides PHP version %s in its official repository

  • ", $os, is_array($osvers[$os]) ? implode(', ', $osvers[$os]) : $osvers[$os] ); if (version_compare($php, PHP_SEC, '<')) { printf("
  • WARNING, PHP version %s have reached its end of life, despite packages have security fixes, you should consider a maintained version.

  • ", $php); } // else printf("
  • PHP %s is a maintained version (> %s).

  • ", $php, PHP_SEC); } if ($arch == 'ppc64le' || $arch == 's390x') { printf("
  • $arch is not planed for now

  • "); $err =true; } else if ($arch == 'aarch64') { if ($os && $dist === 'Fedora') { if ($ver < 39) { printf("
  • aarch64 for Fedora $ver is not planed for now

  • "); $err =true; } } else if ($os && $ver < 8) { printf("
  • aarch64 for Enterprise Linux $ver is not planed for now

  • "); $err =true; } else if ($os && $ver == 8) { // no older SCLs $osmin['RHEL 8'] = $osmin['CentOS 8'] = '7.2'; } } if ($php && $os && $type && !$err) { if ($dist == 'Fedora') { $mod = ($ver >= 29); $yum = 'dnf'; printf("
  • Command to install the Remi repository configuration package:"); printf("
        $yum install https://rpms.remirepo.net/fedora/remi-release-%d.rpm
    ", $ver); printf("

  • "); } else { $mod = ($ver >= 8); if ($ver >= 8) { $yum = 'dnf'; } else { $yum = 'yum'; } switch ($os) { case 'RHEL 8': case 'RHEL 9': printf("
  • Command to enabled the CRB repository:"); printf("
        subscription-manager repos --enable codeready-builder-for-rhel-%d-%s-rpms

  • ", $ver, $arch); break; case 'CentOS 8': case 'CentOS 9': printf("
  • Command to enabled the CRB repository:"); printf("
        dnf config-manager --set-enabled %s

  • ", $ver < 9 ? 'powertools' : 'crb'); break; } if ($ver < EL_DEV || EPEL_DEV > 0) { printf("
  • Command to install the EPEL repository configuration package:"); printf("
        $yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-%d.noarch.rpm

  • ", $ver); } printf("
  • Command to install the Remi repository configuration package:"); printf("
        $yum install https://rpms.remirepo.net/enterprise/remi-release-%d.rpm
    ", $ver); printf("

  • "); if ($yum === "yum") { printf("
  • Command to install the yum-utils package (for the yum-config-manager command):"); printf("
        $yum install yum-utils
    "); } if ($ver == EL_DEV && EPEL_DEV < 2) { printf("
  • As EPEL is not yet fully populated, you probably have to enable the main repository:"); printf("
        dnf config-manager --enable remi

  • ", $ver); } printf("
    "); if ($dist == 'RHEL' && $ver < 8) { printf("
  • On RHEL you (probably) need to enable the optional channel for some dependencies.

  • "); printf("
  • Command to enable:"); if ($ver == 7) { printf("
        subscription-manager repos --enable=rhel-7-server-optional-rpms
    "); } else { printf("
        rhn-channel --add --channel=rhel-$(uname -i)-server-optional-6
    "); } printf("

  • "); } } if ($type == 'base') { printf("
  • You want a single version which means replacing base packages from the distribution

  • "); $min = $osminbase[$os]; printf("
  • Packages have the same name than the base repository, ie php-*

  • "); if (version_compare($php, $osmax[$os], '>')) { printf("
  • Sorry, but PHP version greater than %s are not available for %s.

  • ", $osmax[$os], $os); } else if (!$phpvers[$php]) { printf("
  • Sorry, but PHP version %s are not yet available for %s as single version, try multiple versions.

  • ", $php, $os); } else if (version_compare($php, $min, '<')) { printf("
  • Sorry, but PHP version older than %s are not available for %s, try multiple versions.

  • ", $min, $os); } else { if ($dist == 'Fedora' && version_compare($php, $tmp=(is_array($osvers[$os]) ? $osvers[$os][0] : $osvers[$os]), '=')) { $repo = 'remi'; } else { $repo = $phpvers[$php]; } if ($dist != 'Fedora') { printf("
  • Some common dependencies are available in remi-safe repository, which is enabled by default

  • "); } else if ($repo != 'remi') { printf("
  • Some common dependencies are available in remi repository, which need to be enabled"); printf("
        dnf config-manager --set-enabled remi

  • "); } if ($mod) { printf("
  • PHP version %s packages are available for %s in remi-modular repository

  • ", $php, $os); printf("
  • You have to enable the module stream for $php, and update the old version if installed:"); printf("
        dnf module switch-to php:remi-%s
    ", $php); printf("

  • "); printf("
  • If no version is installed, command to install the php stream default profile:"); printf("
        dnf module install php:remi-%s
    ", $php); printf("

  • "); } else { printf("
  • PHP version %s packages are available for %s in %s repository

  • ", $php, $os, $repo); printf("
  • Command to enable the repository:"); printf("
        yum-config-manager --disable 'remi-php*'");
                    printf(   "\n    yum-config-manager --enable   %s

  • ", $repo); printf("
  • You can check the list of the enabled repositories:"); printf("
        yum repolist

  • "); printf("
  • If the priorities plugin is enabled, ensure %s have higher priority (a lower value) than %s

  • ", $repo, ($dist == 'Fedora' ? 'fedora' : 'base and updates')); printf("
  • If an old version is installed, command to upgrade:"); printf("
        $yum update
    "); printf("

  • "); printf("
  • If no version is installed, command to install the php command:"); printf("
        $yum install php-cli
    "); printf("

  • "); } printf("
  • Command to install additional packages (xxx for SAPI or extension name):"); printf("
        $yum install php-xxx
    "); printf("

  • "); if (version_compare($php, '7.0', '>=')) { printf("
  • Command to install testing packages:"); if ($dist != 'Fedora' && $mod) { printf("
        $yum --enablerepo=remi-modular-test install php-xxx
    ", $repo); } else { printf("
        $yum --enablerepo=%s-test install php-xxx
    ", $repo); } printf("

  • "); } printf("
  • Command to check the installed version and available extensions:"); printf("
        php --version\n    php --modules
    "); printf("

  • "); } $counter++; @file_put_contents(COUNTER, "$counter\n"); } else { printf("
  • You want multiple versions which means using a Software Collection

  • "); $scl='php'.str_replace('.', '', $php); if (version_compare($php, $osmax[$os], '>')) { printf("
  • Sorry, but PHP version greater than %s are not available for %s (%s).

  • ", $osmax[$os], $os, $arch); } else if (version_compare($php, $osmin[$os], '<')) { printf("
  • Sorry, but PHP version older than %s are not available for %s (%s).

  • ", $osmin[$os], $os, $arch); } else { if (!$phpvers[$php]) { printf("
  • WARNING: PHP version %s is a development version, not ready for production.

  • ", $php); } if ($dist=='Fedora') { $repo = 'remi'; //($phpvers[$php] ? 'remi' : 'remi-test'); // Dev version printf("
  • Some common dependencies are available in remi repository, which need to be enabled"); printf("
        dnf config-manager --set-enabled remi

  • "); printf("
  • The %s collection is available in the $repo repository

  • ", $scl); printf("
  • Command to install:"); printf("
        $yum install %s
    ", $scl); printf("

  • "); printf("
  • Command to install additional packages:"); printf("
        $yum install %s-php-xxx
    ", $scl); } else { $repo = 'remi-safe'; //($phpvers[$php] ? 'remi-safe' : 'remi-test'); // Dev version $opt = ""; //($phpvers[$php] ? '' : '--enablerepo=remi-test'); // Dev version printf("
  • The %s collection is available in the $repo repository

  • ", $scl); printf("
  • Command to install:"); printf("
        $yum $opt install %s
    ", $scl); printf("

  • "); printf("
  • Command to install additional packages:"); printf("
        $yum $opt install %s-php-xxx
    ", $scl); } printf("

  • "); if ($phpvers[$php]) { printf("
  • Command to install testing packages:"); printf("
        $yum --enablerepo=remi-test install %s-php-xxx
    ", $scl); printf("

  • "); } printf("
  • Command to check the installed version and available extensions:"); printf("
        %s --version\n    %s --modules
    ", $scl, $scl); printf("

  • "); printf("
  • When a single version is installed, command in default path (/usr/bin/php) can be installed:"); printf("
        $yum install %s-syspaths
    ", $scl); printf("

  • "); } $counter++; @file_put_contents(COUNTER, "$counter\n"); } } else if (!$os) { echo "
  • Please select the operating system you are running.

  • "; echo "
  • Tips: check the content of /etc/redhat-release.

  • "; } else if (!$php) { echo "
  • Please select PHP version you want to use.

  • "; echo "
  • Tips: read: PHP Supported Versions

  • "; } else if (!$err) { echo "
  • Please select installation type

  • "; echo "
  • Tips: read the FAQ

  • "; } ?>