Hi Fred
Thanks for this... I had a bit of a time meeting the pre-requisites.
I thought is might helpful for others for a bit more detailed Build
and install instructions.
This was all done on a CentOS 5.5 instance in VMWARE player.... I
take no responsibility for the accuracy of the info below. I'm
assuming that you know VMWare and Linux. Please don't post 'how do I
check my IP address in VMWare?' etc. Use Google.
This is for a test environment so I have no concern with security. I
don't recommend this configuration for a Production Environment.
First the Image
http://virtual-machine.org/vmware-image-centos-55-i386-download.
Load the Image into vmware and login.
##add the following to the top of /etc/profile:
PATH="/usr/local/bin:/bin:/usr/bin"
##update everything
yum -y update
##can't live without locate
yum install mlocate
## update the locate database
updatedb
yum install -y gcc gcc-c++
## Perl requires cmake.
##(required by cmake on Linux
yum -y install libaio-devel
## Required by cmake
yum -y install ncurses-devel
## Required for MySQL Server install
yum -y install cmake
##You *want* Apache 2.2.22
wget
http://apache.oregonstate.edu/httpd/httpd-2.2.22.tar.gz
wget
http://ca3.php.net/get/php-5.3.10.tar.gz/from/ca.php.net/mirror
wget
http://www.modssl.org/source/mod_ssl-2.8.30-1.3.39.tar.gz
wget
http://www.openssl.org/source/openssl-1.0.0g.tar.gz
wget
http://perl.apache.org/dist/mod_perl-2.0-current.tar.gz (2.0.5)
wget
http://www.mysql.com/get/Downloads/MySQL-5.5/mysql-.5.21.tar.gz/from/http://mirror.csclub.uwaterloo.ca/mysql/
---install perl (not mod_perl)---
wget
http://www.cpan.org/src/5.0/perl-5.14.2.tar.gz
tar -xzf perl-5.14.2.tar.gz
cd perl-5.14.2
sh Configure -des -Dprefix=/usr/local -Dinstallusrbinperl -Duseshrplib
-Dusedl '-Doptimize=-O2 -pipe -m32 -march=i386'
# -j is OK to use
make -j9
make test
make install
cd /usr/include && h2ph *.h sys/*.h
##The above configuration should install the executable in both /usr/
bin/perl to /usr/local/bin/perl.
## If not then : ln -s /usr/local/bin/perl /usr/bin
##Add /usr/local/lib/perl5/blah/blah//i686-linux/ to /etc/
ld.so.conf.d.
echo ls -la /usr/local/lib/perl5/site_perl/5.14.2/i686-linux/ > /etc/
ld.so.conf.d/perl.conf
run 'ldconfig -v'
---INSTALL open ssl---
cd openssl-<build>
./config shared
make
make test && make install
#Update ldconfig so that the system can find the new shared library
echo /usr/local/lib/ > /etc/ld.so.conf.d/local.conf
/usr/local/ssl/lib/ >> /etc/ld.so.conf.d/local.conf
ldconfig -v
---INSTALL mm --- *** You can skip this step if you want to ***
wget
http://www.mirrorservice.org/sites/ftp.ossp.org/pkg/lib/mm/mm-1.4.2.tar.gz
cd mm-<build>
./configure
make
make test && make install
#Update ldconfig so that the system can find the new shared library
ldconfig -v
---INSTALL Mysql---
# This is all basic Mysql stuff
groupadd mysql/usr/sbin/adduser -c "mySQL non-privileged user" -M -d /
var/empty/mysql -s /sbin/nologin mysql -u 105
cd mysql
cmake .
make
make install
# Postinstallation setup
cd /usr/local/mysql
chown -R mysql .
chgrp -R mysql .
scripts/mysql_install_db --user=mysql
chown -R root .
chown -R mysql data
# Next command is optional
cp support-files/my-medium.cnf /etc/my.cnf
bin/mysqld_safe --user=mysql &
# Next command is optional
cp support-files/mysql.server /etc/init.d/mysql.server
cd /etc/rc.d/rc3.d
ln -s ../init.d/mysql.server S84mysql.server
cd /etc/rc.d/rc0.d/
ln -s ../init.d/mysql.server K01mysql.server
--- install devel headers etcs required for source installs of apache
etc ---
## Get a coffee it's a long go
yum -y groupinstall "Development Tools"
yum -y install zlib-devel
--- install some cpan modules---
cpan HTML::Tagset
cpan DBI
cpan Data::Showtable
cpan DBD::mysql
cpan HTML::Parser
cpan install URI
cpan install LWP
cpan install Time::HiRes
cpan install CGI
cpan 'install Bundle::CPAN'
## cpan Apache2::Request (will NOT load on ubuntu or centos use
Bundle::Apache2 instead after Apache installation)
cpan ExtUtils::XSBuilder::ParseSource
cpan Data::Dumper
cpan Perlbal
## I'd recommend saving your VMWare image here and archiving a copy in
case it all goes ugly from here on
http://apache.sunsite.ualberta.ca//httpd/httpd-2.2.22.tar.gz
## to install htpd 2.2.22 :
./configure --enable-layout=Apache --enable-so --enable-ssl --enable-
cgi --enable-rewrite --enable-usertrack --enable-expires --enable-dav
--enable-dav-fs --with-ssl=/usr/local/ssl --with-included-apr
----did not install pcre with apache 2.2.22 and it worked fine - maybe
only needed for 2.2.41 ??? ---- (one of the reasons why I said above
that you want 2.2.22)
## install pcre - ONLY IF required for apache install (because you
didn't listen and went ahead with 2.2.<>22
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz
tar zxf pcre-8.30.tar.gz
cd pcre<build>
./configure
make && make install
cpan Bundle::Apache2
## apr and aprutil are included in httpd 2.2.22 but NOT in 2.4.1 ()
---- ** This is ONLY if needed ** install apr and apr-util below,
becuase you didn't use Apache 2.2.22---- (I did tell ya)
---- If you use 2.2.22 you can skip from HERE
# install apr - for apache install with mod_perl (yum might have
worked but didn't try it)
wget
http://apache.sunsite.ualberta.ca/apr/apr-1.4.6.tar.gz
tar -zxvf apr-1.4.6.tar.gz
## and apr-util
wget
http://apache.mirror.rafal.ca//apr/apr-util-1.4.1.tar.gz
tar zxvf apr-util-1.4.1.tar.gz
## Install APR
cd apr-1.4.6
./configure --prefix=/usr/local/apr --enable-debug --enable-profile --
enable-threads --enable-other-child
make && make install
## Install APR-util
cd apr-util-1.4.1
./configure --with-apr=/usr/local/apr
make && make install
---- end of apr-apr-util install ----
## AND RESUME here if you were wise enough to install Apache
2.2.22 ;-)
---- libxml and mysql-devel required for php to install ----
install libxml2 for php5
yum -y install libxml2-devel
install mysql header files for PHP
yum -y install mysql-devel
---- end or libxml and mysql-devel ----
## install PHP 5
--- version 1.0 = - the PHP configure line below results in 'make'
failure!!! --- This is just here as a warning if you decide to get
fancy ;-) ---
cd php<build>
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/
local/mysql --with-zlib --with-zlib-dir=/usr/lib --enable-ftp --enable-
mbstring --prefix=/usr/local/php-apache2 --with-config-file-path=/usr/
local/php-apache2/lib --with-mm=/usr --with-openssl=/usr/local/ssl
make
----------------------------------------------------------------------------------------------
***There was a problem with make using configure line above.***
----------------------------------------------------------------------------------------------
Must ADD "-lresolv" to the "EXTRA_LIBS" line of "Makefile" for it to
compile successfully.
The line that (I **THOUGHT**) worked for me was:
EXTRA_LIBS = -lresolv -lcrypt -lcrypt -lpq -lrt -lm -ldl -lnsl -lxml2 -
lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz
-lm -lxml2 -lz -lm -lcrypt
BUT The 'fix' above will allow make/make test&& make install to run
but Apache2 then fails when trying to load the PHP module :-((
---end of version 1.0 attempt ----
---version 2.0 = - the PHP configure line below WORKS! ---
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/
local/mysql
make test (expect failures - seems to be normal :-)) )
make install
---version 2.0 - successfully loaded php with the config above. Apache
works!---
## Install Mod_perl
cd mod_perl-2.0.5
perl Makefile.PL MP_APXS=/usr/local/apache2/bin/apxs
make
make test && make install
vi httpd.conf and add
LoadModule php5_module modules/libphp5.so
LoadModule perl_module modules/mod_perl.so
cpan ExtUtils::XSBuilder::ParseSource
cpan Apache2::Request (will NOT load on ubuntu or centos use
Bundle::Apache2 instead)
cpan Bundle::Apache2 (use /usr/local/ssl)
- cpan Data::Dumper (already installed)
- cpan Perlbal (already installed)
cpan Apache::Bootstrap
cpan Apache2::Connection::XForwardedFor
cpan Config::ApacheFormat
- cpan Class::MethodMaker (already installed)
cpan Apache2::Request - required for libapreq and mod_apreq2.so in
apache
-----------------Saved Image here "Centos5.5-Ready-for-SS-
install"-------------
See INSTALL (part2) for remainder of this Installation