--- doc/install/linux/install.pl 2021/07/28 13:37:10 1.78 +++ doc/install/linux/install.pl 2021/12/20 03:13:29 1.79 @@ -78,7 +78,7 @@ if (!open(LOG,">>loncapa_install.log")) &mt('Stopping execution.')."\n"; exit; } else { - print LOG '$Id: install.pl,v 1.78 2021/07/28 13:37:10 raeburn Exp $'."\n"; + print LOG '$Id: install.pl,v 1.79 2021/12/20 03:13:29 raeburn Exp $'."\n"; } # @@ -222,6 +222,18 @@ sub get_distro { $distro = 'scientific'.$ver; $updatecmd = 'yum install LONCAPA-prerequisites'; $installnow = 'yum -y install LONCAPA-prerequisites'; + } elsif ($versionstring =~ /Rocky Linux release ([\d.]+)/) { + my $ver = $1; + $ver =~ s/\.\d+$//; + $distro = 'rocky'.$ver; + $updatecmd = 'dnf install LONCAPA-prerequisites'; + $installnow = 'dnf -y install LONCAPA-prerequisites'; + } elsif ($versionstring =~ /AlmaLinux release ([\d.]+) /) { + my $ver = $1; + $ver =~ s/\.\d+$//; + $distro = 'alma'.$ver; + $updatecmd = 'dnf install LONCAPA-prerequisites'; + $installnow = 'dnf -y install LONCAPA-prerequisites'; } else { print &mt('Unable to interpret [_1] to determine system type.', '/etc/redhat-release')."\n"; @@ -619,7 +631,7 @@ sub check_mysql_running { if ($1 >= 34) { $process = 'mariadb'; } - } elsif ($distro =~ /^(?:centos|rhes|scientific|oracle)(\d+)/) { + } elsif ($distro =~ /^(?:centos|rhes|scientific|oracle|rocky|alma)(\d+)/) { if ($1 >= 7) { $mysqldaemon ='mariadb'; $process = 'mysqld'; @@ -766,7 +778,7 @@ sub chkconfig { if ($version >= 26) { $daemon{'ntp'} = 'chronyd'; } - } elsif ($distro =~ /^(?:centos|rhes|scientific|oracle)(\d+)/) { + } elsif ($distro =~ /^(?:centos|rhes|scientific|oracle|rocky|alma)(\d+)/) { my $version = $1; if ($version >= 7) { $uses_systemctl{'ntp'} = 1; @@ -882,7 +894,7 @@ sub uses_firewalld { if ($1 >= 18) { $checkfirewalld = 1; } - } elsif ($distro =~ /^(?:centos|rhes|scientific|oracle)(\d+)/) { + } elsif ($distro =~ /^(?:centos|rhes|scientific|oracle|rocky|alma)(\d+)/) { if ($1 >= 7) { $checkfirewalld = 1; } @@ -1075,7 +1087,7 @@ sub chkapache { } else { my $configfile = 'httpd.conf'; my $mpmfile = 'mpm.conf'; - if ($distro =~ /^(?:centos|rhes|scientific|oracle)(\d+)$/) { + if ($distro =~ /^(?:centos|rhes|scientific|oracle|rocky|alma)(\d+)$/) { if ($1 >= 7) { $configfile = 'apache2.4/httpd.conf'; } elsif ($1 > 5) { @@ -2306,7 +2318,7 @@ if ($have_tarball && !$updateshown) { if ($1 > 6) { $lc_uses_systemctl = 1; } - } elsif ($distro =~ /^(?:rhes|centos)(\d+)$/) { + } elsif ($distro =~ /^(?:rhes|centos|rocky|alma)(\d+)$/) { if ($1 > 7) { $lc_uses_systemctl = 1; } @@ -2739,7 +2751,7 @@ sub get_mysql_version { sub copy_httpd_conf { my ($instdir,$distro,$hostname) = @_; my $configfile = 'httpd.conf'; - if ($distro =~ /^(?:centos|rhes|scientific|oracle)(\d+)$/) { + if ($distro =~ /^(?:centos|rhes|scientific|oracle|rocky|alma)(\d+)$/) { if ($1 >= 7) { $configfile = 'apache2.4/httpd.conf'; } elsif ($1 > 5) { @@ -2786,7 +2798,7 @@ sub copy_mpm_conf { print_and_log("\n"); } else { my $logfail; - if ($distro =~ /^(?:centos|rhes|scientific|oracle)(\d+)$/) { + if ($distro =~ /^(?:centos|rhes|scientific|oracle|rocky|alma)(\d+)$/) { if ($1 > 7) { $logfail = 1; }