
Since there is no installer available yet, it's not very easy to install the web frontend for the first time.
Here is an example config. If you don't want to use the provided values (directories, database, etc.) you have to modify the code a little bit. Let's go:
Move git clone to /var/www/icinga-web (in this example). Please note that the path to the web directory depends on the distribution you use:
# mv icinga-web /var/www
Check out the Icinga API and move it to /var/www/lib/icinga-api:
# git clone git://git.icinga.org/icinga-api.git/ # mv icinga-api /var/www/icinga-web/lib/
Change owner of web directory to http user:
Fedora / RedHat / CentOS
# chown -R apache:apache /var/www/icinga-web
Ubuntu / Debian / openSuSE
# chown -R www-data:www-data /var/www/icinga-web
Create database and set grants:
# mysql -u root -p mysql> CREATE DATABASE icinga_web; mysql> GRANT ALL ON 'icinga_web.*' TO 'icinga_web'@'localhost' IDENTIFIED BY 'icinga_web'; mysql> FLUSH PRIVILEGES; quit
Import database from the following files:
# mysql -u root -p icinga_web < /var/www/icinga-web/etc/database/rescue_schema.sql # mysql -u root -p icinga_web < /var/www/icinga-web/etc/database/rescue_data.sql
Edit /var/www/icinga-web/app/config/databases.xml and set database credentials (block should begin at line 7):
<database name="appkit_default" class="AgaviDoctrineDatabase">
<ae:parameter name="dsn">mysql://icinga_web:icinga_web@127.0.0.1:3306/icinga_web</ae:parameter>
<ae:parameter name="username">icinga_web</ae:parameter>
<ae:parameter name="password">icinga_web</ae:parameter>
<ae:parameter name="charset">utf8</ae:parameter>
<ae:parameter name="manager_attributes">
<ae:parameter name="MODEL_LOADING">CONSERVATIVE</ae:parameter>
</ae:parameter>
<ae:parameter name="load_models">%de.icinga.appkit.doctrine_model_path%</ae:parameter>
</database>
Edit /var/www/icinga-web/app/config/icinga.xml and set database credentials to give access to ido-db (block should begin at line 163):
<parameter name="IcingaData">
<parameter name="class">IcingaData</parameter>
<parameter name="api_file">%core.root_dir%/lib/icinga-api/IcingaApi.php</parameter>
<parameter name="api_type">IcingaApi::CONNECTION_IDO</parameter>
<parameter name="config_type">mysql</parameter>
<parameter name="config_host">127.0.0.1</parameter>
<parameter name="config_port">3306</parameter>
<parameter name="config_database">icinga</parameter>
<parameter name="config_user">icinga</parameter>
<parameter name="config_password">icinga</parameter>
<parameter name="config_table_prefix">icinga_</parameter>
</parameter>
![]() |
Note |
|---|---|
| Please keep in mind that you have to install IDOUtils before (according to the “Icinga with IDOUtils Quickstart” ) |
Set up a virtual host:
<VirtualHost *:80>
ServerName icinga-web
DocumentRoot /var/www/icinga-web/pub/
DirectoryIndex index.php
<Directory /var/www/icinga-web/pub/>
Options -MultiViews -Indexes +FollowSymLinks
AllowOverride none
Order allow,deny
Allow from all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# If the requested URL does not exist (it's likely an agavi route),
# pass it as path info to index.php, the Agavi dispatch script.
RewriteRule ^$ index.php?/ [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php?/$1 [QSA,L]
</IfModule>
</Directory>
# deny something!
<Location />
Options -MultiViews -Indexes +FollowSymLinks
Order allow,deny
Allow from all
</Location>
# JS frameworks
Alias /js/yui /var/www/icinga-web/lib/yui
Alias /js/swfobject /var/www/icinga-web/lib/swfobject
Alias /js/mootools /var/www/icinga-web/lib/mootools
Alias /js/jquery /var/www/icinga-web/lib/jquery
Alias /js/appkit /var/www/icinga-web/lib/appkit/js
Alias /js/gc-prettify /var/www/icinga-web/lib/gc-prettify
Alias /js/firebug /var/www/icinga-web/lib/firebug
Alias /js/ext3 /var/www/icinga-web/lib/ext3
# Flash frameworks
Alias /flash/flexchart /var/www/icinga-web/lib/flexchart
<IfDefine APACHE2>
AcceptPathInfo On
</IfDefine>
</VirtualHost>
Clear cache
# rm /var/www/icinga-web/app/cache/config/*.php
Reload your web server config
Fedora/RedHat/CentOS
# service httpd reload
Ubuntu / openSuSE
# /etc/init.d/apache2 reload
That's it.
© 2009 Icinga Development Team, http://www.icinga.org