RedHat RHEL5 Installs

hide

Installing Social Text on CentOS 5 (RHEL5)

I've made 3 attempts at this. The third attempt I finally managed to get SocialText to build. I'm at the point where I need to get it configured properly to a separate Apache 1.3 that I've installed, then proxy it from the default Apache 2 that I'm running. To be honest I've spent almost 3 days to get this far, and at this point I'm looking at other options that aren't so locked into Ubunto and Apache 1.3. I've posted this here to save anyone else who is trying to install SocialText on CentOS 5.2 all the problems I had getting it to build.

^^

Sorting out dependencies

When the install is started, it'll automatically start trying to build all the missing dependancies. I'm going to install as many as these beforehand from available RPMs :)

Note: At this point the CentOS install I'm wokring on is pretty fresh. I don't think I've installed any additional Perl modules yet, other than the ones Webmin needs. MySQL is up and running, but that isn't used by SocialText.

Lines marked with # are typed at the shell.

Lets start with downloading the SocialText and checking the dependencies

#yum install lynx
#lynx "http://sourceforge.net/project/showfiles.php?group_id=170460&package_id=194571&release_id=485511"
(wget wasn't getting what I wanted for some reason)

Downloaded 2.9.5.2

#tar xvf Socialtext-Open-2.9.5.2.tar.gz
#cd Socialtext-Open-2.9.5.2

I ran configure to get the list of missing dependencies, but said no to installing (we don't want to start building yet)

#./configure
#n

The list I got is:-

 Algorithm::Diff 1.1901
 Alzabo 0.8903
 Apache::Constants 1.09
 Apache::Request 1.33
 Apache::Session::Store::Postgres 0
 Apache::Session::Wrapper 0.31
 Apache::SubProcess 0.03
 Apache::URI 1
 Archive::Zip 1.14
 Cache::FileCache 0
 Class::AlzaboWrapper 0.13
 Class::AlzaboWrapper::Cursor 0
 Class::Field 0.12
 Class::Singleton 1.03
 DB_File::Lock 0.05
 Data::UUID 0.14
 Date::Format 0
 DateTime 0.28
 DateTime::Format::HTTP 0.36
 DateTime::Format::Mail 0.2901
 DateTime::Format::Pg 0.1
 DateTime::Format::Strptime 1.07
 DateTime::Format::W3CDTF 0
 Email::Address 1.884
 Email::MIME 1.858
 Email::MIME::ContentType 1.011
 Email::MIME::Creator 1.451
 Email::MIME::Encodings 1.3
 Email::MIME::Modifier 1.44
 Email::MessageID 1.35
 Email::Send 2.05
 Email::Send::Sendmail 0
 Email::Simple 1.92
 Email::Valid 0.15
 Exception::Class 1.21
 File::CounterFile 1.04
 File::Slurp 9999.09
 File::chdir 0.06
 Filesys::DfPortable 0
 HTML::FillInForm 1.05
 HTML::Mason 1.33
 HTML::PrettyPrinter 0.03
 HTML::TreeBuilder 3.13
 HTML::WikiConverter 0.61
 HTML::WikiConverter::Socialtext 0.03
 IPC::Run 0.79
 JSON 1.07
 KinoSearch 0.15
 Lingua::Stem::Snowball 0.941
 List::MoreUtils 0.1
 Log::Dispatch 2.1
 MIME::Types 1.15
 MLDBM 2.01
 MasonX::WebApp 0
 Params::Validate 0.79
 REST::Application 0.97
 Readonly 1.03
 Readonly::XS 1.03
 SOAP::Lite 0.67
 SOAP::Transport::HTTP 0
 Template 2.14
 Template::Iterator::AlzaboWrapperCursor 0.01
 Template::Plugin::FillInForm 0.04
 Text::Autoformat 0
 Text::Balanced 2
 Text::Flowed 0.14
 Tie::IxHash 1.21
 URI::FromHash 0.02
 XML::Atom 0.22
 XML::Feed 0.05
 XML::RSS 1.05
 YAML 0.58

Most of these wont be on the CentOS repository, so I'm going to add a repository from the good people at DAG.

#wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
#rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

And bring things up to date (this may take a few mins, but doesn't need your input. Have a cup of tea and catch up on a bit of telly)

#yum update

Now lets make our way through that list, the ones I list here are the ones that worked.

(all on one line)
#yum install perl-Algorithm-Diff perl-Apache-Session-Wrapper perl-Archive-Zip perl-Data-UUID perl-DateTime-Format-HTTP perl-DateTime-Format-Strptime perl-Email-Send perl-Email-Valid perl-File-CounterFile perl-File-Slurp perl-File-chdir perl-HTML-FillInForm perl-HTML-Mason perl-HTML-PrettyPrinter perl-IPC-Run perl-JSON perl-KinoSearch perl-Log-Dispatch perl-MIME-Types perl-MLDBM perl-Readonly perl-Readonly-XS perl-SOAP-Lite perl-Text-Autoformat perl-Tie-IxHash perl-URI-FromHash perl-XML-Feed perl-XML-RSS perl-YAML

That'll get on most of them including the difficult ones.

Install Postgre if you haven't already

#yum install postgresql postgresql-devel

Make sure you have gcc

#yum install gcc

Now lets try the install

#./configure

Ran manual config for CPAN module
Started installing perlmodules
Paused asking for "Alzabo root?"
Checked docs/INSTALL.dependencies which says to set this to /var/lib/alzabo
#/var/lib/alzabo

Asked for mysql driver
#yes
Asked for postgres
#yes
mysql tests (not unless you fancy creating a new user for this)
#no
postgres tests
#no

prepend missing modules (yes for this question every time it comes up from now on)
#yes

It's paused with:-

                          • WARNING *************

 Your Perl is configured to link against libgdbm,
 but libgdbm.so was not found.
 You could just symlink it to /usr/lib64/libgdbm.so.2.0.0

                          • WARNING *************

It's trying mod_perl-1.30, asks for path to ../apache_x.x/src

This needs apache 1.3. CentOS only has apache 2, and I can't find an RPM for apache 1.3, we'll have to grab the source direct from apache

I'll drop out of the install

#Ctrl+C
#Ctrl+C

And install the apache 1.3 source

#cd /usr/src
#wget http://mirror.fubra.com/ftp.apache.org/httpd/apache_1.3.41.tar.gz
#tar xvf apache_1.3.41.tar.gz

Back to the SocialText install

#./configure

Please tell me where I can find your apache src
../apache_x.x/src

#/usr/src/apache_1.3.41/src

Configure mod_perl with /usr/src/apache_1.3.41/src ? y
#y

Shall I build httpd in /usr/src/apache_1.3.41/src for you? y
#y

Lots of prepend questions...

Paused on Template::Stash::XS
Do you want to build the XS Stash module? y
#y
Do you want to use the XS Stash by default? y
#y

Ok almost everything has installed apart from

Apache::Request 1.33
DateTime::Format::Pg 0.1
HTML::WikiConverter::Socialtext 0.03
MasonX::WebApp 0

It offers to try again with
Install these missing dependencies from CPAN? y
I'm going to say no and try and install these separately to find out what errors are coming out
#n

#cpan install Apache::Request

All the dependencies went on, but the module itself failed with
mod_perl 1.x ( < 1.99) is required at Makefile.PL line 34.

Seems it's picking up a newer mod_perl rather than the apache 1.3 one we just installed...

Let's see what we have
#locate mod_perl.pm

?? Only one on there. Checked version and it's 1.30 which should be fine...
Checked the Makefile.PL code and it just loads mod_perl.pm and checks the version. So I wrote a quick test script.

require mod_perl;
print $mod_perl::VERSION;

Which gave me the expected 1.30. Hmmmm... Something is amiss.

Let's edit the Makefile.PL and see what if going on with it's version check
#cd /root/.cpan/build/libapreq-1.33
#nano Makefile.PL

I changed the line
die "mod_perl 1.x ( < 1.99) is required";
to
die "mod_perl 1.x ( < 1.99) is required you have $mod_perl::VERSION";

Re-tried install
#perl Makefile.PL

mod_perl 1.x ( < 1.99) is required you have 2.000002 at Makefile.PL line 34.

??? Seems it is finding mod_perl version 2 from somewhere...
Still searching, I have no idea where it's getting this from.

After a fair bit of hacking about on Makefile.PL it seems that loading Apache::Test has something to do with it.

Finally figued out Apache::Test loads mod_perl2.pm, this is messing up the test. As I know I've got mod_perl.pm I'm going to comment out this check and try to build.

  1. die "mod_perl 1.x ( < 1.99) is required you have $mod_perl::VERSION";

Re-tried install
#perl Makefile.PL

Worked
#make
#make test
Asked to do tests on httpd, I skipped
#skip

#make install

Finally! Let's try configure again, maybe the other modules will work now.

#./configure
#y

MasonX installed this time. So It's just DateTime::Format::Pg HTML::WikiConverter::Socialtext

#cpan DateTime::Format::Pg

Errors show version of DateTime::TimeZone is to old

#cpan DateTime::TimeZone
#cpan DateTime::Format::Pg

Now installed. One left...

#cpan HTML::WikiConverter::Socialtext

Only failing one test. I'm going to force it
#cpan
#force install HTML::WikiConverter::Socialtext
#quit

Let's try ./configure again

#./configure
Illegal division by zero at /root/Socialtext-Open-2.9.5.2/build/bin/Makefile.PL line 88.
Could not create build system

Checking Makefile.PL it seems there is an error and it assumes it's due to a missing module so tries to display a list which is empty.
Hacking to find out what the real error is...
Commenting out

  1. install_deps(); # Only returns if user chooses not to install deps.

#./configure

MakeMaker FATAL: prerequisites not found (XML::Feed not installed, Email::MIME::Creator not installed, XML::Atom not installed)

??? But they are... Writing test perl test script

use XML::Feed;
use Email::MIME::Creator;
use XML::Atom;

print 'ok';

#perl tester.pl

Base class package "Class::ErrorHandler" is empty.
 (Perhaps you need to 'use' the module which defines that package first.)
 at /usr/lib/perl5/vendor_perl/5.8.8/XML/Feed.pm line 6
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/XML/Feed.pm line 6.
Compilation failed in require at tester.pl line 1.
BEGIN failed--compilation aborted at tester.pl line 1.

Guess those RPMs forgot to declare some dependencies

#cpan Class::ErrorHandler
#perl tester.pl

Base class package "Email::Simple::Creator" is empty.
 (Perhaps you need to 'use' the module which defines that package first.)
 at /usr/lib/perl5/vendor_perl/5.8.8/Email/MIME/Creator.pm line 7
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/Email/MIME/Creator.pm line 7.
Compilation failed in require at tester.pl line 2.
BEGIN failed--compilation aborted at tester.pl line 2.

#cpan Email::Simple::Creator
#perl tester.pl

Can't locate XML/XPath.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.7/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.6/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.7/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.6/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /usr/lib/perl5/vendor_perl/5.8.8/XML/Atom.pm line 11.
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/XML/Atom.pm line 27.
Compilation failed in require at tester.pl line 3.
BEGIN failed--compilation aborted at tester.pl line 3.

#cpan XML::XPath
#perl tester.pl

Looks ok...

#./configure

WOW! Actually worked this time!

Building Social Test

#make

#make test

Lots of failed tests

Failed 147/277 test scripts, 46.93% okay. 1645/2466 subtests failed, 33.29% okay.
make: *** test Error 9

I'm guessing that there is a common problem causing most of these errors, otherwise this is really bad news.

It looks like this is an issue with the database, I haven't created one so I'm guessing that might be the problem. Checking the readme...

Setting up the database

Working through INSTALL.postgres

Updating postgre config
#nano /var/lib/pgsql/data/pg_hba.conf

Adding the lines:-

      1. For SocialText

local template1 nlw trust
local NLW nlw trust

Immediately below:

  1. TYPE DATABASE USER CIDR-ADDRESS METHOD

As these need to be above the ones already in there.

Restarting postgres

#service postgresql restart

Create the required user

#sudo -u postgres createuser nlw
#n
#y
#n

Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n
CREATE ROLE

Creating database
#sudo -u postgres createdb -O nlw NLW

For testing I need to create a new postgre database and user based on the user I'm loggen in as, which is root. ( I probably should create another account for this )

#sudo -u postgres createuser root
#n
#n
#n
#sudo -u postgres createdb -O root NLW_root_testing

Trying the tests again

#make test

Still getting errors. Not database ones anymore, but now
Couldn't open directory /usr/share/nlw/doc-pages/tutorial:
No such file or directory at /usr/src/Socialtext-Open-2.9.5.2/lib/Socialtext/Pages.pm line 342.

?? Seems almost like it's asking for files that would be installed in /usr/share... Maybe you need to make install before the make test?

Lets check the configuration it's trying, re-running configure
#./configure

Configuration Settings:
 APACHE_PERL_MODULEDIR =
 APACHE_PROXY = 0
 APACHE_STATUS =
 APACHE2_MODULEDIR =
 BINDIR = /usr/local/bin
 CACHEDIR = /var/cache/socialtext
 CEQLOTRON_LOGFILE = /var/log/ceqlotron.log
 CONFDIR = /etc/socialtext
 DB_HOST =
 DB_PORT =
 DB_USER = postgres
 DESTDIR =
 DEV = 0
 FORCE_SSL_LOGIN = 0
 HOSTNAME = ns.cosmichost.com
 HTTPD = /usr/sbin/apache-perl
 HTTPD_CONFDIR = /etc/apache-perl
 HTTPD_LOCKDIR = /var/lock
 HTTPD_LOGDIR = /var/log/apache-perl
 HTTPD_PIDDIR = /var/run
 INIT_D = /etc/init.d
 INSTALL_PROG = /usr/bin/install
 LIBDIR = /usr/lib/perl5/site_perl/5.8.8
 MAN1DIR = /usr/share/man/man1
 MAN3DIR = /usr/share/man/man3
 PERL = /usr/bin/perl
 PIDDIR = /var/run/socialtext
 PREFIX =
 ROOT_GROUP = root
 ROOT_USER = root
 SERVER_ADMIN = root@ns.cosmichost.com
 SHAREDIR = /usr/share/nlw
 SOCIALTEXT_OPEN = 1
 SPOOLDIR = /var/spool/socialtext
 SSLDIR = /etc/ssl
 ST_GROUP = www-data
 ST_USER = www-data
 SUPPORT_ADDRESS = root@ns.cosmichost.com
 URL = https://ns.cosmichost.com/
 WEBROOT = /var/www/socialtext

I ran a command to find out the details of what each of these are for
#./configure --varlist

All the stuff to do with apache here is wrong. Think it's time to get Apache 1.3 installed.

#./configure --prefix=/usr/local/apache-perl --enable-module=rewrite --enable-shared=rewrite --enable-module=proxy --enable-shared=proxy --enable-suexec --suexec-caller=apache --suexec-userdir=public_html --suexec-docroot=/home --suexec-uidmin=500 --suexec-gidmin=500 --suexec-logfile=/var/log/httpd/suexec_log --suexec-safepath="/usr/local/bin:/usr/bin:/bin"
#make
#make install

Updating the config as this is not my main apache server so I'm putting on port 8081 (will have tomcat on 8080 at some point in the future so keeping that port open)

#nano /usr/local/apache-perl/conf/httpd.conf
Changed:-
Port 80
to:-
Port 8081

Then added:-
Listen 8081

Changed:-
User nobody
Group nobody
to:-
User apache
Group apache

Then added:-
AddModule mod_perl.c

Starting the server
#/usr/local/apache-perl/bin/apachectl start

Wont start, can't find mod_perl, it's in the source but isn't being built. Maybe I should have got apache 1.3 running first??

Next steps

  • Finish configuring Apache 1.3 to work properly with the old mod_perl 1.3
  • Re-run ./configure and set the correct config options
  • make
  • make install
  • Setup the Apache 2 - Apache 1.3 proxy
  • Jump for joy that it finally works
  • Search for solutions online to try and deal with hair loss suffered during install

Recommendations to SocialText developers

Apache 1.3 will be running end of life soon enough (if it isn't already), same goes for mod_perl 1.3. I was very supprised to find that even the latest SocialText is still locked into this. It also seems pretty locked into Ubunto.

So for people to have a change of installing SocialText they need to be running:-
Ubunto
Apache 1.3
mod_perl 1.3

Otherwise they are going to have a helll of a time trying to get it on there and probably give up before they get as far as I did.
This doesn't seem to make a lot of business sense to me. Why lock yourself into such a small portion of web servers?

I'd recommend working towards a system that uses FastCGI, that way you are not locked to Apache and Linux. People could use other servers such as lighttpd or even IIS on Windows.

Lyle Hopkins


Thanks for this page Lyle. I'm very sympathetic to your concerns and recommendations. We only develop Socialtext on Ubuntu 6.06 LTS server, which still has Apache 1.3 support, hence our recommendation that others use Ubuntu 6.06. I'm sure you would have made much better progress on ubuntu.

Our developers have wanted to get off apache1.3 and mod_perl1 for a long time, but it just hasn't been in the cards yet. I'll pass your feedback on to management.

Thanks,
Luke

contributed by Luke Closs on Oct 21 10:03am


Tags

    There are no tags for this page.

Incoming Links

Attachments

Click this button to save this page to your computer for offline use. Created by Lyle Hopkins on Oct 21 6:46am. Updated by Luke Closs on Oct 21 10:03am. (24 revisions, 1,971 views)