Link to home
Start Free TrialLog in
Avatar of klukac
klukac

asked on

Installing spamassassin3.1.3 for system-wide use

I have RHESv3 with perl v5.8.0 and with that version of perl the latest version of spamassassin is recommended, so I went to Apache's download site (Redhat's rpm for spamassassin is old).  The site says that 'rpmbuild -tb Mail-Spamassassin-3.1.3.tar.gz' will build an rpm, however in my case it only extracts the files to /usr/src/redhat/BUILD/Mail-SpamAssassin-3.1.3.  I had already gunzip'd and tar -xvf'd it the file to my desktop and don't see what advantage rpmbuild confers, unless this outcome indicates a problem with my OS.  Pls advise whether there's a problem and if not, whether I should install spamassassin from $HOME/Desktop, /usr/src/redhat/BUILD, or whether it just doesn't matter, thanks.

I read the INSTALL file in the Mail-Spamassassin folder, and it tells me what the required and optional perl modules are (I have all the required and some of the optional modules installed - some conflicted with perl5.8 and others weren't available as rpm's - figured this is complicated enough without installing perl modules from source).  So far, so good.  

However, the INSTALL file only provides instructions on installing spamassassin for personal use (not system-wide).  I need a system-wide install and understand that the usual procedure for that is .configure, make and make install, however there are two directories with configure and makefiles, spamc and spamd, and I hesitate to proceed until I know why /how to proceed  - I'm afraid the documentation may be spread out among files meant for more experienced administrators than myself :(

For the record, the "personal use" instructions from the INSTALL file say to:
- perl Makefile.PL PREFIX=$HOME
-make
-make install

If this is recommended for system-wide installs as well, I'd need to know why '.configure' is omitted, whether I should run these commands twice (for spamc and then spamd), and whether this  would this work:
- perl Makefile.PL PREFIX=/var/spool/mail


SOLUTION
Avatar of pjedmond
pjedmond
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of klukac
klukac

ASKER

Great stuff, thanks.  I finally installed Webmin, which I had avoided until now, maybe because I was prescient of the problems
I now face.  Here are the latest perl modules that Webmin recommends for my system:

Authen::Libwrap (Webmin Configuration)
Authen::PAM (PAM Authentication)
DBD::Pg (PostgreSQL Database Server)
DBD::mysql (MySQL Database Server)
DBI (PostgreSQL Database Server)
IO::Pty (Running Processes)
Net::LDAP (LDAP Users and Groups)
Net::SSLeay (Webmin Configuration)
Sys::Syslog (Webmin Configuration)

At first Webmin couldn't find CPAN.pm and prompted me to do a manual install.
I ended up installing Bundle::CPAN, after a shell prompt/warning when I tried installing an older CPAN.pm file.  I thought the bundle was ok, because the prompts explained to accept if you didn't know the answer and not to worry if you didn't have a program CPAN was looking for.  I didn't read until later that cpan recommends using Build.PL instead of Makefile.PL to build its modules, but the installation was ok and the CPAN.pm errors disappeared. My errors were that ncftp and ncftpget were not present (didn't know what version to install of each), and that Net::Cmd failed to install.

