nv_logo

Return To Help Topics List


Installation on Other Linux-like

nandView requires a web service (Apache), database service (MySQL) and PHP to operate. Fortunately, these free and open source products are available for most distributions of Linux, Unix or BSD.

We cannot go over the Apache/MySQL/PHP install process for every distribution. In some cases, these suites may be installed by default, and just need to be started up. These instructions are for distributions of Linux-like and Unix-like operating systems not listed in this installation guide. It assumes that you already have a working copy of Apache, MySQL and PHP.

Installing nandView
Untar the suite and place it into /usr/local/nandview.

If it is compressed (ends in .tgz or .gz), use the following
tar -xvzf nandview.tar.gz -C /usr/local/

If it is not compressed (ends in .tar), use the following
tar -xvf nandview.tar -C /usr/local/

You should notice the following files and directories:
/usr/local/nandview/bin/ <- Contains the poller and emailer
/usr/local/nandview/html/ <- Contains the web user interface
/usr/local/nandview/include/ <- Contains the php support files
/usr/local/nandview/LICENSE.TXT <- Contains the license agreement
/usr/local/nandview/nv_db.sql <- Used to create the nandview database

Configuring PHP
You will need to edit the php.ini files. Some setups will have two configs - one for Apache, the other for command line PHP. In this case, you will need to make the following changes in both files. The php.ini files are usually stored somewhere in /etc. An easy way to search is to execute the following command:
find /etc -name php.ini -print

Edit the php.ini file and search for "include_path". You'll see an entry as follows:
; UNIX: "/path1;/path2"
;include_path = ".:/usr/share/php"


Modify this section by adding the following line below it:
include_path = ".:/usr/local/nandview/include"

Note: If an include_path was already defined, just add the nandview path to the end.

Make this change in both php.ini files. You'll need to restart Apache for these changes to take effect, however there are some other Apache configurations that need to be made first.

Configuring Apache
Edit the Apache configuration file. This file is usually stored somewhere in /etc, and typically named httpd.conf, apache.conf or apache2.conf. It will be a rather large text file. An easy way to search is to execute the following command:
find /etc -name httpd.conf -print
find /etc -name apache.conf -print
find /etc -name apache2.conf -print


Go to the bottom of the file, add the following and restart Apache:
Alias /nandview "/usr/local/nandview/html"
<Directory /usr/local/nandview/html>
Allow from all
</Directory>


For advanced users and administrators: You can lock this service down by specifying specific IP addresses. Another option is to configure SSL support, although that goes beyond the scope of this guide. You can also configure a virtual host instead. Use the below configuration as an example.
<VirtualHost nandview.yourdomain.com:80>
   DocumentRoot /usr/local/nandview/html
   ErrorLog /usr/local/nandview/nandview-error
   TransferLog /usr/local/nandview/nandview-access

   ServerName nandview.yourdomain.com
   UserDir disabled
</VirtualHost>


Configuring MySQL
You will now import the nandview database schema. Execute the following command on the prompt:
mysql -u root < /usr/local/nandview/nv_db.sql

The database should now be imported. If you set a password for the MySQL root user, use 'mysql -u root -p' instead. Now log in as the nand user:
mysql -u nanduser -p nandview

When prompted for a password, enter "n@ndUs3r" (without the quotes). You should now be connected to the nandview database. Issue the 'show tables' command. You should see 7 tables.

Verification
Check that the poller and emailer scripts work. Run the following commands:
/usr/local/nandview/bin/nv_poller.php
/usr/local/nandview/bin/nv_emailer.php


If you get a message 'permission denied', change the permissions:
chmod +x /usr/local/nandview/bin/nv_poller.php
chmod +x /usr/local/nandview/bin/nv_emailer.php


If you get a message 'bad interpreter' or 'command not found', run the commands again with php.
php /usr/local/nandview/bin/nv_poller.php
php /usr/local/nandview/bin/nv_emailer.php


These should run without any output or error messages. You can now log into the nandView web interface. Open a web browser and check
http://127.0.0.1/nandview/login.html
You should see the login screeen. Enter the default credentials.
Username: admin
Password: n@ndView

You should be able to see the dashboard. The last poll should show the current time, as opposed to 0000-00-00 00:00:00

Scheduling
You can now schedule the poller and emailer to run every 10 minutes. This will go into a cron entry. You do not have to run the poller or emailer as root; any user account that can read and execute the scripts will be fine.

Open the crontab by typing:
crontab -e

If you want to run the commands under a different username:
crontab -e {user}

Go to the end and type in the following two commands:
0,10,20,30,40,50 * * * * /usr/local/nandview/bin/nv_poller.php > /dev/null 2>&1

5,15,25,35,45,55 * * * * /usr/local/nandview/bin/nv_emailer.php > /dev/null 2>&1


Enter the poller entry on a single line, and the emailer on another single line. Do not put a return in the middle of the command. If you got the 'bad interpreter' error message during the verification section above, be sure to use the same 'php /usr...' as prior.

For advanced users and administrators: If you are going to use multiple run groups, you can add it after the script's path. You will need to do this for every run group you wish to use.
Example: 0,10 ... nv_poller.php 2 > /dev/null 2>&1

At this point, you should have nandView successfully installed. You will now be able to configure users, email lists and tests.

Please see topic Getting Started with nandView.


Return To Help Topics List