Return To Help Topics List

Installation on OpenSUSE 11.1

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

If you are performing a fresh install, you can choose to install these packages. At the final step, choose to change 'System', and then select the "Web and LAMP" package.

Installing Apache, PHP, MySQL
Run the following commands as root:
yast2 --install apache2
yast2 --install php5 php5-mysql apache2-mod_php5
yast2 --install mysql mysql-tools

Start up the processes:
rcapache2 start
rcmysql start

Set the MySQL root user password:
mysqladmin -u root password "new password"

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/php5:/usr/share/php5/PEAR"

Modify this section by adding the following to the line (place this on one line - do not hit return between the equals and quote):
include_path = ".:/usr/share/php5:/usr/share/php5/PEAR:/usr/local/nandview/include"

Note: If include_path was defined differently, 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

OpenSUSE 11.1 includes a software firewall. If you are having trouble accessing the web interface, check the firewall rules.

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