version 1.65, 2010/07/21 00:32:44
|
version 1.70, 2011/03/28 13:58:56
|
Line 135 If you have questions, please visit http
|
Line 135 If you have questions, please visit http
|
or contact helpdesk\@lon-capa.org. |
or contact helpdesk\@lon-capa.org. |
|
|
=============================================================================== |
=============================================================================== |
The following 4 values are needed to configure LON-CAPA: |
The following 7 values are needed to configure LON-CAPA: |
* Machine Role |
* Machine Role |
* LON-CAPA Domain Name |
* LON-CAPA Domain Name |
* LON-CAPA Machine ID Name, and |
* LON-CAPA Machine ID Name, and |
* Server Administration E-mail Address. |
* Server Administration E-mail Address. |
|
* LON-CAPA Domain's Primary Library Server Machine ID |
|
* Web Server Protocol |
|
* Internet Domain Name of Your Institution |
=============================================================================== |
=============================================================================== |
|
|
In addition, a Support E-mail Address can also be included. If |
In addition, a Support E-mail Address can also be included. If |
Line 368 if ($lonRole eq 'library') {
|
Line 371 if ($lonRole eq 'library') {
|
$primaryLibServer = $libservers[0]; |
$primaryLibServer = $libservers[0]; |
} |
} |
} |
} |
|
|
|
$flag=0; |
while (!$flag) { |
while (!$flag) { |
print(<<END); |
print(<<END); |
**** Domain's Primary Library Server ID **** |
**** Domain's Primary Library Server ID **** |
Line 476 END
|
Line 481 END
|
} |
} |
} |
} |
|
|
|
# get protocol |
|
# accept if valid, if not valid, tell user and repeat |
|
$flag=0; |
while (!$flag) { |
while (!$flag) { |
print(<<END); |
print(<<END); |
|
|
**** Web Server Protocol **** |
**** Web Server Protocol **** |
If you plan to run the Apache server with SSL enabled, |
If you plan to run the Apache server with SSL enabled, |
the protocol should be: https; otherwise it should be http. |
the protocol should be: https; otherwise it should be http. |
ENTER WEB SERVER PROTOCOL: |
ENTER WEB SERVER PROTOCOL [http]: |
END |
END |
|
|
my $choice=<>; |
my $choice=<>; |
Line 493 END
|
Line 501 END
|
close(OUT); |
close(OUT); |
$protocol=$choice; |
$protocol=$choice; |
$flag=1; |
$flag=1; |
} |
} elsif ($choice eq '') { |
else { |
open(OUT,'>>/tmp/loncapa_updatequery.out'); |
|
print(OUT 'protocol'."\t".'http'."\n"); |
|
close(OUT); |
|
$protocol = 'http'; |
|
$flag = 1; |
|
} else { |
print "Invalid input (only http or https allowed).\n"; |
print "Invalid input (only http or https allowed).\n"; |
} |
} |
} |
} |
|
|
|
# get internet domain |
|
# accept if valid, if not valid, tell user and repeat |
|
$flag=0; |
while (!$flag) { |
while (!$flag) { |
print(<<END); |
print(<<END); |
|
|
Line 517 END
|
Line 533 END
|
chomp($choice); |
chomp($choice); |
if ($choice =~/[^.]+\.[^.]+/) { |
if ($choice =~/[^.]+\.[^.]+/) { |
open(OUT,'>>/tmp/loncapa_updatequery.out'); |
open(OUT,'>>/tmp/loncapa_updatequery.out'); |
print(OUT 'internet domain'."\t".$intdom."\n"); |
print(OUT 'internet domain'."\t".$choice."\n"); |
close(OUT); |
close(OUT); |
$intdom=$choice; |
$intdom=$choice; |
$flag=1; |
$flag=1; |
Line 530 END
|
Line 546 END
|
|
|
# update loncapa.conf |
# update loncapa.conf |
my $confdir = '/etc/httpd/conf/'; |
my $confdir = '/etc/httpd/conf/'; |
if ('<DIST />' eq 'sles10' || '<DIST />' eq 'sles11' || '<DIST />' eq 'suse10.1' || '<DIST />' eq 'suse10.2' || '<DIST />' eq 'suse10.3' || '<DIST />' eq 'suse11.1' || '<DIST />' eq 'suse11.2' || '<DIST />' eq 'debian5' || '<DIST />' eq 'ubuntu6' || '<DIST />' eq 'ubuntu8') { |
if ('<DIST />' eq 'sles10' || '<DIST />' eq 'sles11' || '<DIST />' eq 'suse10.1' || '<DIST />' eq 'suse10.2' || '<DIST />' eq 'suse10.3' || '<DIST />' eq 'suse11.1' || '<DIST />' eq 'suse11.2' || '<DIST />' eq 'suse11.3' || '<DIST />' eq 'suse11.4' || '<DIST />' eq 'debian5' || '<DIST />' eq 'debian6' || '<DIST />' eq 'ubuntu6' || '<DIST />' eq 'ubuntu8' || '<DIST />' eq 'ubuntu10') { |
$confdir = '/etc/apache2/'; |
$confdir = '/etc/apache2/'; |
} |
} |
my $filename='loncapa.conf'; |
my $filename='loncapa.conf'; |
Line 587 END
|
Line 603 END
|
</file> |
</file> |
<file> |
<file> |
<target dist='default'>/etc/httpd/conf/</target> |
<target dist='default'>/etc/httpd/conf/</target> |
<target dist='sles10 sles11 suse10.1 suse10.2 suse10.3 suse11.1 suse11.2 debian5 ubuntu6 ubuntu8'>/etc/apache2/</target> |
<target dist='sles10 sles11 suse10.1 suse10.2 suse10.3 suse11.1 suse11.2 suse11.3 suse11.4 debian5 debian6 ubuntu6 ubuntu8 ubuntu10'>/etc/apache2/</target> |
<perlscript mode='fg'> |
<perlscript mode='fg'> |
sub securesetting { |
sub securesetting { |
my (%perlvar)=@_; |
my (%perlvar)=@_; |
Line 694 my %perlvarstatic;
|
Line 710 my %perlvarstatic;
|
foreach my $file (@hosts_files) { |
foreach my $file (@hosts_files) { |
open(IN,'<'.$file); |
open(IN,'<'.$file); |
while(my $line = <IN>) { |
while(my $line = <IN>) { |
if ($line =~ /^\Q$perlvar{'lonHostID'}\E:\Q$perlvar{'lonDefDomain'}\E\:(?:access|library)\:(https?)/) { |
if ($line =~ /^\Q$perlvar{'lonHostID'}\E:\Q$perlvar{'lonDefDomain'}\E\:(?:access|library)\:[^:]+\:(https?)/) { |
$protocol = $1; |
$protocol = $1; |
|
chomp($protocol); |
last; |
last; |
} |
} |
} |
} |
Line 710 my %perlvarstatic;
|
Line 727 my %perlvarstatic;
|
foreach my $file (@hosts_files) { |
foreach my $file (@hosts_files) { |
open(IN,'<'.$file); |
open(IN,'<'.$file); |
while(my $line = <IN>) { |
while(my $line = <IN>) { |
if ($line =~ /^\Q$perlvar{'lonHostID'}\E:\Q$perlvar{'lonDefDomain'}\E\:(?:access|library)\:https?:([^:]+)/) { |
if ($line =~ /^\Q$perlvar{'lonHostID'}\E:\Q$perlvar{'lonDefDomain'}\E\:(?:access|library)\:[^:]+\:https?\:([^:]+)/) { |
$intdom = $1; |
$intdom = $1; |
|
chomp($intdom); |
last; |
last; |
} |
} |
} |
} |