JDK minimum chroot environment

Oliver Fromme olli at lurza.secnetix.de
Tue May 20 11:16:41 UTC 2008


Hi,

I would like to create a chroot environment which will
contain JDK 1.6 and a Tomcat-based application.  The
base system within the chroot (FreeBSD/amd64 7-stable)
should be as small as possible.

Now my question is, which parts of the base system are
safe to remove, so that the JDK will still work?

My current plan is to remove these things:
 - /rescue
 - /usr/share except for /usr/share/misc/termcap.db
 - /usr/include
 - /lib/*.a and /usr/lib/*.a (static libraries)
 - compiler toolchain (gcc, cpp, ld, everything related).
 - /sbin and /usr/sbin
 - /usr/libexec

Will the JDK still work reliably without the above things?
In particular, does it need any parts of the compiler tool
chain (e.g. the linker or anything)?

Thanks in advance for any hints!

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"IRIX is about as stable as a one-legged drunk with hypothermia
in a four-hundred mile per hour wind, balancing on a banana
peel on a greased cookie sheet -- when someone throws him an
elephant with bad breath and a worse temper."
        -- Ralf Hildebrandt


More information about the freebsd-java mailing list