'5.4', 'RHEL 6' => '5.3', 'RHEL 5' => '5.1', 'CentOS 7' => '5.4', 'CentOS 6' => '5.3', 'CentOS 5' => '5.1', 'Fedora 25' => '7.0', 'Fedora 24' => '5.6', 'Fedora 23' => '5.6', 'Fedora 22' => '5.6', ]; $osname = [ 'RHEL 7' => 'RHEL-7', 'RHEL 6' => 'RHEL-6', 'RHEL 5' => 'RHEL-5 (maintained until March 2017)', 'CentOS 7' => 'CentOS 7', 'CentOS 6' => 'CentOS 6', 'CentOS 5' => 'CentOS 5 (maintained until March 2017)', 'Fedora 25' => 'Fedora 25', 'Fedora 24' => 'Fedora 24', 'Fedora 23' => 'Fedora 23 (no support since December 2016)', 'Fedora 22' => 'Fedora 22 (no support since July 2016)', ]; $grpname = [ 'RHEL' => 'Red Hat Enterprise Linux', 'CentOS' => 'CentOS', 'Fedora' => 'Fedora', ]; $types = [ 'base' => 'Single version', 'scl' => 'Multiple versions', ]; $phpvers = [ '7.1' => 'remi-php71', '7.0' => 'remi-php70', '5.6' => 'remi-php56', '5.5' => 'remi-php55', '5.4' => 'remi', ]; $phpname = [ '7.1' => '7.1.0 (active support until Dec 2018)', '7.0' => '7.0.14 (active support until Dec 2017)', '5.6' => '5.6.29 (security only support until Dec 2018)', '5.5' => '5.5.38 (no upstream support since July 2016)', '5.4' => '5.4.45 (no upstream support since Sept 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); ?>

Remi's RPM repository - Configuration wizard

Blog | Forums | Repository

Operating system and version selection

  • Operating system:

  • PHP version:

  • Type of installation:

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 have reached its end of life, upgrade is strongly recommended.

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

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

  • ", $os, $osvers[$os]); if ($ver < 6 && version_compare($php, '7.0', '>=')) { printf("
  • Sorry, but PHP version %s is not available for %s, you need to run a more recent OS.

  • ", $php, $os); $err = true; } } if ($php && $os && $type && !$err) { if ($dist == 'Fedora') { $yum = 'dnf'; printf("
  • Command to install the Remi repository configuration package:"); printf("
        $yum install http://rpms.remirepo.net/fedora/remi-release-%d.rpm
    ", $ver); printf("

  • "); } else { $yum = 'yum'; printf("
  • Command to install the EPEL repository configuration package:"); if ($ver < 6) { printf("
        wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-%d.noarch.rpm\n", $ver);
                printf("    $yum install epel-release-latest-%d.noarch.rpm\n", $ver);
                printf("

  • Command to install the Remi repository configuration package:"); printf("
        wget http://rpms.remirepo.net/enterprise/remi-release-%d.rpm\n", $ver);
                printf("    $yum install http://rpms.remirepo.net/enterprise/remi-release-%d.rpm
    ", $ver); } else { 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 http://rpms.remirepo.net/enterprise/remi-release-%d.rpm
    ", $ver); } printf("

  • "); printf("
  • Command to install the yum-utils package (for the yum-config-manager command):"); printf("
        $yum install yum-utils
    "); printf("

  • "); if ($dist == 'RHEL') { 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

  • "); printf("
  • Packages have the same name than the base repository, ie php-*

  • "); 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, $osvers[$os], '<')) { printf("
  • Sorry, but PHP version older than %s are not available for %s, try multiple versions.

  • ", $osvers[$os], $os); } else if (version_compare($php, $osvers[$os], '=')) { printf("
  • PHP version %s packages are available for %s in remi repository

  • ", $php, $os); printf("
  • Command to upgrade:"); printf("
        $yum --enablerepo=remi update 'php*'
    "); printf("

  • "); printf("
  • Command to install additional packages:"); printf("
        $yum --enablerepo=remi install php-xxx
    "); printf("

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

  • ", $php, $os, $phpvers[$php]); if ($ver < 6) { printf("
  • You have to enable the repository by setting enabled=1 in the [%s] section of /etc/yum.repos.d/remi.repo", $phpvers[$php]); } else { printf("
  • Command to enable the repository:"); if ($dist == 'Fedora') { printf("
        dnf config-manager --set-enabled %s
    ", $phpvers[$php]); } else { printf("
        yum-config-manager --enable %s
    ", $phpvers[$php]); } } printf("

  • "); printf("
  • Command to upgrade (the repository only provides PHP):"); printf("
        $yum update
    "); printf("

  • "); printf("
  • Command to install additional packages:"); printf("
        $yum install php-xxx
    "); printf("

  • "); if (version_compare($php, '7.0', '>=')) { printf("
  • Command to install testing packages:"); printf("
        $yum --enablerepo=%s-test install php-xxx
    ", $phpvers[$php]); 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 ($dist=='Fedora') { printf("
  • The %s collection is available in the remi repository

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

  • "); printf("
  • Command to install additional packages:"); printf("
        $yum --enablerepo=remi install %s-php-xxx
    ", $scl); } else { printf("
  • The %s collection is available in the remi-safe 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); } printf("

  • "); 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("

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

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

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

  • "; } ?>