Update INSTALL.md a bit and kick RHEL 5 away

This commit is contained in:
Michael Friedrich 2018-08-07 18:09:52 +02:00
parent 81faf9b7c3
commit 857c812227
1 changed files with 28 additions and 20 deletions

View File

@ -1,7 +1,7 @@
# Installing Icinga 2
The recommended way of installing Icinga 2 is to use packages. The Icinga
project provides both release and development packages for a number
The recommended way of installing Icinga 2 is to use [packages](https://packages.icinga.com).
The Icinga project provides both release and development packages for a number
of operating systems.
Please check the documentation in the [doc/](doc/) directory for a current list
@ -13,12 +13,13 @@ and will guide you step by step.
There are a number of known caveats when installing from source such as
incorrect directory and file permissions. So even if you're planning to
not use the official packages it is advisable to build your own Debian
or RPM packages.
or RPM packages. You can use the source packages from [packages.icinga.com](https://packages.icinga.com)
for this purpose.
**Disclaimer**
This information is intended for developers and packagers. It might be incomplete or unclear
in some cases. Make also sure to check our [packaging scripts on GitHub](https://github.com/Icinga/icinga-packaging)!
> **Disclaimer**
>
> This information is intended for developers and packagers. It might be incomplete or unclear
> in some cases. Ensure to check our [packaging scripts on GitHub](https://github.com/Icinga/icinga-packaging) too!
# Build Requirements
@ -75,18 +76,16 @@ application using a dist tarball (including notes for distributions):
**FreeBSD**: libexecinfo (automatically used when Icinga 2 is installed via port or package)
**RHEL5** ships an ancient flex version. Updated packages are available for
example from the repoforge buildtools repository.
* x86: https://mirror.hs-esslingen.de/repoforge/redhat/el5/en/i386/buildtools/
* x86\_64: https://mirror.hs-esslingen.de/repoforge/redhat/el5/en/x86\_64/buildtools/
**RHEL6**: Requires a newer boost version which is available on packages.icinga.com
with a version suffixed name.
## Runtime user environment
By default Icinga will run as user 'icinga' and group 'icinga'. Additionally the
By default Icinga will run as user `icinga` and group `icinga`. Additionally the
external command pipe and livestatus features require a dedicated command group
'icingacmd'. You can choose your own user/group names and pass them to CMake
`icingacmd`. You can choose your own user/group names and pass them to CMake
using the `ICINGA2_USER`, `ICINGA2_GROUP` and `ICINGA2_COMMAND_GROUP` variables.
```
# groupadd icinga
# groupadd icingacmd
@ -94,6 +93,7 @@ using the `ICINGA2_USER`, `ICINGA2_GROUP` and `ICINGA2_COMMAND_GROUP` variables.
```
On Alpine (which uses ash busybox) you can run:
```
# addgroup -S icinga
# addgroup -S icingacmd
@ -114,14 +114,17 @@ is running as.
Once you have installed all the necessary build requirements you can build
Icinga 2 using the following commands:
```
$ mkdir build && cd build
$ mkdir release && cd release
$ cmake ..
$ make
$ make install
$ cd ..
$ make -C release
$ make install -C release
```
You can specify an alternative installation prefix using `-DCMAKE_INSTALL_PREFIX`:
```
$ cmake .. -DCMAKE_INSTALL_PREFIX=/tmp/icinga2
```
@ -153,7 +156,7 @@ Also see `CMakeLists.txt` for details.
- `ICINGA2_PLUGINDIR`: The path for the Monitoring Plugins project binaries; defaults to `/usr/lib/nagios/plugins`
**Build Optimization**
- `ICINGA2_UNITY_BUILD`: Whether to perform a unity build; defaults to `ON`
- `ICINGA2_UNITY_BUILD`: Whether to perform a unity build; defaults to `ON`. Note: This requires additional memory and is not advised for building VMs, Docker for Mac and embedded hardware.
- `ICINGA2_LTO_BUILD`: Whether to use link time optimization (LTO); defaults to `OFF`
**Init System**
@ -245,6 +248,11 @@ Copy the icinga2.spec file to `rpmbuild/SPEC` or fetch the latest version:
curl https://raw.githubusercontent.com/Icinga/rpm-icinga2/master/icinga2.spec -o $HOME/rpmbuild/SPECS/icinga2.spec
```
> **Note**
>
> The above command builds snapshot packages. Change to the `release` branch
> for release package builds.
Copy the tarball to `rpmbuild/SOURCES` e.g. by using the `spectool` binary
provided with `rpmdevtools`:
```
@ -283,7 +291,7 @@ The following packages are required to build the SELinux policy module:
* selinux-policy (selinux-policy on CentOS 6, selinux-policy-devel on CentOS 7)
* selinux-policy-doc
#### RHEL/CentOS 5 and 6
#### RHEL/CentOS 6
The RedHat Developer Toolset is required for building Icinga 2 beforehand.
This contains a modern version of flex and a C++ compiler which supports
@ -323,7 +331,7 @@ added before building.
> **WARNING:** This information is outdated!
Setup your build environment on Debian/Ubuntu, copy the 'debian' directory from
the Debian packaging Git repository (https://github.com/Icinga/pkg-icinga2-debian)
the Debian packaging Git repository (https://github.com/Icinga/deb-icinga2)
into your source tree and run the following command:
```
$ dpkg-buildpackage -uc -us