mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
Update INSTALL.md a bit and kick RHEL 5 away
This commit is contained in:
parent
81faf9b7c3
commit
857c812227
48
INSTALL.md
48
INSTALL.md
@ -1,7 +1,7 @@
|
|||||||
# Installing Icinga 2
|
# Installing Icinga 2
|
||||||
|
|
||||||
The recommended way of installing Icinga 2 is to use packages. The Icinga
|
The recommended way of installing Icinga 2 is to use [packages](https://packages.icinga.com).
|
||||||
project provides both release and development packages for a number
|
The Icinga project provides both release and development packages for a number
|
||||||
of operating systems.
|
of operating systems.
|
||||||
|
|
||||||
Please check the documentation in the [doc/](doc/) directory for a current list
|
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
|
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
|
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
|
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**
|
> **Disclaimer**
|
||||||
|
>
|
||||||
This information is intended for developers and packagers. It might be incomplete or unclear
|
> 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)!
|
> in some cases. Ensure to check our [packaging scripts on GitHub](https://github.com/Icinga/icinga-packaging) too!
|
||||||
|
|
||||||
# Build Requirements
|
# 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)
|
**FreeBSD**: libexecinfo (automatically used when Icinga 2 is installed via port or package)
|
||||||
|
|
||||||
**RHEL5** ships an ancient flex version. Updated packages are available for
|
**RHEL6**: Requires a newer boost version which is available on packages.icinga.com
|
||||||
example from the repoforge buildtools repository.
|
with a version suffixed name.
|
||||||
|
|
||||||
* 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/
|
|
||||||
|
|
||||||
## Runtime user environment
|
## 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
|
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.
|
using the `ICINGA2_USER`, `ICINGA2_GROUP` and `ICINGA2_COMMAND_GROUP` variables.
|
||||||
|
|
||||||
```
|
```
|
||||||
# groupadd icinga
|
# groupadd icinga
|
||||||
# groupadd icingacmd
|
# 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:
|
On Alpine (which uses ash busybox) you can run:
|
||||||
|
|
||||||
```
|
```
|
||||||
# addgroup -S icinga
|
# addgroup -S icinga
|
||||||
# addgroup -S icingacmd
|
# addgroup -S icingacmd
|
||||||
@ -114,14 +114,17 @@ is running as.
|
|||||||
|
|
||||||
Once you have installed all the necessary build requirements you can build
|
Once you have installed all the necessary build requirements you can build
|
||||||
Icinga 2 using the following commands:
|
Icinga 2 using the following commands:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ mkdir build && cd build
|
$ mkdir release && cd release
|
||||||
$ cmake ..
|
$ cmake ..
|
||||||
$ make
|
$ cd ..
|
||||||
$ make install
|
$ make -C release
|
||||||
|
$ make install -C release
|
||||||
```
|
```
|
||||||
|
|
||||||
You can specify an alternative installation prefix using `-DCMAKE_INSTALL_PREFIX`:
|
You can specify an alternative installation prefix using `-DCMAKE_INSTALL_PREFIX`:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cmake .. -DCMAKE_INSTALL_PREFIX=/tmp/icinga2
|
$ 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`
|
- `ICINGA2_PLUGINDIR`: The path for the Monitoring Plugins project binaries; defaults to `/usr/lib/nagios/plugins`
|
||||||
|
|
||||||
**Build Optimization**
|
**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`
|
- `ICINGA2_LTO_BUILD`: Whether to use link time optimization (LTO); defaults to `OFF`
|
||||||
|
|
||||||
**Init System**
|
**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
|
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
|
Copy the tarball to `rpmbuild/SOURCES` e.g. by using the `spectool` binary
|
||||||
provided with `rpmdevtools`:
|
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 (selinux-policy on CentOS 6, selinux-policy-devel on CentOS 7)
|
||||||
* selinux-policy-doc
|
* selinux-policy-doc
|
||||||
|
|
||||||
#### RHEL/CentOS 5 and 6
|
#### RHEL/CentOS 6
|
||||||
|
|
||||||
The RedHat Developer Toolset is required for building Icinga 2 beforehand.
|
The RedHat Developer Toolset is required for building Icinga 2 beforehand.
|
||||||
This contains a modern version of flex and a C++ compiler which supports
|
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!
|
> **WARNING:** This information is outdated!
|
||||||
|
|
||||||
Setup your build environment on Debian/Ubuntu, copy the 'debian' directory from
|
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:
|
into your source tree and run the following command:
|
||||||
```
|
```
|
||||||
$ dpkg-buildpackage -uc -us
|
$ dpkg-buildpackage -uc -us
|
||||||
|
Loading…
x
Reference in New Issue
Block a user