version 1.2, 2002/06/19 19:27:17
|
version 1.10, 2002/11/16 00:01:29
|
Line 48
|
Line 48
|
# The following files are assumed to be present in the current |
# The following files are assumed to be present in the current |
# directory: |
# directory: |
# RPMS: |
# RPMS: |
|
# ImageMagick-5.4.3.11-1.i386.rpm |
|
# ImageMagick-devel-5.4.3.11-1.i386.rpm |
|
# ImageMagick-perl-5.4.3.11-1.i386.rpm |
# gnuplot-3.7.1-5.i386.rpm |
# gnuplot-3.7.1-5.i386.rpm |
# libgd-1.3-4.i386.rpm |
# libgd-1.3-4.i386.rpm |
# libungif-progs-4.1.0-9.i386.rpm |
# libungif-progs-4.1.0-9.i386.rpm |
Line 159 chomp($instdir);
|
Line 162 chomp($instdir);
|
# This list of rpms needs to be pared down to some extent. |
# This list of rpms needs to be pared down to some extent. |
# |
# |
|
|
|
my @apache_rpms = ( |
|
"$instdir/apache-1.3.23-14.i386.rpm" |
|
); |
|
|
|
my @openssh_rpms = ( |
|
"$instdir/openssh-3.1p1-6.i386.rpm", |
|
"$instdir/openssh-askpass-3.1p1-6.i386.rpm", |
|
"$instdir/openssh-clients-3.1p1-6.i386.rpm", |
|
"$instdir/openssh-server-3.1p1-6.i386.rpm" |
|
); |
|
# Check for gnome-askpass installation. |
|
if (-e "/etc/profile.d/gnome-ssh-askpass.sh") { |
|
push @openssh_rpms,"$instdir/openssh-askpass-gnome-3.1p1-6.i386.rpm"; |
|
} |
|
|
|
my @ImageMagick_rpms = ( |
|
"$instdir/ImageMagick-5.4.3.11-1.i386.rpm", |
|
"$instdir/ImageMagick-devel-5.4.3.11-1.i386.rpm", |
|
"$instdir/ImageMagick-perl-5.4.3.11-1.i386.rpm", |
|
); |
|
|
my @gnuplot_rpms = ( |
my @gnuplot_rpms = ( |
"$instdir/gnuplot-3.7.1-5.i386.rpm", |
"$instdir/gnuplot-3.7.1-5.i386.rpm", |
"$instdir/libgd-1.3-4.i386.rpm", |
"$instdir/libgd-1.3-4.i386.rpm", |
Line 184 my @mysql_rpms = (
|
Line 208 my @mysql_rpms = (
|
my @misc_rpms = ( |
my @misc_rpms = ( |
"$instdir/hwcrypto-1.0-3.i386.rpm", # already installed |
"$instdir/hwcrypto-1.0-3.i386.rpm", # already installed |
"$instdir/m2crypto-0.05_snap4-2.i386.rpm", # okay w/o f,nd |
"$instdir/m2crypto-0.05_snap4-2.i386.rpm", # okay w/o f,nd |
"$instdir/netatalk-1.5pre6-1rh7.i386.rpm" # hmmmm |
"$instdir/tetex-dvips-1.0.7-47.i386.rpm" |
); |
); |
## |
## |
## Okay, I have tried being nice about this and not doing '--force --nodeps', |
## Okay, I have tried being nice about this and not doing '--force --nodeps', |
## but it is an exercise in frustration. It would be nice to be kind, but |
## but it is an exercise in frustration. It would be nice to be kind, but |
## frankly I do not want to spend the time to figure this out. |
## frankly I do not want to spend the time to figure this out. |
## |
## |
|
|
|
print_and_log("Installing Apache packages.\n"); |
|
writelog (`rpm -Uvh @apache_rpms`); |
|
print_and_log("Installing openssh packages.\n"); |
|
writelog (`rpm -Uvh @openssh_rpms`); |
|
system("/etc/init.d/sshd start"); |
|
print_and_log("Installing ImageMagick packages.\n"); |
|
writelog (`rpm -ivh --force --nodeps @ImageMagick_rpms`); |
print_and_log("Installing mysql packages.\n"); |
print_and_log("Installing mysql packages.\n"); |
writelog (`rpm -ivh --force --nodeps @mysql_rpms`); |
writelog (`rpm -ivh --force --nodeps @mysql_rpms`); |
print_and_log("Installing gnuplot packages.\n"); |
print_and_log("Installing gnuplot packages.\n"); |
Line 201 print_and_log("Installing Perl packages.
|
Line 233 print_and_log("Installing Perl packages.
|
writelog (`rpm -ivh --force --nodeps @perl_rpms`); |
writelog (`rpm -ivh --force --nodeps @perl_rpms`); |
print_and_log("Installing misc packages.\n"); |
print_and_log("Installing misc packages.\n"); |
writelog (`rpm -ivh --force --nodeps @misc_rpms`); |
writelog (`rpm -ivh --force --nodeps @misc_rpms`); |
system("/etc/init.d/sshd start"); |
|
print_and_log("\n"); |
print_and_log("\n"); |
|
|
## |
## |
Line 304 writelog("mysql links created successful
|
Line 335 writelog("mysql links created successful
|
writelog(`/etc/rc.d/init.d/mysqld start`); |
writelog(`/etc/rc.d/init.d/mysqld start`); |
print_and_log("Waiting for mysql daemon to start.\n"); |
print_and_log("Waiting for mysql daemon to start.\n"); |
sleep 5; |
sleep 5; |
if (`/etc/rc.d/init.d/mysqld status` !~ / is running/) { |
my $status = system("/etc/rc.d/init.d/mysqld status"); |
|
if ($status != 0) { |
die "Unable to start mysql daemon\nHalting\n"; |
die "Unable to start mysql daemon\nHalting\n"; |
|
} else { |
|
print_and_log("Mysql daemon is running.\n"); |
} |
} |
print_and_log("\n"); |
print_and_log("\n"); |
|
|
Line 330 print MYSQL <<"ENDMYSQL";
|
Line 364 print MYSQL <<"ENDMYSQL";
|
CREATE DATABASE loncapa; |
CREATE DATABASE loncapa; |
INSERT INTO user (Host, User, Password) |
INSERT INTO user (Host, User, Password) |
VALUES ('localhost','www',password('localhostkey')); |
VALUES ('localhost','www',password('localhostkey')); |
GRANT ALL PRIVILEGES ON *.* TO www\@localhost; |
GRANT ALL PRIVILEGES ON loncapa.* TO 'www\@localhost'; |
SET PASSWORD FOR root\@localhost=PASSWORD('$rootpass'); |
SET PASSWORD FOR root\@localhost=PASSWORD('$rootpass'); |
DELETE FROM user WHERE host<>'localhost'; |
DELETE FROM user WHERE host<>'localhost'; |
FLUSH PRIVILEGES; |
FLUSH PRIVILEGES; |
Line 391 print_and_log("\n");
|
Line 425 print_and_log("\n");
|
## |
## |
## Retrieve loncapa.tar.gz |
## Retrieve loncapa.tar.gz |
## |
## |
if (! -e "$instdir/loncapa.tar.gz") { |
if (! -e "$instdir/loncapa-current.tar.gz") { |
print_and_log("Retrieving LON-CAPA source files from install.loncapa.org\n"); |
print_and_log("Retrieving LON-CAPA source files from install.loncapa.org\n"); |
system("wget http://install.loncapa.org/versions/current/loncapa.tar.gz 2>/dev/null 1>/dev/null"); |
system("wget http://install.loncapa.org/versions/loncapa-current.tar.gz 2>/dev/null 1>/dev/null"); |
if (! -e "./loncapa.tar.gz") { |
if (! -e "./loncapa-current.tar.gz") { |
die("Unable to retrieve LON-CAPA source files from\n". |
die("Unable to retrieve LON-CAPA source files from\n". |
"http://install.loncapa.org/versions/current/loncapa.tar.gz\n"); |
"http://install.loncapa.org/versions/loncapa-current.tar.gz\n"); |
} |
} |
print_and_log("\n"); |
print_and_log("\n"); |
} else { |
} else { |
print_and_log(<<"END"); |
print_and_log(<<"END"); |
------------------------------------------------------------------------ |
------------------------------------------------------------------------ |
|
|
You seem to have a version of loncapa.tar.gz in $instdir. |
You seem to have a version of loncapa-current.tar.gz in $instdir. |
This copy will be used and a new version will NOT be downloaded. |
This copy will be used and a new version will NOT be downloaded. |
If you wish, you may download a new version by executing: |
If you wish, you may download a new version by executing: |
|
|
wget http://install.loncapa.org/versions/current/loncapa.tar.gz |
wget http://install.loncapa.org/versions/loncapa-current.tar.gz |
|
|
------------------------------------------------------------------------ |
------------------------------------------------------------------------ |
END |
END |
Line 417 END
|
Line 451 END
|
## untar loncapa.tar.gz |
## untar loncapa.tar.gz |
## |
## |
print_and_log("Extracting LON-CAPA source files\n"); |
print_and_log("Extracting LON-CAPA source files\n"); |
writelog(`cd ~root; tar zxf $instdir/loncapa.tar.gz`); |
writelog(`cd ~root; tar zxf $instdir/loncapa-current.tar.gz`); |
print_and_log("\n"); |
print_and_log("\n"); |
|
|
my $version = `cat /etc/redhat-release`; |
my $version = `cat /etc/redhat-release`; |
Line 428 commands now:
|
Line 462 commands now:
|
rpm -Uvh perl-5.6.1-34.99.6.i386.rpm |
rpm -Uvh perl-5.6.1-34.99.6.i386.rpm |
rpm -Uvh perl-CGI-2.752-34.99.6.i386.rpm |
rpm -Uvh perl-CGI-2.752-34.99.6.i386.rpm |
|
|
cd /root/loncapa |
cd /root/loncapa-N.N (N.N should correspond to a version number like '0.4') |
./UPDATE |
./UPDATE |
|
|
END |
END |
Line 440 END
|
Line 474 END
|
All of the extra files seem to have been installed correctly. It remains for |
All of the extra files seem to have been installed correctly. It remains for |
you to execute the following commands: |
you to execute the following commands: |
|
|
cd /root/loncapa; |
cd /root/loncapa-N.N (N.N should correspond to a version number like '0.4') |
./UPDATE |
./UPDATE |
|
|
If you have any trouble, please see http://install.loncapa.org and |
If you have any trouble, please see http://install.loncapa.org/ and |
http://help.loncapa.org. |
http://help.loncapa.org/. |
ENDMSG |
ENDMSG |
} |
} |
|
|
close LOG; |
close LOG; |
|
|