[LON-CAPA-cvs] cvs: doc(version_2_11_X) /install/linux install.pl

raeburn raeburn at source.lon-capa.org
Thu Nov 7 11:12:27 EST 2019


raeburn		Thu Nov  7 16:12:27 2019 EDT

  Modified files:              (Branch: version_2_11_X)
    /doc/install/linux	install.pl 
  Log:
  - For 2.11
    Backport 1.59, 1.60.
  
  
Index: doc/install/linux/install.pl
diff -u doc/install/linux/install.pl:1.45.2.4 doc/install/linux/install.pl:1.45.2.5
--- doc/install/linux/install.pl:1.45.2.4	Mon Oct 14 14:14:51 2019
+++ doc/install/linux/install.pl	Thu Nov  7 16:12:26 2019
@@ -75,7 +75,7 @@
           &mt('Stopping execution.')."\n";
     exit;
 } else {
-    print LOG '$Id: install.pl,v 1.45.2.4 2019/10/14 14:14:51 raeburn Exp $'."\n";
+    print LOG '$Id: install.pl,v 1.45.2.5 2019/11/07 16:12:26 raeburn Exp $'."\n";
 }
 
 #
@@ -659,6 +659,9 @@
         if ($version >= 19) {
             $daemon{'mysql'} = 'mariadb';
         }
+        if ($version >= 26) {
+            $daemon{'ntp'} = 'chronyd';
+        }
     } elsif ($distro =~ /^(?:centos|rhes|scientific|oracle)(\d+)/) {
         my $version = $1;
         if ($version >= 7) {
@@ -953,6 +956,7 @@
         }
     } else {
         my $configfile = 'httpd.conf';
+        my $mpmfile = 'mpm.conf';
         if ($distro =~ /^(?:centos|rhes|scientific|oracle)(\d+)$/) {
             if ($1 >= 7) {
                 $configfile = 'apache2.4/httpd.conf';
@@ -961,7 +965,7 @@
             }
         } elsif ($distro =~ /^fedora(\d+)$/) {
             if ($1 > 17) {
-                $configfile = 'apache2.4/httpd.conf'; 
+                $configfile = 'apache2.4/httpd.conf';
             } elsif ($1 > 10) {
                 $configfile = 'new/httpd.conf';
             }
@@ -979,6 +983,20 @@
                 }
             }
         }
+        if (-e "/etc/httpd/conf.modules.d/00-mpm.conf") {
+            if (!-e "$instdir/centos-rhes-fedora-sl/$mpmfile") {
+                print &mt('Warning: No LON-CAPA Apache MPM configuration file found for installation check.')."\n";
+            } elsif ((-e "/etc/httpd/conf.modules.d/00-mpm.conf") && (-e "$instdir/centos-rhes-fedora-sl/$mpmfile")) {
+                if (open(PIPE, "diff --brief $instdir/centos-rhes-fedora-sl/$mpmfile /etc/httpd/conf.modules.d/00-mpm.conf |")) {
+                    my $diffres = <PIPE>;
+                    close(PIPE);
+                    chomp($diffres);
+                    if ($diffres) {
+                        $fixapache = 1;
+                    }
+                }
+            }
+        }
     }
     return $fixapache;
 }
@@ -1607,6 +1625,7 @@
         &copy_apache2_debconf($instdir,$distro);
     } else {
         &copy_httpd_conf($instdir,$distro);
+        &copy_mpm_conf($instdir,$distro);
     }
 } else {
     print_and_log(&mt('Skipping configuration of Apache web server.')."\n");
@@ -2162,6 +2181,50 @@
     print_and_log("\n");
 }
 
+###########################################################
+##
+## RHEL/CentOS/Fedora/Scientific Linux
+## Copy LON-CAPA mpm.conf to /etc/httpd/conf.modules.d/00-mpm.conf
+##
+## The LON-CAPA mpm.conf enables the prefork MPM module in
+## Apache. This is also the default for RHEL/CentOS/Oracle
+## Linux 7 and earlier, and Fedora 26 and earlier. For more
+## recent versions of those distros, the event MPM is enabled
+## by default. After &copy_mpm_conf() is run, the prefork MPM
+## module will be enabled instead of the event MPM module.
+##
+###########################################################
+
+sub copy_mpm_conf {
+    my ($instdir,$distro) = @_;
+    my $mpmfile = 'mpm.conf';
+    if ((-e "/etc/httpd/conf.modules.d/00-mpm.conf") &&
+        (-e "$instdir/centos-rhes-fedora-sl/$mpmfile")) {
+        print_and_log(&mt('Copying the LON-CAPA [_1] to [_2].',"'mpm.conf'",
+                      "'/etc/httpd/conf.modules.d/00-mpm.conf'")."\n");
+        copy "$instdir/centos-rhes-fedora-sl/$mpmfile","/etc/httpd/conf.modules.d/00-mpm.conf";
+        chmod(0644,"/etc/httpd/conf.modules.d/00-mpm.conf");
+        print_and_log("\n");
+    } else {
+        my $logfail;
+        if ($distro =~ /^(?:centos|rhes|scientific|oracle)(\d+)$/) {
+            if ($1 > 7) {
+                $logfail = 1;
+            }
+        } elsif ($distro =~ /^fedora(\d+)$/) {
+            if ($1 > 26) {
+                $logfail = 1;
+            }
+        }
+        if ($logfail) {
+            print_and_log(&mt('Warning: copying the LON-CAPA [_1] failed because [_2] and/or [_3] are missing.',
+                              $mpmfile,"'$instdir/centos-rhes-fedora-sl/$mpmfile'",
+                              "'/etc/httpd/conf.modules.d/00-mpm.conf'"));
+            print_and_log("\n");
+        }
+    }
+}
+
 #########################################################
 ##
 ## Ubuntu/Debian -- copy our loncapa configuration file to




More information about the LON-CAPA-cvs mailing list