version 1.1, 2005/06/15 17:56:41
|
version 1.3, 2005/07/29 22:21:58
|
Line 75 sub print_and_log {
|
Line 75 sub print_and_log {
|
# Define default behaviour # |
# Define default behaviour # |
# # |
# # |
############################### |
############################### |
my $make_www = 0; |
my $make_www = 1; |
my $install_pwauth = 1; |
my $install_pwauth = 1; |
my $setup_mysql = 1; |
my $setup_mysql = 1; |
my $setup_mysql_permissions = 1; |
my $setup_mysql_permissions = 1; |
my $stop_services = 0; |
my $stop_services = 0; |
my $install_httpd_conf = 0; |
my $install_httpd_conf = 1; |
my $download_loncapa = 0; |
my $download_loncapa = 1; |
my $showhelp = 0; |
my $showhelp = 0; |
|
|
################################### |
################################### |
Line 179 if ($install_httpd_conf) {
|
Line 179 if ($install_httpd_conf) {
|
©_httpd_conf(); |
©_httpd_conf(); |
} |
} |
|
|
#my $lctarball = 'loncapa-current.tar.gz'; |
my $lctarball = 'loncapa-suse-current.tar.gz'; |
my $lctarball = 'loncapa-fedora-current.tar.gz'; |
|
if ($download_loncapa) { |
if ($download_loncapa) { |
&download_loncapa($lctarball); |
&download_loncapa($lctarball); |
} else { |
} else { |
Line 229 sub uid_of_www {
|
Line 228 sub uid_of_www {
|
############################################### |
############################################### |
sub build_and_install_mod_auth_external { |
sub build_and_install_mod_auth_external { |
my $num = &uid_of_www(); |
my $num = &uid_of_www(); |
# Patch mod_auth_external |
# Patch pwauth |
print_and_log("Building authentication system for LON-CAPA users.\n"); |
print_and_log("Building authentication system for LON-CAPA users.\n"); |
my $patch = <<"ENDPATCH"; |
my $patch = <<"ENDPATCH"; |
148c148 |
148c148 |
Line 243 ENDPATCH
|
Line 242 ENDPATCH
|
"when installing RedHat.\n"); |
"when installing RedHat.\n"); |
die; |
die; |
} |
} |
&die_if_nonempty(`cd /tmp; tar zxf $instdir/mod_auth_external-2.1.15.tar.gz`, |
&die_if_nonempty(`cd /tmp; tar zxf $instdir/pwauth-2.2.8.tar.gz`, |
"Unable to extract mod_auth_external\n"); |
"Unable to extract pwauth\n"); |
my $dir = "/tmp/mod_auth_external-2.1.15/pwauth"; |
my $dir = "/tmp/pwauth-2.2.8"; |
open PATCH, "| patch $dir/config.h" || |
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; |
print PATCH $patch; |
close PATCH; |
close PATCH; |
print_and_log("\n"); |
print_and_log("\n"); |
Line 357 ENDMYSQL
|
Line 356 ENDMYSQL
|
## |
## |
############################################### |
############################################### |
sub copy_httpd_conf { |
sub copy_httpd_conf { |
print_and_log("Copying our httpd.conf to /etc/httpd/conf/httpd.conf\n"); |
print_and_log("Copying our httpd.conf to /etc/httpd/httpd.conf\n"); |
copy "/etc/httpd/conf/httpd.conf","/etc/httpd/conf/httpd.conf.original"; |
copy "/etc/httpd/httpd.conf","/etc/httpd/httpd.conf.original"; |
copy "$instdir/httpd.conf","/etc/httpd/conf/httpd.conf"; |
copy "$instdir/httpd.conf","/etc/httpd/httpd.conf"; |
chmod 0444,"/etc/httpd/conf/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"); |
print_and_log("\n"); |
} |
} |
|
|
|
|
############################################### |
############################################### |
## |
## |
## Retrieve the latest LON-CAPA release |
## Retrieve the latest LON-CAPA release |