Subject: [LON-CAPA-dev] Fedora only: LONCAPA prerequisites rpm and yum

From: "Matthew Brian Hall" <[email-masked]>
Date: Fri, 06 Aug 2004 10:31:27 -0400

Hi all, 

The following is for Fedora systems only: 

I've been working the last couple of days on a LONCAPA-prerequisites rpm.  
This rpm only specifies the dependencies and conflicts for LONCAPA and does 
not contain any LONCAPA code.  Nevertheless it will be a useful way for us 
to keep the Fedora machines up to date with our every growing list of 
dependencies. 

Please modify your /etc/yum.conf file to contain the following two entries 
(note: this is different from my earlier yum.conf instructions): 

[loncapa-updates]
name= Fedora Core $releasever LON-CAPA i386 Updates
baseurl=http://install.loncapa.org/fedora/linux/loncapa/$releasever/$basearc 
h 

[loncapa-updates-noarch]
name= Fedora Core $releasever LON-CAPA noarch Updates
baseurl=http://install.loncapa.org/fedora/linux/loncapa/$releasever/noarch 

Once that is done issue the following commands to get and install the 
LONCAPA dependencies: 

# yum update 

# yum install LONCAPA-prerequisites 

Please get back to me if you run into any trouble or have any difficulty. 

Matthew 

 ---------------------------------------
Matthew Hall           [email-masked]
LON-CAPA developer
Michigan State University
 ---------------------------------------

---

From: Guy Albertelli II <[email-masked]>
Date: Fri, 6 Aug 2004 12:10:29 -0400 (EDT)

Hi Matthew,

> # yum install LONCAPA-prerequisites 

I had to do a rpm -e mod_perl first but other than that it was good.

YEah!  One of these days we will move into the modern era of a loncapa
rpm that you install.

:-)
-- 
[email-masked]  LON-CAPA Developer  0-7-3-9-

---

From: Martin Siegert <[email-masked]>
Date: Tue, 31 Aug 2004 15:26:47 -0700

Hi Matthew,

would it be possible to get a list of the LONCAPA prerequisites,
in particular, the list of rpm packages that need to be installed?
Anything else that is done differently compared to RH 7.3?

Background:
I'd like to install LONCAPA on a SuSE-9.1 box (new access server).
The main components (2.6 kernel, apache2) seem to be similar to
Fedora 2. Thus, I should get fairly far by doing installing LONCAPA
accoding to Fedora 2 rules. Just the yum stuff won't work.

Cheers,
Martin

---

From: Guy Albertelli II <[email-masked]>
Date: Tue, 31 Aug 2004 19:00:46 -0400 (EDT)

Hi Martin,

> would it be possible to get a list of the LONCAPA prerequisites,

From the .spec file:

Requires:
apache
gd
perl-GD
perl-GD-Barcode
perl-GDGraph
perl-GD-Graph3d
perl-GDTextUtil
gnuplot
ImageMagick
ImageMagick-perl
perl-suidperl
mod_perl_1
mysql
mysql-server
perl-DBD-MySQL
perl-DBI
perl-Algorithm-Diff
perl-Authen-Krb4
perl-Authen-Krb5
perl-Authen-PAM
perl-Crypt-DES
perl-Crypt-IDEA
perl-Crypt-SSLeay
perl-Event
perl-HTML-Tree
perl-IO-Socket-SSL
perl-IO-stringy
perl-MailTools
perl-Math-Cephes
perl-Math-FFT
perl-Math-Random
perl-Net-PH
perl-Net-SNPP
perl-Net-SSLeay
perl-OLE-Storage_Lite
perl-Parse-RecDescent
perl-Pod-POM
perl-PostScript-Simple
perl-Safe-Hole
perl-Spreadsheet-WriteExcel
perl-String-Similarity
perl-Text-Aspell
perl-Text-Query
perl-TimeDate
perl-Time-HiRes
aspell
perl-IO-Socket-SSL
perl-MIME-Lite
perl-MIME-Types

Requires: apache <= 2.0
Requires: perl-HTML-Parser = 3.36-2.loncapa
Conflicts: httpd php mod_throttle mod_bandwidth
Conflicts: mod_perl

> Anything else that is done differently compared to RH 7.3?

No differences except for the list of rpms that is to be installed.

> Fedora 2.

Note that apache 2 and mod_perl 1.99_X _DO_NOT_ work correctly

We have custom built mod_perl 1.2X to work under Fedora (Mainly you
need to be running perl 5.8.3 for it to work)

Thus the mod_perl_1 package above, and the conflicts with apache
greater than 2.

We also have customized the build of
- perl-Authen-Krb4
- perl-HTML-Parser

We also suggest gnuplot 4.0 since with that we move away from needing
gif support in GD or anywhere else.