So I tried installing the perl modules again via Webmin.  Webmin takes an enormous amount of time just to display the modules I have installed, and when I attempt to install even a single module, it takes up to 50% of my CPU processing power and then fails, presumably due to a permissions problem.  I therefore opted for a manual install again.  Here's where the nightmare begins:
The first module, Authen-Libwrap, fails to install, prompting me to reinstall Module::Build (Webmin lists Module::Build as installed, but doesn't show an error).  Maybe because I was using Makefile.PL rather than Build.PL, not sure.

So I downloaded Module::Build and tried to reinstall it but got this:
Module::Build error, the following are (optional) prereqs
 * Optional prerequisite ExtUtils::ParseXS is not installed
 * Optional prerequisite Pod::Readme is not installed
 * Optional prerequisite ExtUtils::CBuilder is not installed

Then I downloaded and installed ExtUtils, and got this error:
ExtUtils::CBuilder needed for ExtUtils::ParseXS

Authen-Libwrap being only the first module of the Webmin-recommended list, I don't know that I will live long enough to see every recommended module installed at the rate I'm going... Webmin now shows that nine additional modules are needed where only six were needed before I installed Bundle::CPAN.  I have 40 perl modules installed, up from an initial 22.  Needless to say I haven't gotten to the 10 supposedly optional modules on the spamassassin list, and have no idea how to proceed.  My system has plenty of room on it, but I have limited cache/RAM.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of klukac

ASKER

Thanks very much.  My RHES had slowed to a crawl, so I've proceeded very cautiously.  Nothing was installed via cpan yesterday, so I did a search on modified files from manual installs and there wasn't anything to remove outside my $HOME/Desktop and root/.cpan files that I can recall.  The root/.cpan files are still there, but I wasn't sure whether to delete that folder, which is harmless I assume.  However I found that these files had been modified:
/var/lib/rpm/Packages
/var/lib/rpm/Providename
/var/lib/rpm/Requireversion
/var/lib/rpm/Basenames
/var/lib/rpm/Name
/var/lib/rpm/Group
/var/lib/rpm/Requirename
/var/lib/rpm/Dirnames
/var/lib/rpm/Provideversion
/var/lib/rpm/Installtid
/var/lib/rpm/Sigmd5
/var/lib/rpm/Sha1header
/var/lib/rpm/Filemd5s
/var/lib/rpm/Triggername
Don't know what this means/whether I should be worried about it.  I've checked my list of perl rpm's against yours, and the only ones I'm missing are perl-SGMLSpm and perl-DBD-Pg.  I can install these and  rpm -Uvh the rest, but should I do something about the above first?
Another thing that concerns me is that my webmin version 1.280 bind files are labeled bind8, but I have bind9.  

   
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of klukac

ASKER

Thanks, so far rpm -Uvh is showing that the modules are already installed, but on a couple I get a conflict with perl 5.8 on the man3 files, which carry the same name in perl 5.8 so there must be a duplication of help files.  I have a question in to redhat on whether to ignore or force it, and whether this is a redhat error or what.  So I'll see what they say.  
The attempted installs of the pm's, with webmin in particular, were slowing down my system.  Didn't notice any glaring problem in 'top' after exiting webmin, but it wasn't until after I rebooted that my system started behaving normally again...must have been a memory leak somewhere and I didn't know what to look for.  
Anyway, I should probably understand a little more about webmin vs cpan vs rpm installs of pm's before going on.  If webmin manages perl modules, shouldn't it show the same results as 'rpm -qa |grep perl'?  If I'm to continue using rpm to install/update perl modules, what is the benefit of webmin?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of klukac

ASKER

Sorry about this, for reasons which pass my understanding my last post didn't show up, and since then I've been on travel.  According to Redhat, packages perl-MIME-Base64 and perl-Digest-MD5 are available with RHEL 2.1 only, which would explain the conflict on my RHES 3, so those are packages I should probably uninstall.  At this point I need to get a better handle on how the pieces fit together.  As I understand it, cpan command line installs require tracking submodules, so that any perl module installation can take an enormous amount of time.  
rpm installs avoid this, as do webmin installs, but webmin can help me take advantage of the most recent perl modules.  Since two overlapping management systems are not a good idea, I'll need to a) verify the integrity of my system, and before asking redhat to look at it, I need to understand where Bundle::CPAN perl modules are supposed to be installed - when I checked webmin before leaving (the webmin port isn't open on my firewall) the same ~ 40 pm's that appeared after my manual install of Bundle::CPAN were still there, but I can't find them in my terminal window (either 'find' or 'locate' don't lend themselves to this sort of lookup or I'm using them incorrectly).  As I mention above, rpm -qa |grep perl shows a list of some 26 perl modules, which I'm assuming represent only those perl modules installed via rpm, not those that were installed with Bundle::CPAN.  b) since I could not install a perl module with webmin or cpan, I'll need to figure out how permissions for this are set up.  Of course it would have helped if I had bothered to check /var/log/messages, but it's kind of scary to try installing something that way anyway.

Let me know if my understanding is correct, how to verify webmin's list of perl modules in my terminal window, and what permissions webmin needs to work as advertised, thanks.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of klukac

ASKER

Again great stuff, thanks.  I'm not going to try installing anything via webmin during this trip, since I can't open the webmin port from here, and I won't be home for a while so I'd like to close this out, but I do have one unanswered question.  I'm not sure whether my earlier failure to install any pm's via webmin was caused by the fact that I didn't have the right modules from Bundle::CPAN installed, whether there was a permissions problem on my server, or both.  Given that I also couldn't install anything via the cpan command line tool indicates that my server permissions remain too restrictive to use another tool to install anything.  How do I check webmin permissions on my server (to install perl modules, spamassassin etc) and what should they be set to?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of klukac

ASKER

Ok, did that, got this:
ps -ef |grep webmin
root      2657     1  0 Jul03 ?        00:00:00 /usr/bin/perl /usr/local/webin/miniserv.pl /etc/webmin/miniserv.conf
root      9100  6678  0 02:06 pts/0    00:00:00 grep webmin

(webin is a typo that I made during install, but I'd have to reinstall and so I left it)

 I assume that since the webmin miniserver is running as root, I can try installing perl modules again with webmin when I return home.  If that's not the case, let me know, thanks.