INSTALL 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. Installation instructions for iptables
  2. ======================================
  3. iptables uses the well-known configure(autotools) infrastructure.
  4. $ ./configure
  5. $ make
  6. # make install
  7. Prerequisites
  8. =============
  9. * no kernel-source required
  10. * but obviously a compiler, glibc-devel and linux-kernel-headers
  11. (/usr/include/linux)
  12. Configuring and compiling
  13. =========================
  14. ./configure [options]
  15. --prefix=
  16. The prefix to put all installed files under. It defaults to
  17. /usr/local, so the binaries will go into /usr/local/bin, sbin,
  18. manpages into /usr/local/share/man, etc.
  19. --with-xtlibdir=
  20. The path to where Xtables extensions should be installed to. It
  21. defaults to ${libdir}/xtables.
  22. --enable-devel (or --disable-devel)
  23. This option causes development files to be installed to
  24. ${includedir}, which is needed for building additional packages,
  25. such as Xtables-addons or other 3rd-party extensions.
  26. It is enabled by default.
  27. --enable-static
  28. Produce additional binaries, iptables-static/ip6tables-static,
  29. which have all shipped extensions compiled in.
  30. --disable-shared
  31. Produce binaries that have dynamic loading of extensions disabled.
  32. This implies --enable-static.
  33. (See some details below.)
  34. --enable-libipq
  35. This option causes libipq to be installed into ${libdir} and
  36. ${includedir}.
  37. --with-ksource=
  38. Xtables does not depend on kernel headers anymore, but you can
  39. optionally specify a search path to include anyway. This is
  40. probably only useful for development.
  41. If you want to enable debugging, use
  42. ./configure CFLAGS="-ggdb3 -O0"
  43. (-O0 is used to turn off instruction reordering, which makes debugging
  44. much easier.)
  45. Other notes
  46. ===========
  47. The make process will automatically build multipurpose binaries.
  48. These have the core (iptables), -save, -restore and -xml code
  49. compiled into one binary, but extensions remain as modules.
  50. Static and shared
  51. =================
  52. Basically there are three configuration modes defined:
  53. --disable-static --enable-shared (this is the default)
  54. Build a binary that relies upon dynamic loading of extensions.
  55. --enable-static --enable-shared
  56. Build a binary that has the shipped extensions built-in, but
  57. is still capable of loading additional extensions.
  58. --enable-static --disable-shared
  59. Shipped extensions are built-in, and dynamic loading is
  60. deactivated.