From d36bab0acccda89712dbcaff946ee91fd812624c Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 2 Oct 2024 14:57:39 +0200 Subject: [PATCH] Add `From Source` section to installation docs --- doc/02-Installation.md | 26 ++++++++++++++++++++----- doc/02-Installation.md.d/From-Source.md | 23 ++++++++++++++++++++++ doc/03-Configuration.md | 2 +- 3 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 doc/02-Installation.md.d/From-Source.md diff --git a/doc/02-Installation.md b/doc/02-Installation.md index f2c2ab30..46b20c5e 100644 --- a/doc/02-Installation.md +++ b/doc/02-Installation.md @@ -25,6 +25,7 @@ which ships an up-to-date Redis® open source server version and is pre-configur keep latency between the components low. + ## Adding Icinga Package Repository @@ -243,6 +244,7 @@ yum install icingadb zypper install icingadb ``` + ## Setting up the Database @@ -315,20 +317,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,8 +351,7 @@ 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), @@ -357,6 +370,9 @@ you have completed the instructions here and can proceed to [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 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: 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 00000000..bd039354 --- /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 47238948..093b9172 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