Powered by Typecho)))
Optimized by EAimTY
====== Quick start guide for Ninja on Debian 5.0 ======
This describes the process of setting up Ninja on Debian 5.0.
===== Requirements =====
* Debian 5.0
* A working Nagios installation
* Merlin (see [[merlin:docs:quickstart-debian5|Quick start guide for Merlin on Debian 5.0]] for installation instructions)
===== Install dependencies =====
apt-get install gawk
===== Download and extract the code =====
Get the latest version of Ninja (ninja-0.3.2.tar.gz in my case) from the [[http://www.op5.org/community/projects/ninja|project page]].
Extract the tar file and move Ninja to a folder of choice:
tar -zxvf ninja-0.3.2.tar.gz
cp -a ninja-0.3.2 /usr/local/nagios/addons/ninja
cd /usr/local/nagios/addons/ninja
===== Configure Apache =====
Copy the example config file to your Apache configuration:
cp op5build/ninja.httpd-conf /etc/apache2/conf.d/ninja.conf
And edit /etc/apache2/conf.d/ninja.conf to have the correct path for Ninja:
<IfModule !mod_alias.c>
LoadModule alias_module modules/mod_alias.so
</IfModule>
Alias /ninja /usr/local/nagios/addons/ninja
<Directory "/usr/local/nagios/addons/ninja">
Order allow,deny
Allow from all
DirectoryIndex index.php
</Directory>
Restart Apache:
/etc/init.d/apache2 restart
===== Configure Ninja =====
Copy op5build/index.php to the base directory of your Ninja installation and modify it to have the correct path:
...
$ninja_base = '/usr/local/nagios/addons/ninja';
...
===== Modify and run the install scripts =====
Edit install_scripts/auth_import_mysql.php to have the correct paths for Merlin and Nagios configuration files:
...
private $merlin_path = '/usr/local/nagios/addons/merlin'; # where to find merlin files
private $nagios_cfg_path = '/usr/local/nagios/etc'; # path to nagios cfg files
...
You will also need to modify install_scripts/auth_import_mysql.php to use gawk instead of awk using this line:
sed -i 's/\/bin\/awk/\/usr\/bin\/gawk/g' install_scripts/auth_import_mysql.php
Run the installation script:
install_scripts/ninja_db_init.sh /usr/local/nagios/addons/ninja
===== Set nagios_base_path =====
Finally we need to set the nagios_base_path variable in
/application/config/config.php
$config['nagios_base_path']='/usr/local/nagios';
===== Log in =====
Point your web browser to [[http://