Diff for /doc/install/redhat7.3/install.pl between versions 1.12 and 1.17

version 1.12, 2002/12/12 20:55:23 version 1.17, 2003/01/07 20:48:53
Line 61 Line 61
 #        perl-DBI-1.21-1.i386.rpm  #        perl-DBI-1.21-1.i386.rpm
 #        mod_perl-1.26-5.i386.rpm  #        mod_perl-1.26-5.i386.rpm
 #        perl-suidperl-5.6.1-34.99.6.i386.rpm  #        perl-suidperl-5.6.1-34.99.6.i386.rpm
 #        LONCAPA-0.6.0-1.i386.rpm  #        LON-CAPA-systemperl-3.5-rh7.i386.rpm
 #        mysql-3.23.49-3.i386.rpm  #        mysql-3.23.49-3.i386.rpm
 #        mysqlclient9-3.23.22-6.i386.rpm  #        mysqlclient9-3.23.22-6.i386.rpm
 #        mysql-server-3.23.49-3.i386.rpm  #        mysql-server-3.23.49-3.i386.rpm
Line 87  my $result; Line 87  my $result;
 my $test;  my $test;
   
 # note: The filehandle LOG is global.  # note: The filehandle LOG is global.
 open LOG,">/tmp/loncapa_install.log" || die "Unable to open log file.\n";  open LOG,">loncapa_install.log" || die "Unable to open log file.\n";
   
 # Some friendly subroutines  # Some friendly subroutines
 sub die_if_nonempty {  sub die_if_nonempty {
Line 165  chomp($instdir); Line 165  chomp($instdir);
 #  #
   
 my @apache_rpms = (  my @apache_rpms = (
              "$instdir/apache-1.3.23-14.i386.rpm"               "$instdir/apache-1.3.23-14.i386.rpm",
                    );                     );
   
 my @openssh_rpms = (  my @openssh_rpms = (
Line 174  my @openssh_rpms = ( Line 174  my @openssh_rpms = (
              "$instdir/openssh-clients-3.1p1-6.i386.rpm",               "$instdir/openssh-clients-3.1p1-6.i386.rpm",
              "$instdir/openssh-server-3.1p1-6.i386.rpm"               "$instdir/openssh-server-3.1p1-6.i386.rpm"
                 );                  );
   
 # Check for gnome-askpass installation.  # Check for gnome-askpass installation.
 if (-e "/etc/profile.d/gnome-ssh-askpass.sh") {  if (-e "/etc/profile.d/gnome-ssh-askpass.sh") {
     push @openssh_rpms,"$instdir/openssh-askpass-gnome-3.1p1-6.i386.rpm";      push @openssh_rpms,"$instdir/openssh-askpass-gnome-3.1p1-6.i386.rpm";
 }  }
   
 my @ImageMagick_rpms = (  my @ImageMagick_rpms = ( 
              "$instdir/ImageMagick-5.4.3.11-1.i386.rpm",               "$instdir/ImageMagick-5.4.3.11-1.i386.rpm",
              "$instdir/ImageMagick-devel-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",               "$instdir/ImageMagick-perl-5.4.3.11-1.i386.rpm",
                        );                         );
   
 my @gnuplot_rpms = (  my @mysql_rpms = (
              "$instdir/gnuplot-3.7.1-5.i386.rpm",               "$instdir/mysql-3.23.49-3.i386.rpm",
              "$instdir/libgd-1.3-4.i386.rpm",               "$instdir/mysqlclient9-3.23.22-6.i386.rpm",
              "$instdir/libungif-progs-4.1.0-9.i386.rpm",               "$instdir/mysql-server-3.23.49-3.i386.rpm",
              "$instdir/ncurses4-5.0-5.i386.rpm",                    );
              "$instdir/readline-2.2.1-6.i386.rpm",  
              "$instdir/readline-4.2a-4.i386.rpm"  
                     );  
 my @perl_rpms = (   my @perl_rpms = ( 
              "$instdir/perl-DBD-MySQL-1.2216-4.i386.rpm",               "$instdir/perl-DBD-MySQL-1.2216-4.i386.rpm",
              "$instdir/perl-DBI-1.21-1.i386.rpm",               "$instdir/perl-DBI-1.21-1.i386.rpm",
              "$instdir/mod_perl-1.26-5.i386.rpm",  
              "$instdir/perl-suidperl-5.6.1-34.99.6.i386.rpm",               "$instdir/perl-suidperl-5.6.1-34.99.6.i386.rpm",
                  );                   );
   
   my @old_readline_rpms = (
                "$instdir/readline-2.2.1-6.i386.rpm", # requires -i --oldpackage, 
                                                      # not -Uvh
                            );
   my @gnuplot_rpms = ( # must be done after readline-2.2.1-6
                "$instdir/libgd-1.3-4.i386.rpm", 
                "$instdir/libungif-progs-4.1.0-9.i386.rpm",
                "$instdir/ncurses4-5.0-5.i386.rpm",
                "$instdir/gnuplot-3.7.1-5.i386.rpm",
                       );
   
 my @loncapa_perl_rpms = (  my @loncapa_perl_rpms = (
              "$instdir/LONCAPA-0.6.0-1.i386.rpm",  
              "$instdir/netpbm-9.24-3.i386.rpm",               "$instdir/netpbm-9.24-3.i386.rpm",
              "$instdir/netpbm-progs-9.24-3.i386.rpm",               "$instdir/netpbm-progs-9.24-3.i386.rpm",
              "$instdir/krb5-libs-1.2.4-3.i386.rpm",               "$instdir/krb5-libs-1.2.4-3.i386.rpm",
                "$instdir/krb5-devel-1.2.4-3.i386.rpm",
              "$instdir/LON-CAPA-krb4-3.1-1.i386.rpm",               "$instdir/LON-CAPA-krb4-3.1-1.i386.rpm",
                     );                      );
 my @mysql_rpms = (  
              "$instdir/mysql-3.23.49-3.i386.rpm",          # okay w/o f,nd  
              "$instdir/mysqlclient9-3.23.22-6.i386.rpm",   # okay w/o f,nd  
              "$instdir/mysql-server-3.23.49-3.i386.rpm",   # okay w/o f,nd  
                   );  
 my @misc_rpms = (  my @misc_rpms = (
              "$instdir/hwcrypto-1.0-3.i386.rpm",           # already installed               "$instdir/m2crypto-0.05_snap4-2.i386.rpm",
              "$instdir/m2crypto-0.05_snap4-2.i386.rpm",    # okay w/o f,nd               "$instdir/tetex-dvips-1.0.7-47.i386.rpm",
              "$instdir/tetex-dvips-1.0.7-47.i386.rpm"                     "$instdir/ntp-4.1.1-1.i386.rpm",
                "$instdir/libcap-1.10-8.i386.rpm",
              );               );
   
   my $systemperl = "$instdir/LON-CAPA-systemperl-3.5-rh7.i386.rpm";
   
 ##  ##
 ## Okay, I have tried being nice about this and not doing '--force --nodeps',  ## Some of these rpm commands require being obnoxious (--force --nodeps)
 ## but it is an exercise in frustration.  It would be nice to be kind, but  ## this is not a nice thing to do and we should be careful about it.
 ## frankly I do not want to spend the time to figure this out.  ##
 ##  
   &print_and_log("Installing Apache packages.\n");
 print_and_log("Installing Apache packages.\n");  &writelog (`rpm -Uvh @apache_rpms`);
 writelog (`rpm -Uvh @apache_rpms`);  &print_and_log("Installing openssh packages.\n");
 print_and_log("Installing openssh packages.\n");  &writelog (`rpm -Uvh @openssh_rpms`);
 writelog (`rpm -Uvh @openssh_rpms`);  &writelog(`/etc/init.d/sshd start`);
 system("/etc/init.d/sshd start");  &print_and_log("Installing ImageMagick packages.\n");
 print_and_log("Installing ImageMagick packages.\n");  &writelog (`rpm -Uvh @ImageMagick_rpms`);
 writelog (`rpm -ivh --force --nodeps @ImageMagick_rpms`);  &print_and_log("Installing mysql packages.\n");
 print_and_log("Installing mysql packages.\n");  &writelog (`rpm -Uvh @mysql_rpms`);
 writelog (`rpm -ivh --force --nodeps @mysql_rpms`);  &print_and_log("Installing Perl packages.\n");
 print_and_log("Installing gnuplot packages.\n");  &writelog (`rpm -Uvh @perl_rpms`);
 writelog (`rpm -ivh --force --nodeps @gnuplot_rpms`);  &print_and_log("Installing legacy readline package (required for gnuplot).");
 print_and_log("Installing LON-CAPA Perl packages.\n");  &writelog(`rpm -i --oldpackage @old_readline_rpms`);
 writelog (`rpm -ivh --force --nodeps @loncapa_perl_rpms`);  &print_and_log("Installing gnuplot packages.\n");
 print_and_log("Installing Perl packages.\n");  &writelog (`rpm -ivh --force --nodeps @gnuplot_rpms`);
 writelog (`rpm -ivh --force --nodeps @perl_rpms`);  &print_and_log("Installing LON-CAPA Perl packages.\n");
 print_and_log("Installing misc packages.\n");  &writelog (`rpm -Uvh @loncapa_perl_rpms`);
 writelog (`rpm -ivh --force --nodeps @misc_rpms`);  &print_and_log("Installing misc packages.\n");
 print_and_log("\n");  &writelog (`rpm -Uvh @misc_rpms`);
   &print_and_log("Installing LON-CAPA systemperl rpm");
   &writelog(`rpm -ivh --force --nodeps $systemperl`);
   &print_and_log("\n");
   
   
   ##
   ## Remove conflicting packages
   ##
   my @php_rpms = ("php-imap-4.1.2-7",
                   "asp2php-0.76.2-1",
                   "php-ldap-4.1.2-7",
                   "php-devel-4.1.2-7",
                   "php-4.1.2-7");
   
   &print_and_log("Removing php packages");
   foreach my $php_rpm (@php_rpms) {
       my $remove_error = system("rpm -e --nodeps ".$php_rpm);
       if ($remove_error) {
           &print_and_log("Unable to remove ".$php_rpm.".  ".
                          "Assuming it is not present.\n");
       } else {
           &writelog("Successfully removed ".$php_rpm);
       }
   }
   
 ##  ##
 ## Fix that stupid little sendmail bug  ## Fix that stupid little sendmail bug
Line 328  print_and_log("\n"); Line 361  print_and_log("\n");
 ## Set up mysql  ## Set up mysql
 ##  ##
 print_and_log("Setting mysqld to start on boot up.\n");  print_and_log("Setting mysqld to start on boot up.\n");
   system("chkconfig --add mysqld");
 make_link_or_die("/etc/rc.d/init.d/mysqld","/etc/rc.d/rc0.d/K90mysqld");  system("chkconfig mysqld on");
 make_link_or_die("/etc/rc.d/init.d/mysqld","/etc/rc.d/rc1.d/K90mysqld");  &writelog(`chkconfig --list mysqld`);
 make_link_or_die("/etc/rc.d/init.d/mysqld","/etc/rc.d/rc2.d/S90mysqld");  
 make_link_or_die("/etc/rc.d/init.d/mysqld","/etc/rc.d/rc3.d/S90mysqld");  
 make_link_or_die("/etc/rc.d/init.d/mysqld","/etc/rc.d/rc4.d/S90mysqld");  
 make_link_or_die("/etc/rc.d/init.d/mysqld","/etc/rc.d/rc5.d/S90mysqld");  
 make_link_or_die("/etc/rc.d/init.d/mysqld","/etc/rc.d/rc6.d/K90mysqld");  
   
 writelog("mysql links created successfully\n");  writelog("mysql links created successfully\n");
 writelog(`/etc/rc.d/init.d/mysqld start`);  writelog(`/etc/rc.d/init.d/mysqld start`);
Line 384  close MYSQL; Line 412  close MYSQL;
 print_and_log("\n");  print_and_log("\n");
   
 ##  ##
 ## Kill the firewall, if it exists  ## Remove the firewall.
 ##  ##
 #  system("chkconfig ipchains off");
 # A better method would be to modify the firewall rules to make  system("/etc/init.d/ipchains stop");
 # the lond port open.  Someday.  system("chkconfig iptables on");
 #  system("/etc/init.d/iptables start");
 if (-e "/etc/init.d/iptables" || -e "/etc/init.d/ipchans") {  
     print_and_log("Stopping and removing your firewall\n");  # Someday we will add these to /etc/sysconfig/ipchains.
     my @tokill = ("/etc/rc.d/rc2.d/S08ipchains",  #  "-A input -s 0/0 -d 0/0 8080 -p tcp -y -j ACCEPT",
                   "/etc/rc.d/rc2.d/S08iptables",  #  "-A input -s 0/0 -d 0/0 5663 -p tcp -y -j ACCEPT"
                   "/etc/rc.d/rc3.d/S08ipchains",  # Someday we will deal with iptables, too.  Soon.
                   "/etc/rc.d/rc3.d/S08iptables",  
                   "/etc/rc.d/rc4.d/S08ipchains",  
                   "/etc/rc.d/rc4.d/S08iptables",  
                   "/etc/rc.d/rc5.d/S08ipchains",  
                   "/etc/rc.d/rc5.d/S08iptables" );  
     foreach (@tokill) {  
         unlink $_ if (-e $_ );  
     }  
     writelog(`/etc/init.d/ipchains stop`);  
     writelog(`/etc/init.d/ipchains stop`);  
     print_and_log("\n");  
 }  
   
 ##  ##
 ## Set up httpd   ## Set up httpd 
 ##  ##
 print_and_log("Setting httpd to start on boot up.\n");  print_and_log("Setting httpd to start on boot up.\n");
   system("chkconfig httpd on");
 make_link_or_die("/etc/rc.d/init.d/httpd","/etc/rc.d/rc0.d/K15httpd");  
 make_link_or_die("/etc/rc.d/init.d/httpd","/etc/rc.d/rc1.d/K15httpd");  
 make_link_or_die("/etc/rc.d/init.d/httpd","/etc/rc.d/rc2.d/K15httpd");  
 make_link_or_die("/etc/rc.d/init.d/httpd","/etc/rc.d/rc3.d/S85httpd");  
 make_link_or_die("/etc/rc.d/init.d/httpd","/etc/rc.d/rc4.d/K15httpd");  
 make_link_or_die("/etc/rc.d/init.d/httpd","/etc/rc.d/rc5.d/K15httpd");  
 make_link_or_die("/etc/rc.d/init.d/httpd","/etc/rc.d/rc6.d/K15httpd");  
   
 ##  ##
 ## Copy our (probably lousy) httpd.conf to its rightful place  ## Copy our (probably lousy) httpd.conf to its rightful place
Line 432  print_and_log("\n"); Line 441  print_and_log("\n");
 ##  ##
 ## Retrieve loncapa.tar.gz  ## Retrieve loncapa.tar.gz
 ##  ##
 if (! -e "$instdir/loncapa-current.tar.gz") {  my $lctarball = 'loncapa-current.tar.gz';
     print_and_log("Retrieving LON-CAPA source files from install.loncapa.org\n");  if (! -e "$instdir/$lctarball") {
     system("wget http://install.loncapa.org/versions/loncapa-current.tar.gz 2>/dev/null 1>/dev/null");      print_and_log("Retrieving LON-CAPA source files from install.loncapa.org\n")
     if (! -e "./loncapa-current.tar.gz") {  ;
       system("wget http://install.loncapa.org/versions/$lctarball 2>/dev/null 1>/dev/null");
       if (! -e "./$lctarball") {
         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/loncapa-current.tar.gz\n");              "http://install.loncapa.org/versions/$lctarball\n");
     }      }
     print_and_log("\n");      print_and_log("\n");
 } else {  } else {

Removed from v.1.12  
changed lines
  Added in v.1.17


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>