From 57e41a037dd919619dfca2c4eb7cd40e228b3a44 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 22 Dec 2023 09:05:55 +0100 Subject: Wizard: simplify module instructions using witch-to command --- wizard/index.php | 49 +++++++++++++++++++------------------------------ 1 file changed, 19 insertions(+), 30 deletions(-) diff --git a/wizard/index.php b/wizard/index.php index 56a7fc62..9efa60c8 100644 --- a/wizard/index.php +++ b/wizard/index.php @@ -341,46 +341,35 @@ if ($php && $os && $type && !$err) { printf("
    dnf config-manager --set-enabled remi

"); } - //if ($dist == 'Fedora' || $yum == 'yum') { - if ($yum == 'yum') { + 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:"); - } - /* - if ($dist == 'Fedora') { - printf("
        dnf config-manager --set-enabled %s

  • ", $repo); - if ($mod) { - printf("
  • Command to disable the modular repository:"); - printf("
        dnf config-manager --set-disabled remi-modular

  • "); - printf("
  • Alternatively, you may prefer the modern way, by enabling the module stream for $php:"); - } - } else - */ - if ($yum == 'yum') { // EL-6, 7 + 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')); - } else { // EL-8, module only - printf("
  • You have to enable the module stream for $php:"); - } - - if ($mod) { - printf("
        dnf module reset php");
    -                printf(   "\n    dnf module install php:remi-%s
    ", $php); - printf("

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

  • "); -- cgit