[users@httpd] Garbage collection with 'htcacheclean' in Apache 2.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx:/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@xxxxxxx
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux