You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Marco Emilio Poleggi <ma...@cern.ch> on 2005/04/13 17:47:53 UTC
[users@httpd] Garbage collection with 'htcacheclean' in Apache 2.0
Hi all,
since Apache2.0's 'mod_disk_cache' comes without a garbage collector, as
suggested by Joshua in a previous thread, I resorted to the helper app
'htcacheclean' distributed with Apache2.1. Here some notes on my successful
experience follow.
You will need:
- the full Apache2.1 source code, downloadable from CVS,
- some simple hacking to have a *static* built of the garbage collector only,
which should run on different Linux distributions and Apache2.0 releases as
well.
These are the steps to follow.
1) Download the Apache2.1 source code from CVS
(details at http://httpd.apache.org/dev/anoncvs.txt):
$ CVSROOT=:pserver:anoncvs@cvs.apache.org:/home/cvspublic
$ export CVSROOT
$ cvs login
CVS password: # use 'anoncvs'
$ cvs checkout -d httpd-2.1 httpd-2.0
...
$ cd httpd-2.1/srclib
httpd-2.1/srclib$ cvs checkout apr
...
httpd-2.1/srclib$ cvs checkout apr-util
...
2) Configure the build environment (the source is rooted at 'httpd-2.1/'):
httpd-2.1$ ./buildconf && ./configure
...
3) Build the needed libraries:
httpd-2.1$ cd srclib/apr && make
...
httpd-2.1/srclib/apr$ cd ../apr-util && make
...
httpd-2.1/srclib/apr$ cd ../pcre && make
...
4) Modify the Makefile to force a static build of 'htcacheclean'.
You need just to add the "-static" flag to the last line, which would result (no
line feed!):
"$(LINK) -static $(htcacheclean_LTFLAGS) $(htcacheclean_OBJECTS) $(PROGRAM_LDADD)".
httpd-2.1/srclib/pcre$ cd ../../support
httpd-2.1/support$ vi Makefile # use your favorite editor...
...
5) build 'htcacheclean':
httpd-2.1/support$ make htcacheclean
...
You're done! No 'make install' step is required, just copy the executable where
you prefer, possibly on a different machine, and try it:
$ ./htcacheclean
should print some help info without errors.
Of course, if you need to build the whole Apache server (or you don't want to
bother with compiling many different parts), skip the step 3), and,
substitute the step 5) with the standard "make [&& su -c 'make install']".
Please, report any error, or any situation wherein the above procedure and/or
'htcacheclean' fails.
I hope this can help anyone is going to use the disk-cache!
Cheers,
Marco Emilio
--
_____________________________________________________
Marco Emilio Poleggi
CERN IT/FIO e-mail: Marco.Poleggi@cern.ch
CH-1211 Geneva 23 phone: +41 22 767 8847
Switzerland office: 31.1-014
_____________________________________________________
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Garbage collection with 'htcacheclean' in Apache
2.0
Posted by Marco Emilio Poleggi <ma...@cern.ch>.
Joshua Slive wrote:
> On 4/13/05, Marco Emilio Poleggi <ma...@cern.ch> wrote:
>
>>Hi all,
>>
>>since Apache2.0's 'mod_disk_cache' comes without a garbage collector, as
>>suggested by Joshua in a previous thread, I resorted to the helper app
>>'htcacheclean' distributed with Apache2.1. Here some notes on my successful
>>experience follow.
>>
>
>
> Thanks for the guide. One note: you may want to consider going all
> the way and just upgrade the whole thing to 2.1. This version is now
> in beta, and has much better cache support (I've heard) than 2.0. You
> will need to recompile your modules, however.
>
> Joshua.
>
Yes, that wuold be the simplest solution, but I have to stick with a previous
version due to distribution problems: we at CERN use a Linux distribution called
Scientific Linux Cern (http://linux.web.cern.ch/linux/) which is based on Redhat
Enterprise Linux 3. I cannot install other/newer software on production machines
because no support/maintenance would come from our Linux guys (and I'm not in
charge of maintenance;))...
Anyway, I hope to have a chance to try the latest 2.1, and possibly I will post
any news about cache functionalities.
Cheers,
Marco Emilio
--
_____________________________________________________
Marco Emilio Poleggi
CERN IT/FIO e-mail: Marco.Poleggi@cern.ch
CH-1211 Geneva 23 phone: +41 22 767 8847
Switzerland office: 31.1-014
_____________________________________________________
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Garbage collection with 'htcacheclean' in Apache 2.0
Posted by Joshua Slive <js...@gmail.com>.
On 4/13/05, Marco Emilio Poleggi <ma...@cern.ch> wrote:
> Hi all,
>
> since Apache2.0's 'mod_disk_cache' comes without a garbage collector, as
> suggested by Joshua in a previous thread, I resorted to the helper app
> 'htcacheclean' distributed with Apache2.1. Here some notes on my successful
> experience follow.
>
Thanks for the guide. One note: you may want to consider going all
the way and just upgrade the whole thing to 2.1. This version is now
in beta, and has much better cache support (I've heard) than 2.0. You
will need to recompile your modules, however.
Joshua.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org