Project

General

Profile

strongSwan Installation Documentation » History » Version 58

Tobias Brunner, 24.09.2019 11:25
Monolithic/Static builds

1 53 Tobias Brunner
{{title(strongSwan Installation Documentation)}}
2 25 Tobias Brunner
3 53 Tobias Brunner
h1. strongSwan Installation Documentation
4 25 Tobias Brunner
5 25 Tobias Brunner
6 25 Tobias Brunner
h2. Distribution packages
7 25 Tobias Brunner
8 25 Tobias Brunner
9 1 Martin Willi
There are currently packages for:
10 57 Tobias Brunner
* "Arch Linux":https://www.archlinux.org/packages/?sort=&q=strongswan
11 27 Tobias Brunner
* "Debian":http://packages.debian.org/search?keywords=strongswan&searchon=names&suite=all&section=all
12 31 Andreas Steffen
* "Ubuntu":http://packages.ubuntu.com/search?keywords=strongswan&searchon=names&suite=all&section=all
13 27 Tobias Brunner
* "openSUSE":http://software.opensuse.org/search?p=1&q=strongswan
14 57 Tobias Brunner
* "Gentoo":https://packages.gentoo.org/packages/search?q=strongswan
15 1 Martin Willi
* "Fedora":https://apps.fedoraproject.org/packages/strongswan/overview/
16 1 Martin Willi
* "Red Hat Enterprise Linux and CentOS via EPEL":http://pkgs.org/download/strongswan
17 57 Tobias Brunner
18 57 Tobias Brunner
* "FreeBSD":https://www.freshports.org/security/strongswan/
19 57 Tobias Brunner
* "Homebrew":https://formulae.brew.sh/formula/strongswan#default (macOS)
20 1 Martin Willi
21 25 Tobias Brunner
h2. Compile yourself
22 16 Martin Willi
23 16 Martin Willi
24 1 Martin Willi
25 30 Andreas Steffen
h3. Linux Kernel requirements
26 25 Tobias Brunner
27 25 Tobias Brunner
strongSwan should run on most distros' kernels. If you build your own kernel, include [[KernelModules|the required modules]].
28 25 Tobias Brunner
29 25 Tobias Brunner
h3. Building strongSwan
30 25 Tobias Brunner
31 1 Martin Willi
32 43 Tobias Brunner
Since the release of strongSwan 4.x the GNU build system (Autotools) is used to build strongSwan.
33 38 Tobias Brunner
34 50 Tobias Brunner
There is a growing list of configure options available (*note that many of these are enabled by default*):
35 43 Tobias Brunner
36 45 Tobias Brunner
* [[Autoconf|Autoconf options for the most current release]]
37 46 Tobias Brunner
* [[Autoconf46|Autoconf options for 4.6 releases]]
38 1 Martin Willi
39 50 Tobias Brunner
Refer to the [[PluginList|list of plugins]] to learn more about the plugins enabled with the above options.
40 48 Tobias Brunner
41 49 Tobias Brunner
*Note:* Some plugins have dependencies on third-party libraries. To compile such plugins the header files of those libraries are required. Make sure these are installed on your system, e.g. by installing the appropriate _-dev_ package on Debian-based systems. Otherwise, the ./configure script will complain that it can't find the library or header files.
42 40 Tobias Brunner
43 40 Tobias Brunner
44 1 Martin Willi
The build procedure is as with any autotools project:
45 40 Tobias Brunner
46 1 Martin Willi
# "Download strongSwan":http://www.strongswan.org/download.html:
47 1 Martin Willi
<pre>
48 45 Tobias Brunner
 wget http://download.strongswan.org/strongswan-x.x.x.tar.bz2
49 1 Martin Willi
</pre>
50 40 Tobias Brunner
# Unpack the tarball:
51 40 Tobias Brunner
<pre>
52 45 Tobias Brunner
 tar xjvf strongswan-x.x.x.tar.bz2; cd strongswan-x.x.x
53 40 Tobias Brunner
</pre>
54 40 Tobias Brunner
# Configure strongSwan using some of the options above:
55 40 Tobias Brunner
<pre>
56 1 Martin Willi
 ./configure --prefix=/usr --sysconfdir=/etc --<your-options>
57 40 Tobias Brunner
</pre>
58 40 Tobias Brunner
# Build the sources and install the binaries as root:
59 40 Tobias Brunner
<pre>
60 1 Martin Willi
 make
61 1 Martin Willi
 sudo make install
62 1 Martin Willi
</pre>
63 52 Tobias Brunner
64 52 Tobias Brunner
h3. Building strongSwan from the Git repository
65 52 Tobias Brunner
66 52 Tobias Brunner
To build strongSwan from the Git repository additional tools and steps are required, check source:HACKING for details.
67 30 Andreas Steffen
68 33 Tobias Brunner
h3. Building strongSwan on other platforms
69 30 Andreas Steffen
70 51 Tobias Brunner
* [[FreeBSD|strongSwan on FreeBSD]]
71 51 Tobias Brunner
* [[MacOSX|strongSwan on Mac OS X]]
72 51 Tobias Brunner
* [[Android|strongSwan on Android]]
73 54 Christopher Nielsen
74 58 Tobias Brunner
h3. Monolithic Builds
75 58 Tobias Brunner
76 58 Tobias Brunner
[[PluginList|Plugins]] can be included in their associated library in a so called monolithic build (@--enable-monolithic@). That way it's not necessary to
77 58 Tobias Brunner
distribute separate shared object files for each plugin but only the major libraries and executables. The plugins that are loaded at runtime
78 58 Tobias Brunner
may still be controlled with the options described [[PluginLoad|here]].
79 58 Tobias Brunner
80 58 Tobias Brunner
h4. Static Builds
81 58 Tobias Brunner
82 58 Tobias Brunner
Since version:5.5.3, a static build that only relies on third-party libraries, i.e. in which our own libraries and plugins are all statically linked into the
83 58 Tobias Brunner
executables, can be achieved by configuring with @--disable-shared --enable-static --enable-monolithic@.
84 58 Tobias Brunner
85 58 Tobias Brunner
Including third-party static libraries requires manual modification of the Makefiles due to limitation of our build system (see  the Makefile
86 58 Tobias Brunner
for the fuzzzing targets for an example, source:fuzz/Makefile.am). 
87 58 Tobias Brunner
88 54 Christopher Nielsen
h2. Configuration Management for strongSwan
89 54 Christopher Nielsen
90 54 Christopher Nielsen
If you use CM to manage software, there are some options available to help configure strongSwan.
91 54 Christopher Nielsen
92 54 Christopher Nielsen
h3. Chef
93 54 Christopher Nielsen
94 54 Christopher Nielsen
Useful cookbooks include:
95 54 Christopher Nielsen
96 55 Christopher Nielsen
* "strongswanaws":https://supermarket.chef.io/cookbooks/strongswanaws
97 55 Christopher Nielsen
* "strongswan-base":https://supermarket.chef.io/cookbooks/strongswan-base
98 54 Christopher Nielsen
99 54 Christopher Nielsen
h3. Puppet
100 54 Christopher Nielsen
101 54 Christopher Nielsen
Useful modules include:
102 54 Christopher Nielsen
103 55 Christopher Nielsen
* "Nextdoor/strongswan":https://forge.puppetlabs.com/Nextdoor/strongswan
104 55 Christopher Nielsen
* "jpds/strongswan":https://forge.puppetlabs.com/jpds/strongswan