diff --git a/doc/02-Installation.md b/doc/02-Installation.md index f2c2ab30c..34fcb79e9 100644 --- a/doc/02-Installation.md +++ b/doc/02-Installation.md @@ -1,5 +1,4 @@ - # Installing Icinga DB The recommended way to install Icinga DB is to use prebuilt packages for @@ -24,226 +23,13 @@ which ships an up-to-date Redis® open source server version and is pre-configur we recommend to install it where the corresponding Icinga 2 node and Redis® server is running to keep latency between the components low. - - -## Adding Icinga Package Repository - -The recommended way to install Icinga DB is to use prebuilt packages from our official release repository. - -!!! tip - - If you install Icinga DB on a node that has Icinga 2 or Icinga Web installed via packages, - proceed to [installing the Icinga DB package](#installing-icinga-db-package) as - the repository is already configured. - -Here's how to add the official release repository: - - - - -### Amazon Linux 2 Repository - - -!!! info - - A paid repository subscription is required for Amazon Linux 2 repositories. Get more information on - [icinga.com/subscription](https://icinga.com/subscription). - - Don't forget to fill in the username and password section with appropriate credentials in the local .repo file. - -```bash -rpm --import https://packages.icinga.com/icinga.key -wget https://packages.icinga.com/subscription/amazon/ICINGA-release.repo -O /etc/yum.repos.d/ICINGA-release.repo -``` - - - - - - -### CentOS Repository - - - -```bash -rpm --import https://packages.icinga.com/icinga.key -wget https://packages.icinga.com/centos/ICINGA-release.repo -O /etc/yum.repos.d/ICINGA-release.repo -``` - - - - - - -### Debian Repository - - - -```bash -apt update -apt -y install apt-transport-https wget - -wget -O icinga-archive-keyring.deb "https://packages.icinga.com/icinga-archive-keyring_latest+debian$( - . /etc/os-release; echo "$VERSION_ID" -).deb" - -apt install ./icinga-archive-keyring.deb - -DIST=$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release); \ - echo "deb [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/debian icinga-${DIST} main" > \ - /etc/apt/sources.list.d/${DIST}-icinga.list - echo "deb-src [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/debian icinga-${DIST} main" >> \ - /etc/apt/sources.list.d/${DIST}-icinga.list - -apt update -``` - - - - - - -### RHEL Repository - - -!!! info - - A paid repository subscription is required for RHEL repositories. Get more information on - [icinga.com/subscription](https://icinga.com/subscription). - - Don't forget to fill in the username and password section with appropriate credentials in the local .repo file. - -```bash -rpm --import https://packages.icinga.com/icinga.key -wget https://packages.icinga.com/subscription/rhel/ICINGA-release.repo -O /etc/yum.repos.d/ICINGA-release.repo -``` - - - - - - -### SLES Repository - - -!!! info - - A paid repository subscription is required for SLES repositories. Get more information on - [icinga.com/subscription](https://icinga.com/subscription). - - Don't forget to fill in the username and password section with appropriate credentials in the local .repo file. - -```bash -rpm --import https://packages.icinga.com/icinga.key - -zypper ar https://packages.icinga.com/subscription/sles/ICINGA-release.repo -zypper ref -``` - - - - - - -### Ubuntu Repository - - - -```bash -apt update -apt -y install apt-transport-https wget - -wget -O icinga-archive-keyring.deb "https://packages.icinga.com/icinga-archive-keyring_latest+ubuntu$( - . /etc/os-release; echo "$VERSION_ID" -).deb" - -apt install ./icinga-archive-keyring.deb - -. /etc/os-release; if [ ! -z ${UBUNTU_CODENAME+x} ]; then DIST="${UBUNTU_CODENAME}"; else DIST="$(lsb_release -c| awk '{print $2}')"; fi; \ - echo "deb [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" > \ - /etc/apt/sources.list.d/${DIST}-icinga.list - echo "deb-src [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" >> \ - /etc/apt/sources.list.d/${DIST}-icinga.list - -apt update -``` - - - -## Installing Icinga DB Package - -Use your distribution's package manager to install the `icingadb` package as follows: - - - - -#### Amazon Linux 2 - - - -```bash -yum install icingadb -``` - - - - - - -#### CentOS - - -!!! info - - Note that installing Icinga DB is only supported on CentOS 7 as CentOS 8 is EOL. - -```bash -yum install icingadb -``` - - - - - - -#### Debian / Ubuntu - - - -```bash -apt install icingadb -``` - - - - - -#### RHEL 8 or Later - -```bash -dnf install icingadb -``` - -#### RHEL 7 - -```bash -yum install icingadb -``` - - - - - - -#### SLES - - + +## Installing the Package -```bash -zypper install icingadb -``` - - +If the [repository](https://packages.icinga.com) is not configured yet, please add it first. +Then use your distribution's package manager to install the `icingadb` package +or install [from source](02-Installation.md.d/From-Source.md). + ## Setting up the Database @@ -315,20 +101,32 @@ psql -U icingadb icingadb < /usr/share/icingadb/schema/pgsql/schema.sql ## Configuring Icinga DB -Icinga DB installs its configuration file to `/etc/icingadb/config.yml`, -pre-populating most of the settings for a local setup. Before running Icinga DB, -adjust the Redis® and database credentials and, if necessary, the connection configuration. + +Create a local `config.yml` file using [the sample configuration](../config.example.yml). + +The Icinga DB package installs its configuration file to `/etc/icingadb/config.yml`. + +Most of the settings are pre-populated for a local setup. +Before running Icinga DB, adjust the Redis® and database credentials and, if necessary, the connection configuration. The configuration file explains general settings. All available settings can be found under [Configuration](03-Configuration.md). ## Running Icinga DB + +You can execute `icingadb` by running it with the locally accessible `config.yml` file: + +```bash +icingadb -config /path/to/config.yml +``` + The `icingadb` package automatically installs the necessary systemd unit files to run Icinga DB. Please run the following command to enable and start its service: ```bash systemctl enable --now icingadb ``` + ## Installing Icinga DB Web @@ -337,29 +135,37 @@ which connects to both Redis® and the database to display and work with the mon ![Icinga DB Web](images/icingadb-web.png) -The Icinga DB Web package is also included in the Icinga repository, and since it is already set up, -you have completed the instructions here and can proceed to +You have completed the instructions here and can proceed to -[installing Icinga DB Web on Amazon Linux](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/01-Amazon-Linux/#installing-icinga-db-web-package), - - -[installing Icinga DB Web on CentOS](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/02-CentOS/#installing-icinga-db-web-package), +[installing Icinga DB Web on Amazon Linux](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/Amazon-Linux/#installing-icinga-db-web-package), -[installing Icinga DB Web on Debian](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/03-Debian/#installing-icinga-db-web-package), +[installing Icinga DB Web on Debian](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/Debian/#installing-icinga-db-web-package), + + +[installing Icinga DB Web on Fedora](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/Fedora/#installing-icinga-db-web-package), -[installing Icinga DB Web on RHEL](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/04-RHEL/#installing-icinga-db-web-package), +[installing Icinga DB Web on RHEL](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/RHEL/#installing-icinga-db-web-package), + + +[installing Icinga DB Web on Raspberry Pi Os](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/Raspberry-Pi-OS/#installing-icinga-db-web-package), -[installing Icinga DB Web on SLES](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/05-SLES/#installing-icinga-db-web-package), +[installing Icinga DB Web on SLES](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/SLES/#installing-icinga-db-web-package), -[installing Icinga DB Web on Ubuntu](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/06-Ubuntu/#installing-icinga-db-web-package), +[installing Icinga DB Web on Ubuntu](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/Ubuntu/#installing-icinga-db-web-package), + + +[installing Icinga DB Web on openSUSE](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/openSUSE/#installing-icinga-db-web-package), + + +[installing Icinga DB Web From Source](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/From-Source), which will also guide you through the setup of the Icinga Web PHP framework, which is required to run the Icinga DB web module. Below is a preview of how the interface visualizes monitoring data and also supports dark and light mode: ![Icinga DB Web](images/icingadb-dashboard.png) - + diff --git a/doc/02-Installation.md.d/01-Amazon-Linux.md b/doc/02-Installation.md.d/01-Amazon-Linux.md deleted file mode 100644 index 45a3286f4..000000000 --- a/doc/02-Installation.md.d/01-Amazon-Linux.md +++ /dev/null @@ -1,4 +0,0 @@ -# Installing Icinga DB on Amazon Linux - - - diff --git a/doc/02-Installation.md.d/02-CentOS.md b/doc/02-Installation.md.d/02-CentOS.md deleted file mode 100644 index 42ff36685..000000000 --- a/doc/02-Installation.md.d/02-CentOS.md +++ /dev/null @@ -1,4 +0,0 @@ -# Installing Icinga DB on CentOS - - - diff --git a/doc/02-Installation.md.d/03-Debian.md b/doc/02-Installation.md.d/03-Debian.md deleted file mode 100644 index 3eb3ba015..000000000 --- a/doc/02-Installation.md.d/03-Debian.md +++ /dev/null @@ -1,4 +0,0 @@ -# Installing Icinga DB on Debian - - - diff --git a/doc/02-Installation.md.d/04-RHEL.md b/doc/02-Installation.md.d/04-RHEL.md deleted file mode 100644 index 39cabce44..000000000 --- a/doc/02-Installation.md.d/04-RHEL.md +++ /dev/null @@ -1,4 +0,0 @@ -# Installing Icinga DB on RHEL - - - diff --git a/doc/02-Installation.md.d/05-SLES.md b/doc/02-Installation.md.d/05-SLES.md deleted file mode 100644 index e1915e88d..000000000 --- a/doc/02-Installation.md.d/05-SLES.md +++ /dev/null @@ -1,4 +0,0 @@ -# Installing Icinga DB on SLES - - - diff --git a/doc/02-Installation.md.d/06-Ubuntu.md b/doc/02-Installation.md.d/06-Ubuntu.md deleted file mode 100644 index d1ef557a9..000000000 --- a/doc/02-Installation.md.d/06-Ubuntu.md +++ /dev/null @@ -1,4 +0,0 @@ -# Installing Icinga DB on Ubuntu - - - diff --git a/doc/02-Installation.md.d/From-Source.md b/doc/02-Installation.md.d/From-Source.md new file mode 100644 index 000000000..bd039354c --- /dev/null +++ b/doc/02-Installation.md.d/From-Source.md @@ -0,0 +1,23 @@ +# Installing Icinga DB from Source + +## Using `go install` + +You can build and install `icingadb` as follows: + +```bash +go install github.com/icinga/icingadb@latest +``` + +This should place the `icingadb` binary in your configured `$GOBIN` path which defaults to `$GOPATH/bin` or +`$HOME/go/bin` if the `GOPATH` environment variable is not set. + +## Build from Source + +Download or clone the source and run the following command from the source's root directory. + +```bash +go build -o icingadb cmd/icingadb/main.go +``` + + + diff --git a/doc/03-Configuration.md b/doc/03-Configuration.md index 472389483..093b9172b 100644 --- a/doc/03-Configuration.md +++ b/doc/03-Configuration.md @@ -1,6 +1,6 @@ # Configuration -The configuration is stored in `/etc/icingadb/config.yml`. +For package installations, the configuration is stored in `/etc/icingadb/config.yml`. See [config.example.yml](../config.example.yml) for an example configuration. ## Redis® Configuration