File:  [LON-CAPA] / doc / Attic / how_to_install_on_RedHat7.2.txt
Revision 1.8: download - view: text, annotated - select for diffs
Fri May 10 20:51:20 2002 UTC (22 years ago) by harris41
Branches: MAIN
CVS tags: version_0_5_1, version_0_5, version_0_4, stable_2002_july, STABLE, HEAD
fixing delete from sql syntax

    1: $Id: how_to_install_on_RedHat7.2.txt,v 1.8 2002/05/10 20:51:20 harris41 Exp $
    2: 
    3: (Alternative approach to perl module-ing is at end...)
    4: (Alternative approach to mysql is at end...)
    5: 
    6: Install RedHat 7.2 on your system.  Use a 'custom' install and include
    7: the web and sql servers along with any others you need or desire.
    8: 
    9: 1. Add the user www
   10: /usr/sbin/adduser www
   11: 
   12: 2. Determine the user id of www (needed in the next step):
   13: grep ^www /etc/passwd | cut -d':' -f3
   14: 
   15: 3. Work around authentication issues:
   16: wget http://www.wwnet.net/~janc/software/mod_auth_external-2.1.13.tar.gz
   17: tar zxvf mod_auth_external-2.1.13.tar.gz
   18: cd mod_auth_external-2.1.13/pwauth/
   19: 
   20: edit config.h and change the line:
   21: 
   22: #define SERVER_UIDS 99          /* user "nobody" */
   23: 
   24: to
   25: 
   26: #define SERVER_UIDS 666         /* user "www" */
   27: 
   28: where 666 is the number that results from step 2 above.
   29: 
   30: make
   31: cp pwauth /usr/local/sbin
   32: chmod 6755 /usr/local/sbin/pwauth
   33: 
   34: edit (creating the file) /etc/pam.d/pwauth to have the contents
   35:         auth       required     /lib/security/pam_pwdb.so shadow nullok
   36:         auth       required     /lib/security/pam_nologin.so
   37:         account    required     /lib/security/pam_pwdb.so
   38: 
   39: 4. make sure you have mod_perl and apache on your system
   40: 
   41: 5. Checkout CVS repository (I'm assuming you're already set up for cvs)
   42: cvs co loncapa 
   43: 
   44: 6. Install the needed RPMS
   45: 
   46: Needed rpms for RH7.2 install and where to get them (sort of)
   47: -------------------------------------------------------------
   48: lon-capa rpms    (install.lon-capa.org)
   49: -------------------
   50: LON-CAPA-base
   51: LON-CAPA-systemperl
   52: LON-CAPA-krb4
   53: LON-CAPA-mysql
   54: LON-CAPA-barcode
   55: 
   56: rpms on rpmfind.net (only accept these versions)
   57: ------------------------------------------------
   58: ipxutils              ipxutils-2.2.0.18-6.i386.rpm    
   59: netatalk              netatalk-1.5pre6-1rh7.i386.rpm  
   60: libungif-progs        libungif-progs-4.1.0-9.i386.rpm 
   61: libgd                 libgd-1.3-4.i386.rpm            
   62: gnuplot               gnuplot-3.7.1-5.i386.rpm        
   63: 
   64: rpms on install cds or updates
   65: ------------------------------
   66: + sysreport           sysreport-1.2-1.noarch.rpm   
   67: + mars-nwe            mars-nwe-0.99pl20-6.i386.rpm 
   68: + wu-ftpd             wu-ftpd-2.6.1-20.i386.rpm    
   69: + linuxconf           linuxconf-1.25r7-3.i386.rpm  
   70: 
   71: install these all with rpm -Uvh, occasionally using --force and/or --nodeps
   72: 
   73: rpm -Uvh linuxconf-1.25r7-3.i386.rpm
   74: rpm -Uvh sysreport-1.2-1.noarch.rpm   
   75: rpm -Uvh mars-nwe-0.99pl20-6.i386.rpm 
   76: rpm -Uvh wu-ftpd-2.6.1-20.i386.rpm    
   77: rpm -Uvh ipxutils-2.2.0.18-6.i386.rpm    
   78: rpm -Uvh netatalk-1.5pre6-1rh7.i386.rpm  
   79: rpm -Uvh libungif-progs-4.1.0-9.i386.rpm 
   80: rpm -Uvh libgd-1.3-4.i386.rpm            
   81: rpm -Uvh gnuplot-3.7.1-5.i386.rpm        
   82: rpm -Uvh --force --nodeps LON-CAPA-base
   83: rpm -Uvh --force --nodeps rpm -Uvh LON-CAPA-systemperl.rpm
   84: rpm -Uvh --force --nodeps rpm -Uvh LON-CAPA-krb4.rpm
   85: rpm -Uvh --force --nodeps rpm -Uvh LON-CAPA-mysql.rpm
   86: rpm -Uvh --force --nodeps rpm -Uvh LON-CAPA-barcode.rpm
   87: 
   88: 7. Correct some RPM errors
   89: The Perl modules installed by the systemperl rpm are not in the proper place 
   90: (the rpm was designed for 5.005 and RedHat 7.2 uses 5.6.0).
   91: cd /usr/lib/perl5/site_perl/5.005
   92: cp -R * ../5.6.0/
   93: 
   94: 8. Fix CGI::Cookie.pm
   95: 
   96: edit /usr/lib/perl5/5.6.0/CGI/Cookie.pm
   97: change the lines:
   98:     # IE requires the path and domain to be present for some reason.
   99:     $path   = CGI::url(-absolute=>1) unless defined $path;          
  100: to:
  101:     # IE requires the path and domain to be present for some reason.
  102:     ($path = $ENV{'SCRIPT_NAME'})=~s![^/]+$!! unless $path;         
  103: 
  104: 9.  update LON-CAPA-base files with CVS
  105: cd ~/loncapa
  106: cvs update -d
  107: cd loncom/build
  108: make DIST='redhat7' build; make DIST='redhat7' install
  109: 
  110: 10. Update LON-CAPA config files
  111: 
  112: httpd configuration:
  113: 
  114: cd /etc/httpd/conf
  115: cp access.conf.lpmlnew access.conf
  116: edit access.conf to reflect the correct information:
  117: 
  118: PerlSetVar       lonHostID    YOUR LON-HOST ID
  119: PerlSetVar       lonRole      library
  120: PerlSetVar       lonAdmEMail  YOUR EMAIL ADDRESS
  121: PerlSetVar       lonDefDomain YOUR DOMAIN
  122: PerlSetVar       lonLoadLim   2.0
  123: PerlSetVar       lonExpire    86400
  124: PerlSetVar       lonReceipt   A RANDOM NUMBER (REAL, NOT INTEGER)
  125: PerlSetVar       lonSqlAccess   123
  126: 
  127: Replace the capitalized text with your information
  128: 
  129: kerberos configuration
  130: 
  131: edit /etc/krb.conf to reflect your kerberos information
  132: 
  133: LON-CAPA hosts configuration:
  134: 
  135: /home/httpd/lonTabs/hosts.tab should be updated 
  136: 
  137: 11. Restart the daemons
  138: /etc/init.d/httpd restart
  139: /etc/init.d/loncontrol restart
  140: 
  141: 12. Updated documentation
  142: Please help us keep our documentation up to date!  If there is something
  143: in this document that was unclear or required further explanation, please help
  144: us help others by improving it!
  145: 
  146: 
  147: 
  148:                  SOME NOTES ON THE RPMS INSTALLED
  149: ------------------------------------------------------------------
  150: gnuplot               gnuplot-3.7.1-5.i386.rpm
  151:      USE ONLY THIS VERSION OF GNUPLOT!  Other versions may not have 
  152:      gif support compiled in and dynamically generated plots will fail!
  153: libgd                 libgd-1.3-4.i386.rpm            
  154:      Required by gnuplot
  155: 
  156: 
  157: ==================================================================
  158: Alternative Approaches
  159: 
  160: ------------------------------------------------------------------
  161: Regarding: Perl modules
  162: As noted above, it is possible to install then redirect
  163: the files with LON-CAPA-systemperl.  Another approach
  164: is to use loncom/build/system_dependencies/perltest.pl
  165: combined with the 30+ perl specific rpms that RedHat is
  166: now releasing with version 7.*.
  167: 
  168: * need to fix Cookie.pm as noted above
  169: 
  170: ncftpget ftp://mirror.pa.msu.edu/linux/redhat/linux/7.2/en/os/i386/RedHat/RPMS/*perl*.rpm
  171: And do comparisons with output from
  172: perl CVS:loncom/build/system_dependencies/perltest.pl
  173: 
  174: Here is what is found from this approach:
  175: 
  176: Already installed on RedHat 7.2 by default:
  177: groff-perl-1.17.2-3.i386.rpm
  178: mod_perl-1.24_01-3.i386.rpm
  179: perl-DateManip-5.39-5.noarch.rpm
  180: perl-Digest-MD5-2.13-1.i386.rpm
  181: perl-File-MMagic-1.06-2.i386.rpm
  182: perl-HTML-Parser-3.25-2.i386.rpm
  183: perl-HTML-Tagset-3.03-3.i386.rpm
  184: perl-MIME-Base64-2.12-6.i386.rpm
  185: perl-NKF-1.71-2.i386.rpm
  186: perl-Parse-Yapp-1.04-3.noarch.rpm
  187: perl-SGMLSpm-1.03ii-4.noarch.rpm
  188: perl-Storable-0.6.11-6.i386.rpm
  189: perl-Text-Kakasi-1.04-4.i386.rpm
  190: perl-URI-1.12-5.noarch.rpm
  191: perl-XML-Dumper-0.4-5.noarch.rpm
  192: perl-XML-Encoding-1.01-2.noarch.rpm
  193: perl-XML-Grove-0.46alpha-3.noarch.rpm
  194: perl-XML-Parser-2.30-7.i386.rpm
  195: perl-XML-Twig-2.02-2.noarch.rpm
  196: perl-libnet-1.0703-6.noarch.rpm
  197: perl-libwww-perl-5.53-3.noarch.rpm
  198: perl-libxml-enno-1.02-5.noarch.rpm
  199: perl-libxml-perl-0.07-5.noarch.rpm
  200: 
  201: New installations needed:
  202: rpm -Uvh mysql-3.23.41-1.i386.rpm 
  203: rpm -Uvh perl-DBD-MySQL-1.2216-4.i386.rpm
  204: rpm -Uvh perl-DBI-1.18-1.i386.rpm 
  205: 
  206: Still need:
  207:   http://www.cpan.org/authors/id/R/RK/RKOBES/Math-FFT-0.25.tar.gz
  208: wget http://www.cpan.org/authors/id/MVERB/GDTextUtil-0.80.tar.gz
  209: wget http://www.cpan.org/authors/id/W/WA/WADG/GDGraph3d-0.56.tar.gz
  210: wget http://www.cpan.org/authors/id/MVERB/GDGraph-1.33.tar.gz
  211: wget http://www.cpan.org/authors/id/R/RK/RKOBES/Math-Cephes-0.25.tar.gz
  212: wget http://www.cpan.org/authors/id/G/GR/GROMMEL/Math-Random-0.64.tar.gz
  213: wget http://www.cpan.org/modules/by-module/GD/GD-Barcode-1.13.tar.gz
  214: wget http://www.cpan.org/modules/by-module/GD/GD-1.33.tar.gz
  215: wget http://www.cpan.org/authors/id/N/NE/NEDKONZ/Algorithm-Diff-1.11a.tar.gz
  216: wget http://www.cpan.org/authors/id/S/SB/SBURKE/HTML-Tree-3.11.tar.gz
  217: wget http://www.cpan.org/authors/id/G/GB/GBARR/MailTools-1.15.tar.gz
  218: wget http://www.cpan.org/authors/id/E/ER/ERYQ/MIME-tools-BETA-5.503.tar.gz
  219: wget http://www.cpan.org/authors/id/E/EB/EBOHLMAN/Text-Query-Advanced-0.05.tar.gz
  220: wget http://www.cpan.org/authors/id/E/EB/EBOHLMAN/Text-Query-0.07.tar.gz
  221: wget http://www.cpan.org/authors/id/E/EB/EBOHLMAN/Text-Query-Simple-0.03.tar.gz
  222: wget http://www.cpan.org/authors/id/J/JH/JHORWITZ/Krb4-1.1.tar.gz
  223: wget http://www.cpan.org/authors/id/D/DP/DPARIS/Crypt-DES-2.03.tar.gz
  224: wget http://www.cpan.org/authors/id/D/DP/DPARIS/Crypt-IDEA-1.01.tar.gz
  225: wget http://www.cpan.org/authors/id/S/SE/SEYN/Safe-Hole-0.08.tar.gz
  226: 
  227: Algorithm-Diff
  228: perl Makefile.PL; make; make test; sudo make install
  229: Crypt-DES
  230: perl Makefile.PL; make; make test; sudo make install
  231: Crypt-IDEA (some swig problems...delay)
  232: GD
  233: perl Makefile.PL; make; make test; sudo make install
  234: GD-Barcode
  235: perl Makefile.PL; make; make test; sudo make install
  236: GDGraph (need to do GDTextUtil first so)
  237: GDTextUtil
  238: perl Makefile.PL; make; make test; sudo make install
  239: GDGraph (need to do GDTextUtil first so)
  240: perl Makefile.PL; make; make test; sudo make install
  241: IO-Stringy
  242: perl Makefile.PL; make; make test; sudo make install
  243: Krb4 (need to get athena kerberos...delay)
  244: MailTools
  245: perl Makefile.PL; make; make test; sudo make install
  246: Math-Cephes
  247: perl Makefile.PL; make; make test; sudo make install
  248: Math-Random
  249: perl Makefile.PL; make; make test; sudo make install
  250: MIME-Tools
  251: perl Makefile.PL; make; make test; sudo make install
  252: Safe-Hole
  253: perl Makefile.PL; make; make test; sudo make install
  254: Text-Query
  255: perl Makefile.PL; make; make test; sudo make install
  256: Text-Query-Advanced
  257: perl Makefile.PL; make; make test; sudo make install
  258: Text-Query-Simple
  259: perl Makefile.PL; make; make test; sudo make install
  260: 
  261: So last problems...
  262: Crypt-IDEA and Krb4
  263: 
  264: Crypt-IDEA (problems with 5.6.0 namespace... so use pollute flag)
  265: perl Makefile.PL POLLUTE=1; make; make test; sudo make install
  266: Krb4
  267: sudo rpm -Uvh LON-CAPA-krb4-3.1-1.i386.rpm
  268: perl Makefile.PL; make; make test; sudo make install
  269: 
  270: ------------------------------------------------------------------
  271: 
  272: Regarding MySQL.
  273: Require these RPMs:
  274: mysql-3.23.41-1 (or standard RedHat 7.* version)
  275: mysql-server-3.23.41 (or standard RedHat 7.* version)
  276: 
  277: *********************************************** Generating the 'www' mysql user
  278: Enter the mysql shell---
  279: mysql -u root -p mysql
  280: OR
  281: mysql -u root mysql     (depending on whether the mysql root password is set)
  282: 
  283: Run these commands---
  284: CREATE DATABASE loncapa;
  285: 
  286: INSERT INTO user (Host, User, Password)
  287: VALUES ('localhost','www',password('SOMEPASSWORD'));
  288: 
  289: GRANT ALL PRIVILEGES ON *.* TO www@localhost;
  290: 
  291: FLUSH PRIVILEGES;
  292: 
  293: ************************************* SECURITY: Setting the mysql root password
  294: shell> mysql -u root mysql
  295: mysql> SET PASSWORD FOR root@localhost=PASSWORD('new_password');
  296: 
  297: ************************************ SECURITY: only allow access from localhost
  298: mysql> delete from user where host<>'localhost'
  299: 
  300: ------------------------------------------------------------------
  301: 
  302: Also, be sure to:
  303: /sbin/chkconfig --level 345 httpd on
  304: /sbin/chkconfig --level 345 mysqld on 

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