The rest of the CPAN modules rpms are builds straight from CPAN.
-- 
[email-masked]  LON-CAPA Developer  0-7-3-4-

---

From: Guy Albertelli II <[email-masked]>
Date: Tue, 31 Aug 2004 19:06:29 -0400 (EDT)

Hi Martin, Matthew,

> in particular, the list of rpm packages that need to be installed?

Reviewing that list I see that we are missing some other utilities
that are required.

In the instructions we list some general categories you need to select
when doing the install that we know pick up some to all of the
utilities we need.

But here is what else I thought of:

zip
unzip
tetex
tetex-dvips
psutils
gs (and associated fonts)
gcc
swig

Matthew, a fun test could be doing a complete minimal install of
Fedora, and then trying to get loncapa up and running, we could get
the prereq RPM even more complete that way.

---

From: Martin Siegert <[email-masked]>
Date: Tue, 31 Aug 2004 16:59:59 -0700

Hi Guy, 

On Tue, Aug 31, 2004 at 07:00:46PM -0400, Guy Albertelli II wrote:
> apache			o
> gd				*
> perl-GD			*
> perl-GD-Barcode		o
> perl-GDGraph			*
> perl-GD-Graph3d		*
> perl-GDTextUtil		*
> gnuplot			*
> ImageMagick			*
> ImageMagick-perl		o
> perl-suidperl			o   (do I really need this?)
> mod_perl_1			o
> mysql				*
> mysql-server			*
> perl-DBD-MySQL		*
> perl-DBI			*
> perl-Algorithm-Diff		*
> perl-Authen-Krb4		o
> perl-Authen-Krb5		o
> perl-Authen-PAM		o
> perl-Crypt-DES		*
> perl-Crypt-IDEA		o
> perl-Crypt-SSLeay		*
> perl-Event			*
> perl-HTML-Tree		*
> perl-IO-Socket-SSL		*
> perl-IO-stringy		*
> perl-MailTools		*
> perl-Math-Cephes		o
> perl-Math-FFT			o
> perl-Math-Random		o
> perl-Net-PH			o
> perl-Net-SNPP			*   (assuming this is perl-Net-SNMP?)
> perl-Net-SSLeay		*
> perl-OLE-Storage_Lite		o
> perl-Parse-RecDescent		*
> perl-Pod-POM			o
> perl-PostScript-Simple	*
> perl-Safe-Hole		o
> perl-Spreadsheet-WriteExcel	*
> perl-String-Similarity	o
> perl-Text-Aspell		o
> perl-Text-Query		o
> perl-TimeDate			*
> perl-Time-HiRes		o
> aspell			*
> perl-MIME-Lite		*
> perl-MIME-Types		*

This does not look too bad: * means included with SuSE-9.1, o means missing.

> Conflicts: httpd php mod_throttle mod_bandwidth

Does this mean apache < 2.0 or would something like apache-2.0.49 actually
work? How do you actually fulfill that requirement under Fedora 2?
There is no apache package ...

Do you have a src.rpm of this package. I'd like to rebuild it.

> Note that apache 2 and mod_perl 1.99_X _DO_NOT_ work correctly

This means that I better build something like apache-1.3.28 and
mod_perl-1.28 myself? (should not be difficult: I would just rebuild
the SuSE-9.0 rpms - SuSE-9.0 still has apache-1 support).

> need to be running perl 5.8.3 for it to work)

SuSE-9.1 has perl-5.8.3.

> We also have customized the build of

SuSE-9.1 has perl-HTML-Parser-3.35, SuSE-9.0 has perl-HTML-Parser-3.28.
Would either of the two work or should I rebuild your 
perl-HTML-Parser-3.36-2.loncapa?

I guess I do not need perl-Authen-Krb4, if I do not use kerberos?

> gif support in GD or anywhere else.

Did you build gnuplot-4.0 from source or do you have a rpm for that as well?

> The rest of the CPAN modules rpms are builds straight from CPAN.

One more question: Is there a way to completely uninstall loncapa from a
machine? I'd like to start from scratch once more ...

Cheers,
Martin

---

From: "Matthew Brian Hall" <[email-masked]>
Date: Wed, 01 Sep 2004 09:30:46 -0400

Hi Martin 

I can answer a few of your questions.  I've updated 
http://install.loncapa.org/resources/fedora/ with a few packages - 

apache-1.3.27-3.src.rpm
gnuplot-4.0.0-1.src.rpm
mod_perl-1.26-5.src.rpm 

>> perl-Net-SNPP		*   (assuming this is perl-Net-SNMP?)
Ouch.  Yes. 

> There is no apache package ...

We use the 7.3 apache package. 

> the SuSE-9.0 rpms - SuSE-9.0 still has apache-1 support).

That sounds like the way to go. 

> perl-HTML-Parser-3.36-2.loncapa?

