--- doc/install/suse/install.pl 2005/06/15 18:03:23 1.2 +++ doc/install/suse/install.pl 2005/07/29 22:21:58 1.3 @@ -2,7 +2,7 @@ # The LearningOnline Network # Fedora installation script # -# $Id: install.pl,v 1.2 2005/06/15 18:03:23 albertel Exp $ +# $Id: install.pl,v 1.3 2005/07/29 22:21:58 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -35,7 +35,7 @@ my $test; # note: The filehandle LOG is global. open LOG,">>loncapa_install.log" || die "Unable to open log file.\n"; -print LOG '$Id: install.pl,v 1.2 2005/06/15 18:03:23 albertel Exp $'."\n"; +print LOG '$Id: install.pl,v 1.3 2005/07/29 22:21:58 raeburn Exp $'."\n"; # Some friendly subroutines sub die_if_nonempty { @@ -75,12 +75,12 @@ sub print_and_log { # Define default behaviour # # # ############################### -my $make_www = 0; +my $make_www = 1; my $install_pwauth = 1; my $setup_mysql = 1; my $setup_mysql_permissions = 1; my $stop_services = 0; -my $install_httpd_conf = 0; +my $install_httpd_conf = 1; my $download_loncapa = 1; my $showhelp = 0; @@ -179,8 +179,6 @@ if ($install_httpd_conf) { ©_httpd_conf(); } -#my $lctarball = 'loncapa-current.tar.gz'; -#my $lctarball = 'loncapa-fedora-current.tar.gz'; my $lctarball = 'loncapa-suse-current.tar.gz'; if ($download_loncapa) { &download_loncapa($lctarball); @@ -230,7 +228,7 @@ sub uid_of_www { ############################################### sub build_and_install_mod_auth_external { my $num = &uid_of_www(); - # Patch mod_auth_external + # Patch pwauth print_and_log("Building authentication system for LON-CAPA users.\n"); my $patch = <<"ENDPATCH"; 148c148 @@ -244,11 +242,11 @@ ENDPATCH "when installing RedHat.\n"); die; } - &die_if_nonempty(`cd /tmp; tar zxf $instdir/mod_auth_external-2.1.15.tar.gz`, - "Unable to extract mod_auth_external\n"); - my $dir = "/tmp/mod_auth_external-2.1.15/pwauth"; + &die_if_nonempty(`cd /tmp; tar zxf $instdir/pwauth-2.2.8.tar.gz`, + "Unable to extract pwauth\n"); + my $dir = "/tmp/pwauth-2.2.8"; open PATCH, "| patch $dir/config.h" || - die "Unable to start patch for mod_auth_external. Halting\n"; + die "Unable to start patch for pwauth. Halting\n"; print PATCH $patch; close PATCH; print_and_log("\n"); @@ -358,14 +356,17 @@ ENDMYSQL ## ############################################### sub copy_httpd_conf { - print_and_log("Copying our httpd.conf to /etc/httpd/conf/httpd.conf\n"); - copy "/etc/httpd/conf/httpd.conf","/etc/httpd/conf/httpd.conf.original"; - copy "$instdir/httpd.conf","/etc/httpd/conf/httpd.conf"; - chmod 0444,"/etc/httpd/conf/httpd.conf"; + print_and_log("Copying our httpd.conf to /etc/httpd/httpd.conf\n"); + copy "/etc/httpd/httpd.conf","/etc/httpd/httpd.conf.original"; + copy "$instdir/httpd.conf","/etc/httpd/httpd.conf"; + chmod 0444,"/etc/httpd/httpd.conf"; + if (!-e "/etc/httpd/conf") { # Make conf directory if missing + mkdir("/etc/httpd/conf",0755); + print_and_log("Created /etc/httpd/conf directory"); + } print_and_log("\n"); } - ############################################### ## ## Retrieve the latest LON-CAPA release