--- doc/install/linux/install.pl 2021/03/16 01:04:11 1.45.2.12 +++ doc/install/linux/install.pl 2021/03/28 22:00:27 1.45.2.14 @@ -76,7 +76,7 @@ if (!open(LOG,">>loncapa_install.log")) &mt('Stopping execution.')."\n"; exit; } else { - print LOG '$Id: install.pl,v 1.45.2.12 2021/03/16 01:04:11 raeburn Exp $'."\n"; + print LOG '$Id: install.pl,v 1.45.2.14 2021/03/28 22:00:27 raeburn Exp $'."\n"; } # @@ -210,7 +210,7 @@ sub get_distro { $distro = 'rhes'.$1; $updatecmd = 'dnf install LONCAPA-prerequisites'; $installnow = 'dnf -y install LONCAPA-prerequisites'; - } elsif ($versionstring =~ /CentOS(?:| Linux) release (\d+)/) { + } elsif ($versionstring =~ /CentOS(?:| Linux| Stream) release (\d+)/) { $distro = 'centos'.$1; $updatecmd = 'yum install LONCAPA-prerequisites'; $installnow = 'yum -y install LONCAPA-prerequisites'; @@ -469,7 +469,7 @@ sub check_required { } $mysqlon = &check_mysql_running($distro); if ($mysqlon) { - ($mysqlsetup,$has_pass,$dbh,$mysql_has_wwwuser,$mysql_unix_socket) = + ($mysqlsetup,$has_pass,$dbh,$mysql_has_wwwuser,$mysql_unix_socket) = &check_mysql_setup($instdir,$dsn,$distro); if ($mysqlsetup eq 'needsrestart') { $mysqlrestart = ''; @@ -1163,7 +1163,7 @@ sub check_mysql_setup { my $sth = $dbh->prepare("SELECT Priv FROM mysql.global_priv WHERE (User = 'root' AND Host ='localhost')"); $sth->execute(); while (my $priv = $sth->fetchrow_array) { - if ($priv =~ /unix_socket/) { + if ($priv =~ /unix_socket/) { $mysql_unix_socket = 1; last; } @@ -1195,7 +1195,7 @@ sub check_mysql_setup { $mysql_has_wwwuser = &check_mysql_wwwuser($dbh); return ($mysqlsetup,$has_pass,$dbh,$mysql_has_wwwuser,$mysql_unix_socket); } - } + } } elsif ($DBI::err =~ /1045/) { $has_pass = 1; } elsif ($distro =~ /^ubuntu(\d+)$/) { @@ -1755,14 +1755,16 @@ if ($callsub{'firewall'}) { if (keys(%added) > 0) { print &mt('Firewall configured to allow access for: [_1].', join(', ',sort(keys(%added))))."\n"; + system('firewall-cmd --reload'); } if ($current{'http'} || $current{'https'}) { print &mt('Firewall already configured to allow access for:[_1].', (($current{'http'})? ' http':'').(($current{'https'})? ' https':''))."\n"; } unless ($current{'ssh'}) { - print &mt('If you would the like to allow access to ssh from outside, use the command[_1].', - "firewall-cmd --permanent --zone=$zone --add-service=ssh")."\n"; + print &mt('If you would like to allow access to ssh from outside, use the commands:')."\n". + "firewall-cmd --permanent --zone=$zone --add-service=ssh\n". + "firewall-cmd --reload\n"; } } elsif ($distro =~ /^(suse|sles)/) { print &mt('Use [_1] to configure the firewall to allow access for [_2].', @@ -1853,7 +1855,7 @@ if ($callsub{'download'}) { print "\n".&mt('Requested configuration complete.')."\n\n"; if ($have_tarball && !$updateshown) { my ($lcdir) = ($sourcetarball =~ /^([\w.\-]+)\.tar.gz$/); - my ($apachename,$lc_uses_systemctl,$uses_sudo); + my ($apachename,$lc_uses_systemctl,$uses_sudo); if ($distro =~ /^(suse|sles|debian|ubuntu)([\d.]+)/) { if (($1 eq 'suse') && ($2 < 10)) { $apachename = 'apache';