I've placed the patch (hparser_patch) that's required in the URL above. 

> I guess I do not need perl-Authen-Krb4, if I do not use kerberos?

Guy can answer this, but without modifying the LONCAPA sources I'd imagine 
you'll need the package installed.  We had issues with our compiled version 
of Authen::Krb4 (segfaulting after 2 authentications) that we avoided by 
using a statically linked package. 

> Did you build gnuplot-4.0 from source or do you have a rpm for that

We have an rpm for it and the src rpm, at the URL listed above.  I attempted 
to rebuild it for 7.3 but wasn't successful.  I was able to rebuild it for 
Fedora. 

Additionally, we do patch, compile, and install (in /usr/local/sbin) pwauth 
on every machine (the install.pl script in our fedora_install tarball does 
this).  I need to make this part of the rpm installation process but I 
haven't had time lately to work on it. 

> machine? I'd like to start from scratch once more ...

Everything lives in /home/httpd, /etc/httpd/conf/, /usr/local/loncapa, and 
/usr/local/sbin/.  Removing the contents of those directories (after 
removing the apache package) should suffice to remove loncapa. 

Let me know if you need more info or have any questions.  If you modify 
things for the SUSE install we'd like to know about it. 

Matthew

---

From: Martin Siegert <[email-masked]>
Date: Wed, 1 Sep 2004 13:02:14 -0700

Hi Matthew:

> http://install.loncapa.org/resources/fedora/ with a few packages - 

Thanks, but I do not have read permission for the gnuplot-4.0.0-1.src.rpm
file :-(

And one more question: would it be possible to get a src.rpm for the
LONCAPA-prerequisites rpm for Fedora? I'd like to rbuild it for SuSE.

> That sounds like the way to go. 

And indeed proved to be easy.

> I've placed the patch (hparser_patch) that's required in the URL above. 

That worked beautifully - I just rebuilt the SuSE perl-HTML-Parser-3.35
rpm with that patch.

> We have an rpm for it and the src rpm, at the URL listed above.  I 
> attempted to rebuild it for 7.3 but wasn't successful.  I was able to 
> rebuild it for Fedora. 
> 

I fully intend to do that - it'll make my live easier for future upgrades :-)
Right now I simply changed distprobe to set $dist to fedora2 when it
finds 9.1 in /etc/SuSE-release. That's a band-aid solution at best.
Thus, it would be helpful to now which files would have to be changed
so that distprobe could return something like suse9.1 (for simplicity
right now I still want to treat it like fedora2 and look for differences
later [like httpd.conf in /etc/httpd instead of /etc/httpd/conf]).
I search for files that contain the the string 'fedora', but only found
files that deal with CHECKRPMS (which I ignore for now, but basically
I just have to replace "yum" with "you"). I also grep'd for "DIST", but
could not quite figure out whether that is used anywhere other than
loncom/build/Makefile. Can you enlighten me?

Cheers,
Martin

---

From: "Matthew Brian Hall" <[email-masked]>
Date: Wed, 01 Sep 2004 17:00:23 -0400

Hi Martin, 

> Thanks, but I do not have read permission for the gnuplot-4.0.0-1.src.rpm

Fixed. 

> LONCAPA-prerequisites rpm for Fedora? I'd like to rbuild it for SuSE.

Sure.  I've made a subdirectory off the earlier URL: 

http://install.loncapa.org/resources/fedora/LONCAPA-prerequisites_rpm/ 

It's really just a specfile and a readme.  Feel free to send any 
modifications you make back to me. 

> loncom/build/Makefile. Can you enlighten me?

Nope, but Guy probably can :). 

Matthew

---

From: Guy Albertelli II <[email-masked]>
Date: Wed, 1 Sep 2004 17:38:45 -0400 (EDT)

Hi Matthew, Martin,

> http://install.loncapa.org/resources/fedora/LONCAPA-prerequisites_rpm/ 

Can we do this using CVS? Martin has read access already to CVS and
Matthew had committed the spec and other bits there already.

(But it looked out of date to me? Can yopu commit the 1-3 rpm spec
file?)

> > later [like httpd.conf in /etc/httpd instead of /etc/httpd/conf]).

the loncapafile.lpml file in loncapa/doc/loncapafiles

is the one where installation directories and other things are
controlled.

That is where you will find the fedora2 strings.

---

From: Martin Siegert <[email-masked]>
Date: Fri, 3 Sep 2004 12:37:28 -0700

Hi Matthew, Guy:

what has to be done to remove the perl-Authen-Krb4 requirement?
perl-Authen-Krb4 requires krb4 libraries to be present (at least
on the machine on which you build the package). However, krb4 is
no longer supported under SuSE-9.1 (they use heimdal for krb5).
Thus, I have to get rid of all references to krb4.

Cheers,
Martin

---

