Return To Help Topics List

Installation on Ubuntu 9.04

nandView requires a web service (Apache), database service (MySQL) and PHP to operate. Fortunately, these free and open source products are available for Ubuntu 9.

We're going to use apt-get to install the support packages. If you normally install with aptitude, use that instead of apt-get.

Installing Apache, PHP, MySQL
Run the following commands as root. If you don't have a root account, you can either run every command with sudo (such as 'sudo apt-get...' or open a root shell by using 'sudo su'.

apt-get install apache2
apt-get install php5
apt-get install php5-cli
apt-get install libapache2-mod-php5
apt-get install mysql-server
apt-get install php5-mysql
apt-get install sendmail
/etc/init.d/apache2 restart

When prompted, you should specify a password for the MySQL root user. The sendmail package is only required if you wish to send email notifications.

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
There are two php.ini files. You will need to make changes to both. They can be found in:

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. It can be found in:

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

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

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

The database should now be imported. 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.

Check that the poller and emailer scripts work. Run the following commands:

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: No such file or directory', 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

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

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