$Id: how_to_install_on_RedHat7.2.txt,v 1.5 2002/04/14 17:17:32 harris41 Exp $
(Alternative approach to perl module-ing is at end...)
(Alternative approach to mysql is at end...)
Install RedHat 7.2 on your system. Use a 'custom' install and include
the web and sql servers along with any others you need or desire.
1. Add the user www
/usr/sbin/adduser www
2. Determine the user id of www (needed in the next step):
grep ^www /etc/passwd | cut -d':' -f3
3. Work around authentication issues:
wget http://www.wwnet.net/~janc/software/mod_auth_external-2.1.13.tar.gz
tar zxvf mod_auth_external-2.1.13.tar.gz
cd mod_auth_external-2.1.13/pwauth/
edit config.h and change the line:
#define SERVER_UIDS 99 /* user "nobody" */
to
#define SERVER_UIDS 666 /* user "www" */
where 666 is the number that results from step 2 above.
make
cp pwauth /usr/local/sbin
chmod 6755 /usr/local/sbin/pwauth
edit (creating the file) /etc/pam.d/pwauth to have the contents
auth required /lib/security/pam_pwdb.so shadow nullok
auth required /lib/security/pam_nologin.so
account required /lib/security/pam_pwdb.so
4. make sure you have mod_perl and apache on your system
5. Checkout CVS repository (I'm assuming you're already set up for cvs)
cvs co loncapa
6. Install the needed RPMS
Needed rpms for RH7.2 install and where to get them (sort of)
-------------------------------------------------------------
lon-capa rpms (install.lon-capa.org)
-------------------
LON-CAPA-base
LON-CAPA-systemperl
LON-CAPA-krb4
LON-CAPA-mysql
LON-CAPA-barcode
rpms on rpmfind.net (only accept these versions)
------------------------------------------------
ipxutils ipxutils-2.2.0.18-6.i386.rpm
netatalk netatalk-1.5pre6-1rh7.i386.rpm
libungif-progs libungif-progs-4.1.0-9.i386.rpm
libgd libgd-1.3-4.i386.rpm
gnuplot gnuplot-3.7.1-5.i386.rpm
rpms on install cds or updates
------------------------------
+ sysreport sysreport-1.2-1.noarch.rpm
+ mars-nwe mars-nwe-0.99pl20-6.i386.rpm
+ wu-ftpd wu-ftpd-2.6.1-20.i386.rpm
+ linuxconf linuxconf-1.25r7-3.i386.rpm
install these all with rpm -Uvh, occasionally using --force and/or --nodeps
rpm -Uvh linuxconf-1.25r7-3.i386.rpm
rpm -Uvh sysreport-1.2-1.noarch.rpm
rpm -Uvh mars-nwe-0.99pl20-6.i386.rpm
rpm -Uvh wu-ftpd-2.6.1-20.i386.rpm
rpm -Uvh ipxutils-2.2.0.18-6.i386.rpm
rpm -Uvh netatalk-1.5pre6-1rh7.i386.rpm
rpm -Uvh libungif-progs-4.1.0-9.i386.rpm
rpm -Uvh libgd-1.3-4.i386.rpm
rpm -Uvh gnuplot-3.7.1-5.i386.rpm
rpm -Uvh --force --nodeps LON-CAPA-base
rpm -Uvh --force --nodeps rpm -Uvh LON-CAPA-systemperl.rpm
rpm -Uvh --force --nodeps rpm -Uvh LON-CAPA-krb4.rpm
rpm -Uvh --force --nodeps rpm -Uvh LON-CAPA-mysql.rpm
rpm -Uvh --force --nodeps rpm -Uvh LON-CAPA-barcode.rpm
7. Correct some RPM errors
The Perl modules installed by the systemperl rpm are not in the proper place
(the rpm was designed for 5.005 and RedHat 7.2 uses 5.6.0).
cd /usr/lib/perl5/site_perl/5.005
cp -R * ../5.6.0/
8. Fix CGI::Cookie.pm
edit /usr/lib/perl5/5.6.0/CGI/Cookie.pm
change the lines:
# IE requires the path and domain to be present for some reason.
$path = CGI::url(-absolute=>1) unless defined $path;
to:
# IE requires the path and domain to be present for some reason.
($path = $ENV{'SCRIPT_NAME'})=~s![^/]+$!! unless $path;
9. update LON-CAPA-base files with CVS
cd ~/loncapa
cvs update -d
cd loncom/build
make DIST='redhat7' build; make DIST='redhat7' install
10. Update LON-CAPA config files
httpd configuration:
cd /etc/httpd/conf
cp access.conf.lpmlnew access.conf
edit access.conf to reflect the correct information:
PerlSetVar lonHostID YOUR LON-HOST ID
PerlSetVar lonRole library
PerlSetVar lonAdmEMail YOUR EMAIL ADDRESS
PerlSetVar lonDefDomain YOUR DOMAIN
PerlSetVar lonLoadLim 2.0
PerlSetVar lonExpire 86400
PerlSetVar lonReceipt A RANDOM NUMBER (REAL, NOT INTEGER)
PerlSetVar lonSqlAccess 123
Replace the capitalized text with your information
kerberos configuration
edit /etc/krb.conf to reflect your kerberos information
LON-CAPA hosts configuration:
/home/httpd/lonTabs/hosts.tab should be updated
11. Restart the daemons
/etc/init.d/httpd restart
/etc/init.d/loncontrol restart
12. Updated documentation
Please help us keep our documentation up to date! If there is something
in this document that was unclear or required further explaination, please help
us help others by improving it!
SOME NOTES ON THE RPMS INSTALLED
------------------------------------------------------------------
gnuplot gnuplot-3.7.1-5.i386.rpm
USE ONLY THIS VERSION OF GNUPLOT! Other versions may not have
gif support compiled in and dynamically generated plots will fail!
libgd libgd-1.3-4.i386.rpm
Required by gnuplot
==================================================================
Alternative Approaches
------------------------------------------------------------------
Regarding: Perl modules
As noted above, it is possible to install then redirect
the files with LON-CAPA-systemperl. Another approach
is to use loncom/build/system_dependencies/perltest.pl
combined with the 30+ perl specific rpms that RedHat is
now releasing with version 7.*.
* need to fix Cookie.pm as noted above
ncftpget ftp://mirror.pa.msu.edu/linux/redhat/linux/7.2/en/os/i386/RedHat/RPMS/*perl*.rpm
And do comparisons with output from
perl CVS:loncom/build/system_dependencies/perltest.pl
Here is what is found from this approach:
Already installed on RedHat 7.2 by default:
groff-perl-1.17.2-3.i386.rpm
mod_perl-1.24_01-3.i386.rpm
perl-DateManip-5.39-5.noarch.rpm
perl-Digest-MD5-2.13-1.i386.rpm
perl-File-MMagic-1.06-2.i386.rpm
perl-HTML-Parser-3.25-2.i386.rpm
perl-HTML-Tagset-3.03-3.i386.rpm
perl-MIME-Base64-2.12-6.i386.rpm
perl-NKF-1.71-2.i386.rpm
perl-Parse-Yapp-1.04-3.noarch.rpm
perl-SGMLSpm-1.03ii-4.noarch.rpm
perl-Storable-0.6.11-6.i386.rpm
perl-Text-Kakasi-1.04-4.i386.rpm
perl-URI-1.12-5.noarch.rpm
perl-XML-Dumper-0.4-5.noarch.rpm
perl-XML-Encoding-1.01-2.noarch.rpm
perl-XML-Grove-0.46alpha-3.noarch.rpm
perl-XML-Parser-2.30-7.i386.rpm
perl-XML-Twig-2.02-2.noarch.rpm
perl-libnet-1.0703-6.noarch.rpm
perl-libwww-perl-5.53-3.noarch.rpm
perl-libxml-enno-1.02-5.noarch.rpm
perl-libxml-perl-0.07-5.noarch.rpm
New installations needed:
rpm -Uvh mysql-3.23.41-1.i386.rpm
rpm -Uvh perl-DBD-MySQL-1.2216-4.i386.rpm
rpm -Uvh perl-DBI-1.18-1.i386.rpm
Still need:
wget http://www.linuxjar.com/CPAN/authors/id/R/RK/RKOBES/Math-FFT-0.25.tar.gz
wget http://www.cpan.org/authors/id/MVERB/GDTextUtil-0.80.tar.gz
wget http://www.cpan.org/authors/id/W/WA/WADG/GDGraph3d-0.56.tar.gz
wget http://www.cpan.org/authors/id/MVERB/GDGraph-1.33.tar.gz
wget http://www.cpan.org/authors/id/R/RK/RKOBES/Math-Cephes-0.25.tar.gz
wget http://www.cpan.org/authors/id/G/GR/GROMMEL/Math-Random-0.64.tar.gz
wget http://www.cpan.org/modules/by-module/GD/GD-Barcode-1.13.tar.gz
wget http://www.cpan.org/modules/by-module/GD/GD-1.33.tar.gz
wget http://www.cpan.org/authors/id/N/NE/NEDKONZ/Algorithm-Diff-1.11a.tar.gz
wget http://www.cpan.org/authors/id/S/SB/SBURKE/HTML-Tree-3.11.tar.gz
wget http://www.cpan.org/authors/id/G/GB/GBARR/MailTools-1.15.tar.gz
wget http://www.cpan.org/authors/id/E/ER/ERYQ/MIME-tools-BETA-5.503.tar.gz
wget http://www.cpan.org/authors/id/E/EB/EBOHLMAN/Text-Query-Advanced-0.05.tar.gz
wget http://www.cpan.org/authors/id/E/EB/EBOHLMAN/Text-Query-0.07.tar.gz
wget http://www.cpan.org/authors/id/E/EB/EBOHLMAN/Text-Query-Simple-0.03.tar.gz
wget http://www.cpan.org/authors/id/J/JH/JHORWITZ/Krb4-1.1.tar.gz
wget http://www.cpan.org/authors/id/D/DP/DPARIS/Crypt-DES-2.03.tar.gz
wget http://www.cpan.org/authors/id/D/DP/DPARIS/Crypt-IDEA-1.01.tar.gz
wget http://www.cpan.org/authors/id/S/SE/SEYN/Safe-Hole-0.08.tar.gz
Algorithm-Diff
perl Makefile.PL; make; make test; sudo make install
Crypt-DES
perl Makefile.PL; make; make test; sudo make install
Crypt-IDEA (some swig problems...delay)
GD
perl Makefile.PL; make; make test; sudo make install
GD-Barcode
perl Makefile.PL; make; make test; sudo make install
GDGraph (need to do GDTextUtil first so)
GDTextUtil
perl Makefile.PL; make; make test; sudo make install
GDGraph (need to do GDTextUtil first so)
perl Makefile.PL; make; make test; sudo make install
IO-Stringy
perl Makefile.PL; make; make test; sudo make install
Krb4 (need to get athena kerberos...delay)
MailTools
perl Makefile.PL; make; make test; sudo make install
Math-Cephes
perl Makefile.PL; make; make test; sudo make install
Math-Random
perl Makefile.PL; make; make test; sudo make install
MIME-Tools
perl Makefile.PL; make; make test; sudo make install
Safe-Hole
perl Makefile.PL; make; make test; sudo make install
Text-Query
perl Makefile.PL; make; make test; sudo make install
Text-Query-Advanced
perl Makefile.PL; make; make test; sudo make install
Text-Query-Simple
perl Makefile.PL; make; make test; sudo make install
So last problems...
Crypt-IDEA and Krb4
Crypt-IDEA (problems with 5.6.0 namespace... so use pollute flag)
perl Makefile.PL POLLUTE=1; make; make test; sudo make install
Krb4
sudo rpm -Uvh LON-CAPA-krb4-3.1-1.i386.rpm
perl Makefile.PL; make; make test; sudo make install
------------------------------------------------------------------
Regarding MySQL.
Require these RPMs:
mysql-3.23.41-1 (or standard RedHat 7.* version)
mysql-server-3.23.41 (or standard RedHat 7.* version)
Enter the mysql shell---
mysql -u root -p mysql
Run these commands---
CREATE DATABASE loncapa;
INSERT INTO user (Host, User, Password)
VALUES ('localhost','www',password('SOMEPASSWORD'));
GRANT ALL PRIVILEGES ON *.* TO www@localhost;
FLUSH PRIVILEGES;
shell> mysql -u root mysql
mysql> SET PASSWORD FOR root@localhost=PASSWORD('new_password');
------------------------------------------------------------------
Also, be sure to:
/sbin/chkconfig --level 345 httpd on
/sbin/chkconfig --level 345 mysqld on
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>