From: Guy Albertelli II <[email-masked]>
Date: Fri, 3 Sep 2004 15:49:55 -0400 (EDT)

Hi Martin,

> Thus, I have to get rid of all references to krb4.

All of the krb5 libraries I have seen have a krb4 backward
compatability module.

Usually

headers in
/usr/include/kerbersIV/

libraries in
/usr/lib/

But if you want to eliminate it, commenting out the 'use Authen::Krb4'
atop lond will make things work for the time being.

---

From: Martin Siegert <[email-masked]>
Date: Fri, 3 Sep 2004 20:50:50 -0700

> All of the krb5 libraries I have seen have a krb4 backward

No. The heimdal krb5 implementation is krb5 only. That means that you would
have to install an independent krb4 implementation, which exists
(http://www.pdc.kth.se/kth-krb), but compiling it took me a full day.
And it is still not clear to me whether this would actually work.
Anyway, I compiled a krb4-lib package for SuSE-9.1 which I then can
use to compile perl-Authen-Krb4. However the perl-Authen-Krb4 rpm now
has a dependency on the krb4-lib rpm. Thus, everybody who would want
to install LONCAPA on SuSE-9.1 would have to install the krb4-lib rpm
even if they do not use krb4.

Alternatively, one could rebuild the heimdal rpm packages with krb4
support. That would mean fiddling around with basic
system libraries, which I really like to avoid: if there are security
holes in the krb4 backward compatibility code (and that's were the
kerberos bugs usually are!) I would have to patch those holes myself,
if I would find out about those holes in the first place.

> atop lond will make things work for the time being.

That seems to be the way to go. At least this will work.

Cheers,
Martin

---

From: Martin Siegert <[email-masked]>
Date: Tue, 7 Sep 2004 14:01:46 -0700

Hi,

Just an update:
I succeeded to compile a bunch of rpms for SuSE-9.1:

apache-1.3.28-76.i586.rpm
apache-devel-1.3.28-76.i586.rpm
apache-doc-1.3.28-76.i586.rpm
apache-example-pages-1.3.28-76.i586.rpm
gnuplot-4.0.0-1.i586.rpm
krb5-devel-1.3.4-8.i586.rpm
mod_perl-1.28-102.i586.rpm
perl-Authen-Krb4-1.1-2.i586.rpm
perl-Authen-Krb5-1.3-2.i586.rpm
perl-Authen-PAM-0.14-1.i586.rpm
perl-Crypt-IDEA-1.02-1.i586.rpm
perl-GD-Barcode-1.15-1.i586.rpm
perl-HTML-Parser-3.35-32.i586.rpm
perl-Math-Cephes-0.42-1.i586.rpm
perl-Math-FFT-0.25-1.i586.rpm
perl-Math-Random-0.67-1.i586.rpm
perl-Net-PH-2.21-1.i586.rpm
perl-OLE-Storage_Lite-0.13-1.i586.rpm
perl-Pod-POM-0.15-1.i586.rpm
perl-Safe-Hole-0.10-1.i586.rpm
perl-String-Similarity-1-1.i586.rpm
perl-Text-Aspell-0.04-1.i586.rpm
perl-Text-Query-0.07-1.i586.rpm

Of these the krb5-devel package is not required (and should not be installed).
It is required to build the perl-Authen-Krb4 and perl-Authen-Krb5 packages,
which are by far the biggest obstacle for running LON-CAPA on a SuSE-9.1
system: SuSE uses the heimdal kerberos implementation without krb4 support
compiled in. For that reason the perl-Authen-Krb4 module does not compile.
The bigger problem, however, is the perl-Authen-Krb5: the author of that
module decided not to use the published krb5 API of the kerberos library,
but use internal functions of the MIT implementation (arrghhh). Thus,
there is no hope to compile this on a native SuSE-9.1 box. I finally
succeeded by building the krb5-devel package (from the Fedora 2 src.rpm),
which includes only the krb5 header files and static libraries. This then
was used to compile the perl-Authen-Krb4 and perl-Authen-Krb5 packages.
Therefore, there is no dependency on the krb5-devel package.

Building all the other rpm packages is more or less trivial.

I will now try to install LON-CAPA-1.2 on this machine. Stay tuned.

Cheers,
Martin

-- 
Martin Siegert
Head, HPC@SFU
WestGrid Site Manager
Academic Computing Services                        phone: (604) 291-4691
Simon Fraser University                            fax:   (604) 291-4242
Burnaby, British Columbia                          email: [email-masked]
Canada  V5A 1S6

---

From: Jim Maxka <[email-masked]>
Date: Tue, 07 Sep 2004 14:25:01 -0700

Hi Martin
I am very interested in your project.  Are you referring to the $50 
academic version of 9.1 or the free one.  The free one doesn't seem to 
have many tools built in.  --jim

---

From: Martin Siegert <[email-masked]>
Date: Tue, 7 Sep 2004 14:35:35 -0700

Hi Jim,

I am using the free one. I have switched almost all of my Linux servers
now to that distribution and I have not found anything missing really.
It is actually more complete than anything else out there.

Which tools did you find missing?

Cheers,
Martin

---

From: Martin Siegert <[email-masked]>
Date: Tue, 7 Sep 2004 15:14:03 -0700

Hi Guy, Matthew,

> I will now try to install LON-CAPA-1.2 on this machine. Stay tuned.

Ok. Here is the contents of the WARNINGS file after running UPDATE:

**** ERROR **** CVS source file does not exist: ../../loncom/hosts.tab and neither does target: /home/httpd/lonTabs/hosts.tab
**** ERROR **** CVS source file does not exist: ../../loncom/domain.tab and neither does target: /home/httpd/lonTabs/domain.tab
**** ERROR **** httpd.conf has an overlapping definition of ScriptAlias (it is incorrectly set to "/srv/www/cgi-bin/").
This conflicts with loncapa_apache.conf.
**** ERROR **** httpd.conf has an overlapping definition of DocumentRoot (it is incorrectly set to "/srv/www/htdocs").
This conflicts with loncapa_apache.conf.

Updating access count storage.  This can take quite a while.
Getting directory listing.
Updating 0 files.  Each '.' represents 20 files processed.

Completed!

Updating yum and MySQL configuration files
**** WARNING: gnuplot-3.7.1-5 does not appear to be installed.
**** WARNING: LON-CAPA-systemperl does not appear to be installed.
**** WARNING: perl-suidperl does not appear to be installed.
**** WARNING: ^bzip2-libs does not appear to be installed.
Checking to be sure the Network Time Protocol is running properly.
For more information on ntpd please see http://www.ntp.org/
ntp is not installed.
**** ERROR **** Missing /var/lib/mysql/mysql.sock

The first two errors appear to be normal: those two files could not
possibly exist since LON-CAPA had never been installed on that machine
(I am wondering though, why this is marked as an ERROR rather than a
"remark").

The next two errors refer to SuSE's default location of the httpd
files. I am assuming that editing /etc/httpd/httpd.conf and setting

DocumentRoot "/home/httpd/html"

and

ScriptAlias /cgi-bin/ "/home/httpd/cgi-bin/"

should solve this - correct? anything else that must be changed in
httpd.conf?

The 4 WARNING's I believe can all be ignored:
- gnuplot-4.0.0 is installed
- LON-CAPA-systemperl should not be required
- suidperl is part of perl
- bzip2 libraries are in bzip2 (remark: bzip2-libs was not listed as a
  prerequisite).

I am wondering why I got those warnings: distprobe sets the distribution
to fedora2 (and that seemed to work because the Fedora version of
CHECKRPMS got installed). But there must be something else that sets
the distro (I am assuming that those WARNINGs should only be issued on
a RH7.3 system not on Fedora 2).

The ntp error can be ignored as well (the ntp package is called xntp on
SuSE; probably for historic reasons; arrgh).

The final Mysql ERROR: when I ran UPDATE I did not have a mysqld running.
I actually had not configured mysql in any way.
Can you please remind me what I have to do to set up mysql properly?

Thanks!

Cheers,
Martin

---

From: Guy Albertelli II <[email-masked]>
Date: Tue, 7 Sep 2004 18:47:09 -0400 (EDT)

Hi Martin,

> (I am wondering though, why this is marked as an ERROR rather than a

Yeah they should be ignored for now.

> should solve this - correct? anything else that must be changed in

Nah, you can actually comment out those variables, loncapa_apache.conf
sets them to the values we want.

> a RH7.3 system not on Fedora 2).

Matthew's PIML's incorrectly problem for the distribution on their own
as opposed to using distprobe.

Feel free to fix his PIML's and/or smack him. :-)

> Can you please remind me what I have to do to set up mysql properly?

Errr I don't either. Reading the install.pl script in the
install_fedora tarball might elucidate some clarity in one of us.

Or we can wait till Matthew returns.

---

From: Jim Maxka <[email-masked]>
Date: Tue, 07 Sep 2004 17:16:08 -0700

Doesn't  mysql start up running the  cd setup; install.pl 
That's where it asks for an admin password. 
This is after installing the mysql rpms.

About the SuSE features, my student assistant who is really into linux, 
told me that there is no kernel compiling package in the free verstion.  
He mentioned some other things.  I'll pick his brain tomorrow.
--

Martin Siegert wrote:

>_______________________________________________
>LON-CAPA-dev mailing list
>[email-masked]
>http://mail.lon-capa.org/mailman/listinfo/lon-capa-dev
>  
>

---

From: Martin Siegert <[email-masked]>
Date: Wed, 8 Sep 2004 12:59:55 -0700

Hi,

I am still struggling with the mysql setup:
"/etc/init.d/loncontrol start" only results in "cannot connect to database"
(and, yes, mysqld is running).

- it seems to me that the install.pl script is only for RH 7.3
  (loncapa-1.2.0/doc/install/redhat7.3/install.pl). In fact the
  corresponding loncapa-1.2.0/doc/install/fedora directory is
  empty. How is mysql setup for a fedora2 installation?

- I tried to execute the commands from install.pl manually:

# mysql -u root mysql
mysql> CREATE DATABASE loncapa;
Query OK, 1 row affected (0.00 sec)

mysql> INSERT INTO user (Host, User, Password) VALUES ('localhost','www',password('localhostkey'));
ERROR 1062: Duplicate entry 'localhost-www' for key 1
mysql> 

  This is mysql-4.0.18. I do not know whether the mysql syntax has changed
  from RH7.3's mysql-3.23.58 so much that those commands in install.pl
  do not work anymore.

Any ideas?

Martin

---

From: "Matthew Brian Hall" <[email-masked]>
Date: Wed, 08 Sep 2004 16:17:30 -0400

Hi Martin, 

> (and, yes, mysqld is running).

Good to hear :) 

