1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Installation Icinga web frontend</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<meta name="keywords" content="Supervision, Icinga, Nagios, Linux">
<link rel="home" href="index.html" title="Icinga Version 1.0 Documentation">
<link rel="up" href="ch10.html" title="Chapter 10. Development">
<link rel="prev" href="epnplugins.html" title="Developing Plugins For Use With Embedded Perl">
<link rel="next" href="ix01.html" title="Index">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<CENTER><IMG src="../images/logofullsize.png" border="0" alt="Icinga" title="Icinga"></CENTER>
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">Installation Icinga web frontend</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="epnplugins.html">Prev</a> </td>
<th width="60%" align="center">Chapter 10. Development</th>
<td width="20%" align="right"> <a accesskey="n" href="ix01.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="icinga-web"></a>Installation Icinga web frontend</h2></div></div></div>
<p>Since there is no installer available yet, it's not very easy to install the web frontend for the first time.</p>
<p>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:</p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<p>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:</p>
<pre class="programlisting"> # mv icinga-web /var/www</pre>
</li>
<li class="listitem">
<p>Check out the Icinga API and move it to /var/www/lib/icinga-api: </p>
<pre class="programlisting"> # git clone git://git.icinga.org/icinga-api.git/
# mv icinga-api /var/www/icinga-web/lib/</pre>
</li>
<li class="listitem">
<p>Change owner of web directory to http user:</p>
<p><span class="emphasis"><em>Fedora / RedHat / CentOS</em></span></p>
<pre class="programlisting"> # chown -R apache:apache /var/www/icinga-web</pre>
<p><span class="emphasis"><em>Ubuntu / Debian / openSuSE</em></span></p>
<pre class="programlisting"> # chown -R www-data:www-data /var/www/icinga-web</pre>
</li>
<li class="listitem">
<p>Create database and set grants: </p>
<pre class="programlisting"> # 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</pre>
</li>
<li class="listitem">
<p>Import database from the following files: </p>
<pre class="programlisting"> # 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</pre>
</li>
<li class="listitem">
<p>Edit /var/www/icinga-web/app/config/databases.xml and set database credentials (block should begin at line
7):</p>
<pre class="programlisting"> <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></pre>
</li>
<li class="listitem">
<p>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): </p>
<pre class="programlisting"> <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></pre>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
Please keep in mind that you have to install
IDOUtils
before (according to the
<a class="xref" href="quickstart-idoutils.html" title="Icinga with IDOUtils Quickstart">“Icinga with IDOUtils Quickstart”</a>
)
</td></tr>
</table></div>
</li>
<li class="listitem">
<p>Set up a virtual host: </p>
<pre class="programlisting"> <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></pre>
</li>
<li class="listitem">
<p>Clear cache </p>
<pre class="programlisting"> # rm /var/www/icinga-web/app/cache/config/*.php</pre>
</li>
<li class="listitem">
<p>Reload your web server config</p>
<p><span class="emphasis"><em>Fedora/RedHat/CentOS</em></span></p>
<pre class="programlisting"> # service httpd reload</pre>
<p><span class="emphasis"><em>Ubuntu / openSuSE</em></span></p>
<pre class="programlisting"> # /etc/init.d/apache2 reload</pre>
</li>
</ol></div>
<p>That's it.</p>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="epnplugins.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="ch10.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="ix01.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Developing Plugins For Use With Embedded Perl </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> Index</td>
</tr>
</table>
</div>
<P class="copyright">© 2009 Icinga Development Team, http://www.icinga.org</P>
</body>
</html>
|