From 2f6a04fa86ee6bc80ed83da7c2dfd927f384269e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 30 Mar 2017 12:13:34 +0200 Subject: Wizard: drop EL-5, F22, add F26 + cleanup --- wizard/index.php | 104 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 54 insertions(+), 50 deletions(-) (limited to 'wizard') diff --git a/wizard/index.php b/wizard/index.php index 72026053..965e5838 100644 --- a/wizard/index.php +++ b/wizard/index.php @@ -10,33 +10,39 @@ '5.4', 'RHEL 6' => '5.3', - 'RHEL 5' => '5.1', 'CentOS 7' => '5.4', 'CentOS 6' => '5.3', - 'CentOS 5' => '5.1', + 'Fedora 26' => '7.1', 'Fedora 25' => '7.0', 'Fedora 24' => '5.6', 'Fedora 23' => '5.6', - 'Fedora 22' => '5.6', +]; +$osmin = [ + 'RHEL 7' => '5.4', + 'RHEL 6' => '5.4', + 'CentOS 7' => '5.4', + 'CentOS 6' => '5.4', + 'Fedora 26' => '5.6', + 'Fedora 25' => '5.4', + 'Fedora 24' => '5.4', + 'Fedora 23' => '5.4', ]; $osname = [ 'RHEL 7' => 'RHEL-7', - 'RHEL 6' => 'RHEL-6', - 'RHEL 5' => 'RHEL-5 (maintained until March 2017)', + 'RHEL 6' => 'RHEL-6 (maintained until March 2020)', 'CentOS 7' => 'CentOS 7', - 'CentOS 6' => 'CentOS 6', - 'CentOS 5' => 'CentOS 5 (maintained until March 2017)', + 'CentOS 6' => 'CentOS 6 (maintained until March 2020)', + 'Fedora 26' => 'Fedora 26 (development version, not yet released)', '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', @@ -150,18 +156,11 @@ if ($php && $os && $type && !$err) { } 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("
        $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("

  • "); @@ -188,16 +187,17 @@ if ($php && $os && $type && !$err) { printf("
  • Sorry, but PHP version older than %s are not available for %s, try multiple versions.

  • ", $osvers[$os], $os); } 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]); + if ($dist == 'Fedora' && version_compare($php, $osvers[$os], '=')) { + $repo = 'remi'; } 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]); - } + $repo = $phpvers[$php]; + } + printf("
  • PHP version %s packages are available for %s in %s repository

  • ", $php, $os, $repo); + printf("
  • Command to enable the repository:"); + if ($dist == 'Fedora') { + printf("
        dnf config-manager --set-enabled %s
    ", $repo); + } else { + printf("
        yum-config-manager --enable %s
    ", $repo); } printf("

  • "); printf("
  • Command to upgrade (the repository only provides PHP):"); @@ -210,7 +210,7 @@ if ($php && $os && $type && !$err) { if (version_compare($php, '7.0', '>=')) { printf("
  • Command to install testing packages:"); - printf("
        $yum --enablerepo=%s-test install php-xxx
    ", $phpvers[$php]); + printf("
        $yum --enablerepo=%s-test install php-xxx
    ", $repo); printf("

  • "); } @@ -224,29 +224,33 @@ if ($php && $os && $type && !$err) { 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); + if (version_compare($php, $osmin[$os], '<')) { + printf("
  • Sorry, but PHP version older than %s are not available for %s.

  • ", $osmin[$os], $os); } else { - printf("
  • The %s collection is available in the remi-safe repository

  • ", $scl); - printf("
  • Command to install:"); - printf("
        $yum install %s
    ", $scl); + 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 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("

  • "); + 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"); } -- cgit