>   empty. How is mysql setup for a fedora2 installation?

Hmmm.  It's there on my machine: 

[matthew@kirk fedora]$ pwd
/home/matthew/loncapa/doc/install/fedora
[matthew@kirk fedora]$ ls -l
total 32
drwxrwxr-x  2 matthew matthew  4096 Mar 17 13:48 CVS
 -rwxrwxr-x  1 matthew matthew 12671 Dec 19  2003 install.pl
 -rw-rw-r--  1 matthew matthew  9718 Mar 17 13:49 
LON-CAPA_fedora_install.html 

Nevertheless, the commands are the same so it shouldn't make a difference 
which install.pl script you use. 

> ERROR 1062: Duplicate entry 'localhost-www' for key 1

So it looks like the entry we want has already been made.  Try to log in by 
hand: 

# mysql -u www -p
Enter password: localhostkey 

If you can get in and execute 

mysql> USE loncapa; 

then it should be set up well enough.  Running the searchcat.pl script 
should take care of setting up the necessary metadata table, assuming it can 
connect to the database. 

As to why you cannot connect....  I'm not sure.  I'll hack together a 
stripped down test script and we'll have to start from there. 

>   from RH7.3's mysql-3.23.58 so much that those commands in install.pl

I honestly doubt that's the problem here. 

