From: Harrison D. <hd...@li...> - 2006-03-01 20:09:32
|
Just getting started with Connotea. I'm a mod_perl noob, but fairly experinced with perl and apache servers. Installed all the perl modules, bu= t I noticed that I'm missing Apache::File which, according to the documentation, should be provided by a Red Hat rpm. Any suggestions as to where I can get it. Tried to install from the cpan shell but it bombed. I tried restarting httpd anyways and it complained as follows: Starting httpd: [Wed Mar 01 12:08:32 2006] [error] Can't load '/usr/lib/perl5/5.8.5/i386-linux-thread-multi/auto/Digest/MD5/MD5.so' for module Digest::MD5: /usr/lib/perl5/5.8.5/i386-linux-thread-multi/auto/Digest/MD5/MD5.so: failed to map segment from shared object: Permission denied at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/XSLoader.pm line 68.\n at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/Digest/MD5.pm line 24\nCompilation failed in require at /var/www/perl/bibliotech/Bibliotech.pm line 23.\nBEGIN failed--compilation aborted at /var/www/perl/bibliotech/Bibliotech.pm line 23.\nCompilation failed in require at (eval 4) line 3.\n\t...propagated at /usr/lib/perl5/5.8.5/base.p= m line 85.\nBEGIN failed--compilation aborted at /var/www/perl/bibliotech/Bibliotech/Apache.pm line 18.\nCompilation failed in require at (eval 2) line 3.\n [Wed Mar 01 12:08:32 2006] [error] Can't load Perl module Bibliotech::Apach= e for server librrc-rh.berkeley.edu:80, exiting... Thanks in advance for any advice. -- Harrison Dekker Coordinator of Data Services Doe/Moffitt Libraries, UC Berkeley |
From: Martin F. <ma...@ne...> - 2006-03-01 20:48:20
|
Hi Harrison, Thanks for taking the plunge! :-) Harrison Dekker wrote: > Just getting started with Connotea. I'm a mod_perl noob, but fairly > experinced with perl and apache servers. Installed all the perl modules, > but I noticed that I'm missing Apache::File which, according to the > documentation, should be provided by a Red Hat rpm. Any suggestions as > to where I can get it. Tried to install from the cpan shell but it bombed. On our RHEL 3 instance, Apache::File is actually provided by Apache::compat which is from rpm "mod_perl-1.99_09-10.ent". On our RHEL 4 instance, it's the same situation but from rpm "mod_perl-1.99_16-4". Both packages have a Vendor of Red Hat, Inc. so they are stock. What do you get back for this command: rpm -qi mod_perl > I tried restarting httpd anyways and it complained as follows: > Starting httpd: [Wed Mar 01 12:08:32 2006] [error] Can't load > '/usr/lib/perl5/5.8.5/i386-linux-thread-multi/auto/Digest/MD5/MD5.so' > for module Digest::MD5: > /usr/lib/perl5/5.8.5/i386-linux-thread-multi/auto/Digest/MD5/MD5.so: > failed to map segment from shared object: Permission denied at > /usr/lib/perl5/5.8.5/i386-linux-thread-multi/XSLoader.pm line 68.\n at > /usr/lib/perl5/5.8.5/i386-linux-thread-multi/Digest/MD5.pm line > 24\nCompilation failed in require at > /var/www/perl/bibliotech/Bibliotech.pm line 23.\nBEGIN > failed--compilation aborted at /var/www/perl/bibliotech/Bibliotech.pm > line 23.\nCompilation failed in require at (eval 4) line > 3.\n\t...propagated at /usr/lib/perl5/5.8.5/base.pm line 85.\nBEGIN > failed--compilation aborted at > /var/www/perl/bibliotech/Bibliotech/Apache.pm line 18.\nCompilation > failed in require at (eval 2) line 3.\n > [Wed Mar 01 12:08:32 2006] [error] Can't load Perl module > Bibliotech::Apache for server librrc-rh.berkeley.edu:80 > <http://librrc-rh.berkeley.edu:80>, exiting... What happens if you run this test script: #!/usr/bin/perl use Digest::MD5 ('md5_hex'); print md5_hex('Hello, World.'), "\n"; It should print: e9db5cf8349b1166e96a742e198a0dd1 If that fails then focus on your installation of Digest::MD5 (maybe try reinstalling it via CPAN). Let us know how it goes. Cheers, Martin |
From: Martin F. <ma...@ne...> - 2006-03-03 00:02:43
|
Yes, in RHEL 4 there is a new feature called selinux. You can read about it here for Red Hat specifically: http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/selinux-guide/ ...and here more generally: http://www.nsa.gov/selinux/ Short answer is, you can turn it off: 1. Run "setenforce 0" as root 2. Edit /etc/selinux/config to say SELINUX=disabled We do have a server running Connotea Code with it still turned on. To do that, we had to change the security context of the files under /var/lib/mysql using the chcon utility because upon installing the mysql rpm package from mysql.com that was not done automatically and mysql would not start. I did not see any denials for httpd regarding MD5. FWIW, I checked out the security label on my copy of MD5.so, and it matches yours, so I'm not sure what is wrong: [root@neutron ~]# cd /usr/lib/perl5 [root@neutron perl5]# find -name MD5.so ./5.8.5/i386-linux-thread-multi/auto/Digest/MD5/MD5.so [root@neutron perl5]# cd 5.8.5/i386-linux-thread-multi/auto/Digest/MD5 [root@neutron MD5]# ll -Z MD5.so -r-xr-xr-x root root root:object_r:lib_t MD5.so If you can't figure out the selinux situation then you can turn it off. Hope you don't mind I copied this back to the mailing list. Cheers, Martin Harrison Dekker wrote: > Martin, > > Re-confirmed that all the CPAN modules were installed so I'm doing some > further diagnostics. > I'm looking in /var/log/messages and I see this occurring when httpd > fails to start: > > Mar 2 15:10:16 librrc-rh kernel: audit( 1141341016.209:19): avc: > denied { execute } for pid=19286 comm="httpd" name="MD5.so" dev=hda2 > ino=965876 scontext=root:system_r:httpd_t tcontext=root:object_r:lib_t > tclass=file > > Apparently this indicates some sort of "SELinux" security problem. I've > been away from Red Hat for a few years so this is new to me. I'll keep > reading up on this stuff, but if you have a quick configuration > solution, shoot me an e-mail (or if you think I'm misdiagnosing this!) > > -Harrison > > On 3/1/06, *Martin Flack* <ma...@ne... > <mailto:ma...@ne...>> wrote: > > Harrison Dekker wrote: > > On 3/1/06, *Martin Flack* <ma...@ne... > <mailto:ma...@ne...> > > On our RHEL 3 instance, Apache::File is actually provided by > > Apache::compat which is from rpm "mod_perl- 1.99_09-10.ent". > ... > > I also tried rpm -ql mod_perl and File.pm <http://File.pm> > <http://File.pm> didn't show up. > > What I mean is that Apache/compat.pm provides the Apache::File package. > There is no Apache/File.pm. Do you have Apache/compat.pm? > > You're starting up Apache as root using a init.d script, correct? > As in: > /sbin/service httpd start > > Martin > > > > > -- > Harrison Dekker > Coordinator of Data Services > Doe/Moffitt Libraries, UC Berkeley |
From: Martin F. <ma...@ne...> - 2006-03-06 20:07:11
|
Harrison, Harrison Dekker wrote: > It's working now, albeit with security off. I'll figure that out > eventually. I need to hack together a module to import directly from a > delicious account. I've used the Net::Delicious module in the past and > it's quite easy to work with. Is there anything besides Import.pm > <http://Import.pm> in your code that I need to look at? Also, how do I Yes, that should be possible. As I'm sure you've seen, Import.pm is a base class for import modules. It's a bit file-oriented but I think it'd work. > get the Toolbox on the right side of screen on connotea.org > <http://connotea.org>. Do I need to hand-code that in a particular > template? The Toolbox component provides that, originally internally but later we reduced it to a glorified include for a toolbox.inc; unfortunately that is not distributed in the open source release because all the material templates for connotea.org are reserved by Nature as proprietary. However if you want to make your own, just keep in mind that $location or ${location} will write out the URL to your instance of bibliotech and with that you can make hyperlinks that point to various services, e.g.: href="${location}library" etc. Martin |