Minimal install Ubuntu 8.04 LTS server (64-bit) on a VPS
Based on mod_perl Installation
First some decisions. I chose
- Use bleeding edge sources. In these shoes? I don't think so.
- Install apache, with MPM prefork, in /opt/httpd
- Install perl, without threads enabled, in /opt/perl
- Install mod_perl as a DSO
Install some packages we'll need.
sudo apt-get update
sudo apt-get install build-essential libssl-dev -y
Download and unpack sources
wget http://apache.bglam.com/httpd/httpd-2.2.15.tar.gz
wget http://www.cpan.org/src/perl-5.10.1.tar.gz
wget http://perl.apache.org/dist/mod_perl-2.0-current.tar.gz
tar -xvf httpd-2.2.15.tar.gz
tar -xvf perl-5.10.1.tar.gz
tar -xvf mod_perl-2.0-current.tar.gz
(current version numbers at time of writing)
Install Apache
cd httpd-2.2.15
./configure --prefix=/opt/httpd --with-mpm=prefork
make
sudo make install
cd
Install perl
See discussion on configuring perl/mod_perl on 64 bit Linux and the change to mod_perl install.pod
cd perl-5.10.1
CFLAGS='-m64 -mtune=nocona' /
./Configure -des /
-A ccflags=-fPIC /
-Dprefix=/opt/perl /
-Uusethreads
make
make test
sudo make install
Create some links
cd /usr/local/bin
sudo ln -isv /opt/perl/bin/perl perl
sudo ln -isv /opt/perl/bin/cpanp cpanp
cd
Install mod_perl
You'll need answers to the following
- full path to apxs: /opt/httpd/bin/apxs
- full path to httpd: /opt/httpd/bin/httpd
- ssl lib: /usr
cpanp
>s conf prereqs 1
>s save
>i Bundle::ApacheTest
ends with:
Test Summary Report
-------------------
t/hooks/authen_basic.t (Wstat: 0 Tests: 4 Failed: 1)
Failed test: 4
t/hooks/authz.t (Wstat: 0 Tests: 4 Failed: 1)
Failed test: 4
Files=238, Tests=2400, 111 wallclock secs ( 1.47 usr 1.41 sys + 69.85
+ cusr 20.87 csys = 93.60 CPU)
Result: FAIL
Failed 2/238 test programs. 2/2400 subtests failed.
[warning] server s15342880.onlinehome-server.info:8529 shutdown
[ error] error running tests (please examine t/logs/error_log)
+--------------------------------------------------------+
| Please file a bug report: http://perl.apache.org/bugs/ |
+--------------------------------------------------------+
make: *** [run_tests] Error 1
The tests for 'Bundle::Apache2' failed. Would you like me to proceed a
+nyway or should we abort?
Proceed anyway? [y/N]: y
The reply to a question I asked on the mod_perl list. So close your eyes and boldly hit y
ends with:
Module 'Bundle::Apache2' installed successfully
No errors installing all modules
Add a line to httpd.conf after the comments about LoadModule
LoadModule perl_module modules/mod_perl.so
Have a look see
sudo /opt/httpd/bin/apachectl start
cat /opt/httpd/logs/error_log
[Sun Apr 04 12:53:04 2010] [notice] Apache/2.2.15 (Unix) mod_perl/2.0.
+4 Perl/v5.10.1 configured -- resuming normal operations
Let's see that again :-)
[Mon Apr 05 12:24:50 2010] [notice]
Apache/2.2.15 (Unix)
mod_perl/2.0.4
Perl/v5.10.1 configured
-- resuming normal operations
A tee-shirt maybe required. But before I do that I would appreciate any comments, corrections, criticisms etc.
Thanks in advance.