Matthew

---

From: Martin Siegert <[email-masked]>
Date: Wed, 8 Sep 2004 13:37:20 -0700

Hi Matthew,

> LON-CAPA_fedora_install.html 

Hmmm.
# tar tzf loncapa-fedora-1.2.0.tar.gz | grep install.pl
loncapa-1.2.0/doc/install/redhat7.3/install.pl

Did I get the wrong tarball?

> >mysql> INSERT INTO user (Host, User, Password) VALUES 
> >('localhost','www',password('localhostkey'));

Yes, I can get in.

> mysql> USE loncapa; 

This does not work:
ERROR 1044: Access denied for user: 'www@localhost' to database 'loncapa'

What did I mess up this time?

Cheers,
Martin

---

From: "Matthew Brian Hall" <[email-masked]>
Date: Wed, 08 Sep 2004 17:02:23 -0400

> Did I get the wrong tarball?

No, the file just isn't included in the tarball.  [sigh]   It's in CVS. 

> What did I mess up this time?

It does not appear that permissions have been set properly for user www.
It ought to be easy enough to fix.  We have to modify the 'db' table which 
controls user permissions on a database level. 

Get into MySQL as root: 

mysql -u root -p 

USE mysql;
INSERT INTO db VALUES 
('localhost','loncapa','www','Y','Y','Y','Y','Y','Y','N','Y','Y','Y');
DELETE FROM user WHERE host<>'localhost';
FLUSH PRIVILEGES; 

And that should hopefully do it.  If the INSERT fails, look at the 'db' 
table (below is output from 3.23): 

mysql> DESCRIBE db;
+-----------------+-----------------+------+-----+---------+-------+
| Field           | Type            | Null | Key | Default | Extra |
+-----------------+-----------------+------+-----+---------+-------+
| Host            | char(60) binary |      | PRI |         |       |
| Db              | char(64) binary |      | PRI |         |       |
| User            | char(16) binary |      | PRI |         |       |
| Select_priv     | enum('N','Y')   |      |     | N       |       |
| Insert_priv     | enum('N','Y')   |      |     | N       |       |
| Update_priv     | enum('N','Y')   |      |     | N       |       |
| Delete_priv     | enum('N','Y')   |      |     | N       |       |
| Create_priv     | enum('N','Y')   |      |     | N       |       |
| Drop_priv       | enum('N','Y')   |      |     | N       |       |
| Grant_priv      | enum('N','Y')   |      |     | N       |       |
| References_priv | enum('N','Y')   |      |     | N       |       |
| Index_priv      | enum('N','Y')   |      |     | N       |       |
| Alter_priv      | enum('N','Y')   |      |     | N       |       |
+-----------------+-----------------+------+-----+---------+-------+
13 rows in set (0.00 sec) 

