Document install changes

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-03-31 20:02:03 -07:00
parent 02a68aa436
commit c26f6d45dd

View File

@ -137,6 +137,499 @@
<section id="Install_Tarball"> <section id="Install_Tarball">
<title>Install using tarball</title> <title>Install using tarball</title>
<section>
<title>Versions 4.5.2 and Later</title>
<para>Shorewall 4.5.2 introduced a change in the philosopy used by the
Shorewall installers. 4.5.2 introduced the concept of
<firstterm>shorewallrc files</firstterm>. These files define the
parameters to the install process. During the first installation using
<emphasis role="bold">Shorewall-core</emphasis> 4.5.2 or later, a
shorewallrc file named ${HOME}/.shorewallrc will be installed. That file
will provide the default parameters for installing other Shorewall
components of the same or later verion.</para>
<para>Note that <emphasis role="bold">you must install Shorewall-core
before installing any other Shorewall package</emphasis>.</para>
<para>Each of the Shorewall packages contains a set of
distribution-specific shorewallrc files:</para>
<itemizedlist>
<listitem>
<para>shorewallrc.apple (OS X)</para>
</listitem>
<listitem>
<para>shorewallrc.archlinux</para>
</listitem>
<listitem>
<para>shorewallrc.cygwin (Cygwin running on Windows)</para>
</listitem>
<listitem>
<para>shorewallrc.debian (Debian and derivatives)</para>
</listitem>
<listitem>
<para>shoreallrc.default (Generic Linux)</para>
</listitem>
<listitem>
<para>shorewallrc.redhat (Fedora, RHEL and derivatives)</para>
</listitem>
<listitem>
<para>shorewallrc.slackware</para>
</listitem>
<listitem>
<para>shorewallrc.suse (SLES and OpenSuSE)</para>
</listitem>
</itemizedlist>
<para>When installing 4.5.2 or later for the first time, a special
procedure must be followed:</para>
<orderedlist>
<listitem>
<para>Select the shorewallrc file that is closest to your
needs.</para>
</listitem>
<listitem>
<para>Review the settings in the file.</para>
</listitem>
<listitem>
<para>If you want to change something then you have two
choices:</para>
<orderedlist numeration="loweralpha">
<listitem>
<para>Copy the file to shorewallrc and edit the copy to meet
your needs; or</para>
</listitem>
<listitem>
<para>If the system has bash (/bin/bash) installed, you can run
./configure (see below)</para>
</listitem>
<listitem>
<para>./install.sh</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>If you don't need to change the file, then simply:</para>
<simplelist>
<member>./install.sh
<replaceable>shorewallrcfile-that-meets-your-needs</replaceable></member>
<member></member>
<member>Example: <command>./install
shorewallrc.debian</command></member>
</simplelist>
</listitem>
</orderedlist>
<para>The shorewall-core install.sh script will store the shorewallrc
file in ~/.shorewallrc where it will provide the defaults for future
installations of all Shorewall products. Other packages/versions can be
installed by simply typing</para>
<simplelist>
<member><command>./install.sh</command></member>
</simplelist>
<section>
<title>Settings in a shorewallrc file</title>
<para>A shorewallrc file contains a number of lines of the form
<replaceable>option</replaceable>=<replaceable>value.</replaceable>
Because some of the installers are shared between Shorewall products,
the files assume the definition of the symbol PRODUCT. $PRODUCT will
contain the name of a Shorewall product (shorewall-core, shorewall,
shorewall6, shorewall-lite, shorewall6-lite or shorewall-init).</para>
<para>Valid values for <replaceable>option</replaceable> are:</para>
<variablelist>
<varlistentry>
<term>HOST</term>
<listitem>
<para>Selects the shorewallrc file to use for default settings.
Valid values are:</para>
<variablelist>
<varlistentry>
<term>apple</term>
<listitem>
<para>OS X</para>
</listitem>
</varlistentry>
<varlistentry>
<term>archlinux</term>
<listitem>
<para>Archlinux</para>
</listitem>
</varlistentry>
<varlistentry>
<term>cygwin</term>
<listitem>
<para>Cygwin running under Windows</para>
</listitem>
</varlistentry>
<varlistentry>
<term>debian</term>
<listitem>
<para>Debian and derivatives (Ubuntu, Kbuntu, etc)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>default</term>
<listitem>
<para>Generic Linux</para>
</listitem>
</varlistentry>
<varlistentry>
<term>redhat</term>
<listitem>
<para>Fedora, RHEL and derivatives (CentOS, Foobar,
etc)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>slackware</term>
<listitem>
<para>Slackware Linux</para>
</listitem>
</varlistentry>
<varlistentry>
<term>suse</term>
<listitem>
<para>SLES and OpenSuSe</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>PREFIX</term>
<listitem>
<para>Top-level directory under which most Shorewall components
are installed. All standard shorewallrc files define this as
<emphasis role="bold">\usr</emphasis>. </para>
</listitem>
</varlistentry>
<varlistentry>
<term>SHAREDIR</term>
<listitem>
<para>The directory where most Shorewall components are
installed. In all of the standard shorewallrc file, this option
has the value <emphasis
role="bold">${PREFIX}/share</emphasis>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>LIBEXECDIR</term>
<listitem>
<para>Directory where internal executables are stored. In the
standard shorewallrc files, the default is either <emphasis
role="bold">${PREFIX}/share</emphasis> or <emphasis
role="bold">${PREFIX}/libexec</emphasis></para>
</listitem>
</varlistentry>
<varlistentry>
<term>PERLLIBDIR</term>
<listitem>
<para>Directory where the Shorewall Perl modules are installed.
Then will be installed in this directory under the sub-directory
Shorewall. Default is distribution-specific.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>CONFDIR</term>
<listitem>
<para>Directory where subsystem configuration data is stored.
Default is <emphasis role="bold">/etc</emphasis> in all
shorewallrc file.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>SBINDIR</term>
<listitem>
<para>Directory where CLI programs will be installed. Default in
all shorewallrc files is /<emphasis
role="bold">sbin</emphasis>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>MANDIR</term>
<listitem>
<para>Directory under which manpages are to be installed.
Default is distribution dependent.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>INITDIR</term>
<listitem>
<para>Directory under which SysV init scripts are installed.
Default is distribution dependent.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>INITSOURCE</term>
<listitem>
<para>File in the package that is to be installed as the SysV
init script for the product.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>INITFILE</term>
<listitem>
<para>The name of the SysV init script when installed under
$INITDIR. May be empty, in which case no SysV init script will
be installed. This is usually the case on systems that run
systemd and on systems like Cygwin or OS X where Shorewall can't
act as a firewall.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>AUXINITSOURCE and AUXINITFILE</term>
<listitem>
<para>Analogs of INITSOURCE and INITFILE for distributions, like
Slackware, that have a master SysV init script and multiple
subordinate scripts.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>SYSTEMD</term>
<listitem>
<para>The directory under which the product's .service file is
to be installed. Should only be specified on systems running
systemd.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>SYSCONFDIR</term>
<listitem>
<para>The directory where package SysV init configuration files
are to be installed. <emphasis
role="bold">/etc/default</emphasis> on Debian and derivatives
and <emphasis role="bold">/etc/sysconfig</emphasis>
otherwise</para>
</listitem>
</varlistentry>
<varlistentry>
<term>SYSCONFFILE</term>
<listitem>
<para>The file in the Shorewall package that should be installed
as ${SYSCONFDIR}/$PRODUCT</para>
</listitem>
</varlistentry>
<varlistentry>
<term>ANNOTATED</term>
<listitem>
<para>Value is either empty or non-empty. Non-empty indicates
that files in ${CONFDIR}/${PRODUCT} should be annotated with
manpage documentation.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>SPARSE</term>
<listitem>
<para>Value is either empty or non-empty. When non-empty, only
${PRODUCT}.conf will be installed in
${CONFDIR}/${PRODUCT}</para>
</listitem>
</varlistentry>
<varlistentry>
<term>VARDIR</term>
<listitem>
<para>Directory where subsystem state data is to be stored.
Default is <emphasis role="bold">/var/lib</emphasis>.</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section>
<title>configure Script</title>
<para>The configure script creates a file named
<filename>shorewallrc</filename> in the current working directory.
This file is the default input file to the
i<command>nstall.sh</command> scripts. It is run as follows:</para>
<simplelist>
<member><command>./configure</command> [
<replaceable>option</replaceable>=<replaceable>value</replaceable> ]
...</member>
</simplelist>
<para>The possible values for option are the same as those shone above
in the shorewallrc file. They may be specified in either upper or
lower case and may optionally be prefixed by '--'. To facilitate use
with the rpm %configure script, the following options are
supported:</para>
<variablelist>
<varlistentry>
<term>vendor</term>
<listitem>
<para>Alias for <emphasis role="bold">host</emphasis>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>sharedstatedir</term>
<listitem>
<para>Alias for <emphasis role="bold">vardir</emphasis>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>datadir</term>
<listitem>
<para>Alias for <emphasis
role="bold">sharedir</emphasis>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>sysconfdir</term>
<listitem>
<para>Alias for <emphasis role="bold">confdir</emphasis>.</para>
</listitem>
</varlistentry>
</variablelist>
<para>Note that %configure may dsgenerate option/value pairs that are
incompatible with the <command>configure</command> script. The current
%configure macro is:</para>
<programlisting>%configure \
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
./configure --host=%{_host} --build=%{_build} \\\
--target=%{_target_platform} \\\
--program-prefix=%{?_program_prefix} \\\
--prefix=%{_prefix} \\\
--exec-prefix=%{_exec_prefix} \\\
--bindir=%{_bindir} \\\
--sbindir=%{_sbindir} \\\
--sysconfdir=%{_sysconfdir} \\\
--datadir=%{_datadir} \\\
--includedir=%{_includedir} \\\
--libdir=%{_libdir} \\\
--libexecdir=%{_libexecdir} \\\
--localstatedir=%{_localstatedir} \\\
--sharedstatedir=%{_sharedstatedir} \\\
--mandir=%{_mandir} \\\
--infodir=%{_infodir}
</programlisting>
<para>On Fedora 16, this expands to:</para>
<programlisting> CFLAGS="${CFLAGS:--O2 -g -march=i386 -mtune=i686}" ; export CFLAGS ;
CXXFLAGS="${CXXFLAGS:--O2 -g -march=i386 -mtune=i686}" ; export CXXFLAGS ;
FFLAGS="${FFLAGS:--O2 -g -march=i386 -mtune=i686}" ; export FFLAGS ;
./configure <emphasis role="bold">--host=i686-pc-linux-gnu</emphasis> --build=i686-pc-linux-gnu \
--program-prefix= \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
--datadir=/usr/share \
--includedir=/usr/include \
--libdir=/usr/lib \
--libexecdir=/usr/libexec \
--localstatedir=/var \
--sharedstatedir=/var/lib \
--mandir=/usr/share/man \
--infodir=/usr/share/info
</programlisting>
<para>The value of <emphasis role="bold">--host </emphasis>does not
map to any of the valid HOST values in shorewallrc. So to use
%configure on a Fedora system, you want to invoke it as
follows:</para>
<programlisting><command>%configure --vendor=redhat</command></programlisting>
<para>To reset the value of a setting in shorewallrc.$host, give it a
null value. For example, if you are installing on a RHEL derivative
that doesn't run systemd, use this command:</para>
<programlisting><command>./configure --vendor=redhat --systemd=</command></programlisting>
</section>
</section>
<section>
<title>Versions 4.5.1 and Earlier</title>
<para>Beginning with Shorewall-4.5.0, the Shorewall packages depend on <para>Beginning with Shorewall-4.5.0, the Shorewall packages depend on
Shorewall-core. So the first step is to install that package:</para> Shorewall-core. So the first step is to install that package:</para>
@ -182,9 +675,9 @@
<para>The <emphasis role="bold">-s</emphasis> option supresses <para>The <emphasis role="bold">-s</emphasis> option supresses
installation of all files in <filename installation of all files in <filename
class="directory">/etc/shorewall</filename> except class="directory">/etc/shorewall</filename> except
<filename>shorewall.conf</filename>. You can copy any other files you <filename>shorewall.conf</filename>. You can copy any other files
need from one of the <ulink url="GettingStarted.html">Samples</ulink> you need from one of the <ulink
or from <filename url="GettingStarted.html">Samples</ulink> or from <filename
class="directory">/usr/share/shorewall/configfiles/</filename>.</para> class="directory">/usr/share/shorewall/configfiles/</filename>.</para>
</listitem> </listitem>
@ -198,10 +691,10 @@
<para>Beginning with shorewall 4.4.20.1, the installer also supports a <para>Beginning with shorewall 4.4.20.1, the installer also supports a
<option>-a</option> (annotated) option. Beginning with that release, the <option>-a</option> (annotated) option. Beginning with that release, the
standard configuration files (including samples) may be annotated with the standard configuration files (including samples) may be annotated with
contents of the associated manpage. The <option>-a</option> option enables the contents of the associated manpage. The <option>-a</option> option
that behavior. The default remains that the configuration files do not enables that behavior. The default remains that the configuration files
include documentation.</para> do not include documentation.</para>
<section> <section>
<title>Executables in /usr and Perl Modules</title> <title>Executables in /usr and Perl Modules</title>
@ -243,29 +736,29 @@
</listitem> </listitem>
</itemizedlist> </itemizedlist>
<para>To allow distributions to designate alternate locations for these <para>To allow distributions to designate alternate locations for
files, the installers (install.sh) from 4.4.19 onward support the these files, the installers (install.sh) from 4.4.19 onward support
following environmental variables:</para> the following environmental variables:</para>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>LIBEXEC</term> <term>LIBEXEC</term>
<listitem> <listitem>
<para>Determines where in /usr getparams, compiler.pl, wait4ifup, <para>Determines where in /usr getparams, compiler.pl,
shorecap and ifupdown are installed. Shorewall and Shorewall6 must wait4ifup, shorecap and ifupdown are installed. Shorewall and
be installed with the same value of LIBEXEC. The listed Shorewall6 must be installed with the same value of LIBEXEC. The
executables are installed in listed executables are installed in
<filename>/usr/${LIBEXEC}/shorewall*</filename>. The default value <filename>/usr/${LIBEXEC}/shorewall*</filename>. The default
of LIBEXEC is 'share'. LIBEXEC is recognized by all installers and value of LIBEXEC is 'share'. LIBEXEC is recognized by all
uninstallers.</para> installers and uninstallers.</para>
<para>Beginning with Shorewall 4.4.20, you can specify an absolute <para>Beginning with Shorewall 4.4.20, you can specify an
path name for LIBEXEC, in which case the listed executables will absolute path name for LIBEXEC, in which case the listed
be installed in ${LIBEXEC}/shorewall*.</para> executables will be installed in ${LIBEXEC}/shorewall*.</para>
<para>Beginning with Shorewall 4.5.1, you must specify an absolute <para>Beginning with Shorewall 4.5.1, you must specify an
pathname for LIBEXEC.</para> absolute pathname for LIBEXEC.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -273,19 +766,20 @@
<term>PERLLIB</term> <term>PERLLIB</term>
<listitem> <listitem>
<para>Determines where in <filename>/usr </filename>the Shorewall <para>Determines where in <filename>/usr </filename>the
Perl modules are installed. Shorewall and Shorewall6 must be Shorewall Perl modules are installed. Shorewall and Shorewall6
installed with the same value of PERLLIB. The modules are must be installed with the same value of PERLLIB. The modules
installed in <filename>/usr/${PERLLIB}/Shorewall</filename>. The are installed in <filename>/usr/${PERLLIB}/Shorewall</filename>.
default value of PERLLIB is 'share/shorewall'. PERLLIB is only The default value of PERLLIB is 'share/shorewall'. PERLLIB is
recognized by the Shorewall and Shorewall6 installers.</para> only recognized by the Shorewall and Shorewall6
installers.</para>
<para>Beginning with Shorewall 4.4.20, you can specify an absolute <para>Beginning with Shorewall 4.4.20, you can specify an
path name for PERLLIB, in which case the Shorewall Perl modules absolute path name for PERLLIB, in which case the Shorewall Perl
will be installed in ${PERLLIB}/Shorewall/.</para> modules will be installed in ${PERLLIB}/Shorewall/.</para>
<para>Beginning with Shorewall 4.5.1, you must specify an absolute <para>Beginning with Shorewall 4.5.1, you must specify an
pathname for PERLLIB.</para> absolute pathname for PERLLIB.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -303,9 +797,9 @@
<section id="Locations"> <section id="Locations">
<title>Default Install Locations</title> <title>Default Install Locations</title>
<para>The default install locations are distribution dependent as shown <para>The default install locations are distribution dependent as
in the following sections. These are the locations that are chosen by shown in the following sections. These are the locations that are
the install.sh scripts.</para> chosen by the install.sh scripts.</para>
<section> <section>
<title>All Distributions</title> <title>All Distributions</title>
@ -589,6 +1083,7 @@
</section> </section>
</section> </section>
</section> </section>
</section>
<section id="Debian"> <section id="Debian">
<title>Install the .deb</title> <title>Install the .deb</title>