Re: Help: Problems compling mod_perl-1.x-dev on FreeBSD-4.8

2003-05-30 Thread Ged Haywood
Hi there,

On Fri, 30 May 2003, Forrest Aldrich wrote:

> how do you add/activate other modules to apache in this manner.

Here's one I prepared earlier.  Use caution, this is an old one and I
haven't tested it lately.  The documentation is in the Eagle Book, I
don't know if it's in the CookBook, my copy is distant.  Geoff might
tell us.

73,
Ged.

--
USE_APACI=1
APACHE_PREFIX=/usr/local
APACHE_SRC=../apache_1.3.22/src
DO_HTTPD=1
EVERYTHING=1
ALL_HOOKS=1
PERL_SSI=1
PERL_SECTIONS=1
APACI_ARGS=--sbindir=/usr/local/sbin/httpd_perl
APACI_ARGS=--sysconfdir=/usr/local/apache/httpd_perl/conf
APACI_ARGS=--runtimedir=/usr/local/apache/httpd_perl/run
APACI_ARGS=--logfiledir=/usr/local/apache/httpd_perl/logs
APACI_ARGS=--localstatedir=/usr/local/apache/httpd_perl/stat
APACI_ARGS=--proxycachedir=/usr/local/apache/httpd_perl/proxy
APACI_ARGS=--enable-module=rewrite
APACI_ARGS=--enable-module=include
APACI_ARGS=--enable-module=info
APACI_ARGS=--enable-module=usertrack
--



Re: Help: Problems compling mod_perl-1.x-dev on FreeBSD-4.8

2003-05-30 Thread Forrest Aldrich
I'm going to follow your instructions, thank you.

One question, though, since it seems you're adding args to a file that gets 
passed to mod_perl's build process (which in turn builds httpd):  how do 
you add/activate other modules to apache in this manner.   PHP is a DSO 
(for me) so that's solved.  But I have some others, for example one of my 
config commands:

./configure \
--with-perl=/usr/local/bin/perl \
--server-gid=nogroup \
--suexec-docroot=/usr/local/apache/htdocs \
--enable-module=most \
--enable-module=auth_db \
--enable-module=mmap_static \
--enable-shared=max \
--enable-module=ssl \
--enable-rule=SHARED_CORE \
--activate-module=src/modules/dosevasive/libdosevasive.a
and so forth.  I may have had the build process incorrect in the beginning, 
where first I would run a script to do:

./configure  \
--with-perl=/usr/local/bin/perl \
--server-gid=nogroup \
--suexec-docroot=/usr/local/apache/htdocs \
--enable-module=most \
--enable-module=auth_db \
--enable-module=mmap_static  \
--add-module=src/modules/dosevasive/mod_dosevasive.c \
--enable-shared=max
I know that certain configuration parameters need to be set before you 
build Apache (like the Layout, which I customize).

Thanks for your help.



At 12:01 PM 5/26/2003, you wrote:
Hello again,

Please keep it on the list.

On Mon, 26 May 2003, Forrest Aldrich wrote:

> I'm using whatever is in CVS at the moment.  The Changes file indicates
> this is version 1.27_01-dev.
Well that *should* be OK, but I have to wonder why you're doing it
that way.  It can only make things more complicated.  Why not just
grab the latest tarballs?
> trying to figure out how to get it statically-linked, as opposed to DSO --
[snip]
> I've looked around for simple directions out there and haven't run into 
any.

Have you not seen the Guide?  Heaven knows it's mentioned enough on this List,
and on the mod_perl home page at http://perl.apache.org.
It's quite simple to build mod_perl statically.

First you may need to stop any existing Apache - things get confusing
if you accidentally try to run two at once.  (They're confusing enough
if you do it on purpose :).  Then I'd recommend taking all the junk you
now have in /usr/local/apache and hiding it someplace safe for now.  I'm
assuming you're building with the apache binaries, config files etc. under
/usr/local/apache, but you might not be.  If not then get rid of them from
wherever they are.  (I'd just move them, not delete them. :)  Then:
0.  mkdir -p /home/forrest/src
1.  cd /home/forrest/src
2.  tar xzvf .../mod_perl-1.27.tar.gz
3.  tar xzvf .../apache_1.3.27.tar.gz
4.  cd mod_perl-1.27
5.  cp attached_file makepl_args.mod_perl
6.  perl Makefile.PL
7.  make
8.  su
9.  make install
10. cd ../apache_1.3.27
11. make install
Now you should be able to start Apache and see a message in the
error_log telling you what it was you started.  Then the configuration
fun begins: I have no idea if this apache will be suitable for your
purposes, but it is at least a static build and I've been using Apache
servers built this way for several years with never so much as an oops.
73,
Ged.
attached_file is just three lines:
EVERYTHING=1
DO_HTTPD=1
USE_APACI=1
when you get more comfortable with it, you can start to make more
complicated versions of it.  When I want to archive a server build,
all I keep is this file and the tarballs.