Here's the output of the 'user' table in case it's needed: 

mysql> SELECT * FROM user;
+-----------+------+------------------+-------------+-------------+--------- 
 ----+-------------+-------------+-----------+-------------+---------------+- 
 -------------+-----------+------------+-----------------+------------+------ 
 ------+
| Host      | User | Password         | Select_priv | Insert_priv | 
Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | 
Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | 
Index_priv | Alter_priv |
+-----------+------+------------------+-------------+-------------+--------- 
 ----+-------------+-------------+-----------+-------------+---------------+- 
 -------------+-----------+------------+-----------------+------------+------ 
 ------+
| localhost | root | [omitted by mbh] | Y           | Y           | Y        
| Y           | Y           | Y         | Y           | Y             | Y    
| Y         | Y          | Y               | Y          | Y          |
| localhost |      |                  | N           | N           | N        
| N           | N           | N         | N           | N             | N    
| N         | N          | N               | N          | N          |
| localhost | www  | [omitted by mbh] | N           | N           | N        
| N           | N           | N         | N           | N             | N    
| Y         | N          | N               | N          | N          |
+-----------+------+------------------+-------------+-------------+--------- 
 ----+-------------+-------------+-----------+-------------+---------------+- 
 -------------+-----------+------------+-----------------+------------+------ 
 ------+ 

I have a test/diagnostic script just about ready to check in but it doesn't 
address this issue yet. 

Matthew

---

From: Guy Albertelli II <[email-masked]>
Date: Wed, 8 Sep 2004 17:07:44 -0400 (EDT)

> ('localhost','loncapa','www','Y','Y','Y','Y','Y','Y','N','Y','Y','Y');

I am fairly certain you will need 2 more 'Y' on the end for this to work.

---

From: Martin Siegert <[email-masked]>
Date: Wed, 8 Sep 2004 14:34:50 -0700

> I am fairly certain you will need 2 more 'Y' on the end for this to work.

Your are exactly right. I got our local database expert and he figured it
out. This does seem to be a difference between mysql-4 and mysql-3.

And ...

newton:~ # /etc/init.d/loncontrol restart
Restarting LON-CAPA
Ending LON-CAPA client and daemon processes
lonsql     not running
lond       not running
lonc       not running
lonhttpd   not running
Starting LON-CAPA client and daemon processes (please be patient)
lonsql     started
lond       started
lonc       new started
lonhttpd   started

Now the http://newton.science.sfu.ca/lon-status/ web page shows
under Connections

sfua1	ok
sfua2	ok
sfua3	sfua3:self_reply
sfulc	ok

which seems to indicate that at least something is working.
Unfortunately, authentication is not working yet ..

Cheers,
Martin

---

From: Martin Siegert <[email-masked]>
Date: Wed, 8 Sep 2004 15:45:26 -0700

> Unfortunately, authentication is not working yet ..

Forget this ... the stupid sysadmin responsible for the box did not
copy the mysfu.pm file over which is essential for the localauth
authentication here at SFU; arrgghh.

Everything, seems to be working now. I guess I can now claim that
you can run LON-CAPA on SuSE-9.1. The new hosts.tab entry is:

sfua3:sfu:access:newton.science.sfu.ca:142.58.101.18

This will go into production any day now.

Cheers,
Martin

---

From: Guy Albertelli II <[email-masked]>
Date: Thu, 9 Sep 2004 01:32:55 -0400 (EDT)

Hi Martin,

> authentication here at SFU; arrgghh.

Hrrm, authentication should only be occuring on the users home server,
which since you were setting this up as an access server means that
there should have been no user accounts on this machine.

Or did you set it up as a library server at first just to test things
out?

> sfua3:sfu:access:newton.science.sfu.ca:142.58.101.18

I'll add this, so it will be included in the 1.2.1
production_hosts.tab

---

From: "Matthew Brian Hall" <[email-masked]>
Date: Thu, 09 Sep 2004 11:47:43 -0400

Hi. 

This message is mostly directed at Martin, but others might be interested as 
well. 

I've added dependencies to the LONCAPA-prerequisites rpm.  Those of you 
running on non Redhat based systems should make sure you have the following 
packages or equivalents installed: 

perl-libwww-perl
tetex-dvips
tetex-latex
ghostscript 

The following are required for compilation of pwauth and are listed for 
completeness: 

