summaryrefslogtreecommitdiffstats
path: root/wizard/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'wizard/index.php')
-rw-r--r--wizard/index.php104
1 files changed, 54 insertions, 50 deletions
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 @@
<?php
define('FC_EOL', 23);
define('FC_DEV', 26);
-define('EL_EOL', 4);
+define('EL_EOL', 5);
define('EL_DEV', 8);
define('COUNTER', __DIR__ . "/counter.txt");
$osvers = [
'RHEL 7' => '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("<li>Command to install the EPEL repository configuration package:");
- if ($ver < 6) {
- printf("<pre> 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("</li><br /><li>Command to install the Remi repository configuration package:");
- printf("<pre> wget http://rpms.remirepo.net/enterprise/remi-release-%d.rpm\n", $ver);
- printf(" $yum install http://rpms.remirepo.net/enterprise/remi-release-%d.rpm</pre>", $ver);
- } else {
- printf("<pre> $yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-%d.noarch.rpm</pre>", $ver);
- printf("</li><br /><li>Command to install the Remi repository configuration package:");
- printf("<pre> $yum install http://rpms.remirepo.net/enterprise/remi-release-%d.rpm</pre>", $ver);
- }
+ printf("<pre> $yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-%d.noarch.rpm</pre>", $ver);
+ printf("</li><br /><li>Command to install the Remi repository configuration package:");
+ printf("<pre> $yum install http://rpms.remirepo.net/enterprise/remi-release-%d.rpm</pre>", $ver);
printf("</li><br />");
+
printf("<li>Command to install the yum-utils package (for the yum-config-manager command):");
printf("<pre> $yum install yum-utils</pre>");
printf("</li><br />");
@@ -188,16 +187,17 @@ if ($php && $os && $type && !$err) {
printf("<li>Sorry, but PHP version older than <b>%s</b> are not available for <b>%s</b>, try multiple versions.</li><br />", $osvers[$os], $os);
} else {
- printf("<li>PHP version <b>%s</b> packages are available for <b>%s</b> in <b>%s</b> repository</li><br />", $php, $os, $phpvers[$php]);
- if ($ver < 6) {
- printf("<li>You have to enable the repository by setting <b>enabled=1</b> 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("<li>Command to enable the repository:");
- if ($dist == 'Fedora') {
- printf("<pre> dnf config-manager --set-enabled %s</pre>", $phpvers[$php]);
- } else {
- printf("<pre> yum-config-manager --enable %s</pre>", $phpvers[$php]);
- }
+ $repo = $phpvers[$php];
+ }
+ printf("<li>PHP version <b>%s</b> packages are available for <b>%s</b> in <b>%s</b> repository</li><br />", $php, $os, $repo);
+ printf("<li>Command to enable the repository:");
+ if ($dist == 'Fedora') {
+ printf("<pre> dnf config-manager --set-enabled %s</pre>", $repo);
+ } else {
+ printf("<pre> yum-config-manager --enable %s</pre>", $repo);
}
printf("</li><br />");
printf("<li>Command to upgrade (the repository only provides PHP):");
@@ -210,7 +210,7 @@ if ($php && $os && $type && !$err) {
if (version_compare($php, '7.0', '>=')) {
printf("<li>Command to install <b>testing</b> packages:");
- printf("<pre> $yum --enablerepo=%s-test install php-xxx</pre>", $phpvers[$php]);
+ printf("<pre> $yum --enablerepo=%s-test install php-xxx</pre>", $repo);
printf("</li><br />");
}
@@ -224,29 +224,33 @@ if ($php && $os && $type && !$err) {
printf("<li>You want <b>multiple versions </b> which means using a <a href='https://www.softwarecollections.org/en/'>Software Collection</a></li><br />");
$scl='php'.str_replace('.', '', $php);
- if ($dist=='Fedora') {
- printf("<li>The <b>%s</b> collection is available in the <b>remi</b> repository</li><br />", $scl);
- printf("<li>Command to install:");
- printf("<pre> $yum --enablerepo=remi install %s</pre>", $scl);
- printf("</li><br />");
- printf("<li>Command to install additional packages:");
- printf("<pre> $yum --enablerepo=remi install %s-php-xxx</pre>", $scl);
+ if (version_compare($php, $osmin[$os], '<')) {
+ printf("<li>Sorry, but PHP version older than <b>%s</b> are not available for <b>%s</b>.</li><br />", $osmin[$os], $os);
} else {
- printf("<li>The <b>%s</b> collection is available in the <b>remi-safe</b> repository</li><br />", $scl);
- printf("<li>Command to install:");
- printf("<pre> $yum install %s</pre>", $scl);
+ if ($dist=='Fedora') {
+ printf("<li>The <b>%s</b> collection is available in the <b>remi</b> repository</li><br />", $scl);
+ printf("<li>Command to install:");
+ printf("<pre> $yum --enablerepo=remi install %s</pre>", $scl);
+ printf("</li><br />");
+ printf("<li>Command to install additional packages:");
+ printf("<pre> $yum --enablerepo=remi install %s-php-xxx</pre>", $scl);
+ } else {
+ printf("<li>The <b>%s</b> collection is available in the <b>remi-safe</b> repository</li><br />", $scl);
+ printf("<li>Command to install:");
+ printf("<pre> $yum install %s</pre>", $scl);
+ printf("</li><br />");
+ printf("<li>Command to install <b>additional</b> packages:");
+ printf("<pre> $yum install %s-php-xxx</pre>", $scl);
+ }
+ printf("</li><br />");
+ printf("<li>Command to install <b>testing</b> packages:");
+ printf("<pre> $yum --enablerepo=remi-test install %s-php-xxx</pre>", $scl);
printf("</li><br />");
- printf("<li>Command to install <b>additional</b> packages:");
- printf("<pre> $yum install %s-php-xxx</pre>", $scl);
- }
- printf("</li><br />");
- printf("<li>Command to install <b>testing</b> packages:");
- printf("<pre> $yum --enablerepo=remi-test install %s-php-xxx</pre>", $scl);
- printf("</li><br />");
- printf("<li>Command to check the installed version and available extensions:");
- printf("<pre> %s --version\n %s --modules</pre>", $scl, $scl);
- printf("</li><br />");
+ printf("<li>Command to check the installed version and available extensions:");
+ printf("<pre> %s --version\n %s --modules</pre>", $scl, $scl);
+ printf("</li><br />");
+ }
$counter++;
@file_put_contents(COUNTER, "$counter\n");
}