From 05dd09355be135fc608a396a2c2bf60c55ca6d57 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 18 Nov 2014 16:56:39 +0100 Subject: [PATCH] doc: Remove configure/make from installation --- doc/installation.md | 135 +++++++++++++------------------------------- 1 file changed, 40 insertions(+), 95 deletions(-) diff --git a/doc/installation.md b/doc/installation.md index 60a5a3ce5..df92c596b 100644 --- a/doc/installation.md +++ b/doc/installation.md @@ -1,117 +1,62 @@ +# Installation -# Installation +The preferred way of installing Icinga Web 2 is to use the official package repositories depending on which operating +system and distribution you are running. But it is also possible to install Icinga Web 2 directly from source too. -## Requirements +## Installing Requirements -* Apache2 with PHP >= 5.3.0 enabled -* PHP Zend Framework -* PHP with MySQL or PostgreSQL libraries -* MySQL or PostgreSQL server and client software -* Icinga 1.x or Icinga 2 as backend providers +* A web server, e.g. Apache or nginx +* PHP >= 5.3.0 +* MySQL or PostgreSQL PHP libraries when using a database for authentication or storing user preferences into a database +* LDAP PHP library when using Active Directory or LDAP for authentication +* Icinga 1.x w/ Livestatus or IDO, Icinga 2 w/ Livestatus or IDO feature enabled -RHEL/CentOS requires the EPEL repository enabled (which provides the `php-ZendFramework` -package). OpenSUSE requires the [server monitoring](https://build.opensuse.org/project/show/server:monitoring) repository (which provides the `php5-ZendFramework` package) enabled. +## Installing Icinga Web 2 from Package -## configure && make +A guide on how to install Icinga Web 2 from package will follow shortly. -### Basic installation +## Installing Icinga Web 2 from Source -If you like to configurea and install icinga2-web from the command line or -if you want to create packages, configure and make is the best choice for installation. +**Step 1: Getting the Source** - ./configure && make install && make install-apache2-config +First of all, you need to download the sources. Icinga Web 2 is available through a Git repository. You can clone this +repository either via git or http protocol using the following URLs: -will install the application to the default target (/usr/local/icinga2-web). Also -an apache configuration entry is added to your apache server, so you should restart -your web server according to your systems configuration. + * git://git.icinga.org/icingaweb2.git + * http://git.icinga.org/icingaweb2.git -### Installation directory +There is also a browsable version available at +[gi.icinga.org](https://git.icinga.org/?p=icingaweb2.git;a=summary "Icinga Web 2 Git Repository"). +This version also offers snapshots for easy download which you can use if you do not have git present on your system. -If you want to install the application to a different directory, use the --prefix flag in your -configure call: +```` +git clone git://git.icinga.org/icingaweb2.git +```` - ./configure --prefix=/my/target/directory +**Step 2: Install the Source** +Choose a target directory and move Icinga Web 2 there. -### Authentication +```` +mv icingaweb2 /usr/share/icingaweb2 +```` -By default, icinga2-web will be installed to authenticate againts its internal database, -but you can configure it to use ldap-authentication by adding the `--with-ldap-authentication` -flag. You must provide the authentication details for your ldap server by using the --with-ldap-* flags. -To see a full list of the flags, call `./configure --help` +**Step 3: Configuring the Web Server** -### Icinga backend +Use `icingacli` to generate web server configuration for either Apache or nginx. -The default option for icinga2web is to configure all icinga backends with the default settings (for example -/usr/local/icinga/ as the icinga directory) but only enable statusdat. To use a different backend, -call `--with-icinga-backend=` and provide ido, livestatus or statusdat as an option. To further configure -your backend, take a look at the various options described in `./configure --help` +*Apache* -### Databases +```` +./bin/icingacli setup config webserver apache +```` -It is required to set up all used Databases correctly, which basically means to create all needed user accounts and to -create all database tables. You will find the installation guides for the different databases in the sections below: +*nginx* -*IMPORTANT*: Select a secure password instead of "icingaweb" and alter the config/authentication.ini accordingly. +```` +./bin/icingacli setup config webserver nginx +```` +**Step 4: Web Setup** -#### MySQL - -1. Create the user and the database - - - mysql -u root -p - mysql> CREATE USER `icingaweb`@`localhost` IDENTIFIED BY 'icingaweb'; - mysql> CREATE DATABASE `icingaweb`; - mysql> GRANT ALL PRIVILEGES ON `icingaweb`.* TO `icingaweb`@`localhost`; - mysql> FLUSH PRIVILEGES; - mysql> quit - - -2. Create all tables (You need to be in the icinga2-web folder) - -> **Note** -> -> RPM packages install the schema into /usr/share/doc/icingaweb-<version>/schema - - bash$ mysql -u root -p icingaweb < etc/schema/mysql.sql - - -#### PostgreSQL - -1. Create the user and the database - - - sudo su postgres - psql - postgres=# CREATE USER icingaweb WITH PASSWORD 'icingaweb'; - postgres=# CREATE DATABASE icingaweb; - postgres=# \q - - -2. Enable trust authentication on localhost - -Add the following lines to your pg_hba.conf (etc/postgresql/X.x/main/pg_hba.conf under debian, /var/lib/pgsql/data/pg_hba.conf for Redhat/Fedora) -to enable trust authentication for the icingaweb user when connecting from the localhost. - - local icingaweb icingaweb trust - host icingaweb icingaweb 127.0.0.1/32 trust - host icingaweb icingaweb ::1/128 trust - -And restart your database ('service postgresql restart' or '/etc/init.d/postgresql-X.x reload' while being root) - - -3. Create all tables (You need to be in the icinga2-web folder) - -> **Note** -> -> RPM packages install the schema into /usr/share/doc/icingaweb-<version>/schema - - bash$ psql -U icingaweb -a -f etc/schema/pgsql.sql - - - -Quick and Dirty ----------------- - -tdb. +Visit Icinga Web 2 in your browser and complete installation using the web setup.