gcc
patch 

The (hopefully) complete listing follows: 

apache
gd
perl
perl-GD
perl-GD-Barcode
perl-GDGraph
perl-GD-Graph3d
perl-GDTextUtil
gnuplot
ImageMagick
ImageMagick-perl
perl-suidperl
mod_perl_1
mysql
mysql-server
perl-DBD-MySQL
perl-DBI
perl-Algorithm-Diff
perl-Authen-Krb5
perl-Authen-PAM
perl-Crypt-DES
perl-Crypt-IDEA
perl-Crypt-SSLeay
perl-Event
perl-HTML-Tree
perl-IO-Socket-SSL
perl-IO-stringy
perl-MailTools
perl-Math-Cephes
perl-Math-FFT
perl-Math-Random
perl-Net-PH
perl-Net-SSLeay
perl-OLE-Storage_Lite
perl-Parse-RecDescent
perl-Pod-POM
perl-PostScript-Simple
perl-Safe-Hole
perl-libwww-perl
tetex-dvips
tetex-latex
ghostscript 

apache <= 2.0
perl-HTML-Parser = 3.36-2.loncapa
perl-Authen-Krb4 = 1.1-1.loncapa 

gcc
patch

---

From: Martin Siegert <[email-masked]>
Date: Thu, 9 Sep 2004 13:03:08 -0700

Hi Matthew,

just a few questions:

1) you no longer list perl-Digest-HMAC, perl-Net-SNMP, swig, guile:
   those are no longer needed?
2) you list perl-Authen-Krb4 = 1.1-1.loncapa which suggests that you
   applied a specific loncapa patch to the source, correct?
   Can I get that patch?
3) (remark) you are listing perl-IO-Socket-SSL twice.

Otherwise, I am ready to build this for SuSE-9.1. After that it should be
possible to use yast to install just that rpm and let yast figure out
the dependencies (similar to yum).

Cheers,
Martin

On Thu, Sep 09, 2004 at 11:47:43AM -0400, Matthew Brian Hall wrote:
> Hi. 
> 
> This message is mostly directed at Martin, but others might be interested 
> as well. 
>

---

From: "Matthew Brian Hall" <[email-masked]>
Date: Thu, 09 Sep 2004 16:30:41 -0400

Hi Martin, 

>    those are no longer needed?

perl-Digest-HMAC / Digest::MD5 are included in the default perl-5.8.3 rpm so 
it isn't listed (and I had forgotten about it completely). 

The perl-Net-SNMP was unneccessary - we needed perl-Net-SMTP which is 
included in the perl-5.8.3 rpm, so it's not listed.  It's part of 
perl-libnet if you need to find a package of it. 

swig, flex, and bison are required - Guy corrected me on this on IRC. 

guile - I'm not sure we explictly need it - perhaps it's a sub-dependency. 

>    applied a specific loncapa patch to the source, correct?

I think we mentioned this earlier.  The Authen::Krb4 module we compiled for 
FC2 segfaulted after 2 authentications so we ended up dumping the statically 
linked Krb4.so file from our ancient 7.3 installation.  You don't use Krb4 
authentication, do you?  Ignore this requirement if you can. 

> 3) (remark) you are listing perl-IO-Socket-SSL twice.

Grrrrr..  Problem exists between chair and keyboard. 

> the dependencies (similar to yum).

The spec file is in CVS, in the modules directory: 

modules/matthew/LON-CAPA_rpm/LONCAPA-prerequisites.spec 

Matthew

---

From: Martin Siegert <[email-masked]>
Date: Thu, 9 Sep 2004 14:02:13 -0700

On Thu, Sep 09, 2004 at 04:30:41PM -0400, Matthew Brian Hall wrote:
> perl-Digest-HMAC / Digest::MD5 are included in the default perl-5.8.3 rpm 
> so it isn't listed (and I had forgotten about it completely). 

Ah. perl-Digest-HMAC is separate on SuSE. I've added it back in.

> guile - I'm not sure we explictly need it - perhaps it's a sub-dependency. 

I think I added this myself: swig depends on guile.
D> 
> FC2 segfaulted after 2 authentications so we ended up dumping the 
> statically linked Krb4.so file from our ancient 7.3 installation.  You 
> don't use Krb4 authentication, do you?  Ignore this requirement if you can. 

Yes, I forgot. But If I do not install it, I have to modify the lond code.
Thus, I guess for now I can get away with installing it, even if it does not
work.

Cheers,
Martin

---

From: Guy Albertelli II <[email-masked]>
Date: Thu, 9 Sep 2004 17:29:35 -0400 (EDT)

Hi Martin,

> Thus, I guess for now I can get away with installing it, even if it does not

Actually it is very likely to work as the krb 4 stuff is statically
linked in, and thus doesn't care what krb5 or 4 libraries you have
installed.