nv_logo

Return To Help Topics List


Installation on Windows 2003 Server with IIS 6.0

nandView requires a web service, database service and PHP to operate. Windows 2003 Server comes bundled with IIS 6.0. Assuming you wish to use IIS, you will still need to install MySQL and PHP. If you do not want to use IIS, follow the Windows XP install instructions. Please note that using nandView with IIS is a bit more complex than using Apache, especially if you have previously configured IIS. We recommend reading and searching for more information at http://learn.iis.net before making these changes on a production web server.

Installing nandView
If the suite is still compressed, unzip the archive. Copy the nandview directory into "C:\Program Files\". You should notice the following files and directories:

C:\Program Files\nandview\bin\ <- Contains the poller and emailer
C:\Program Files\nandview\html\ <- Contains the web user interface
C:\Program Files\nandview\include\ <- Contains the php support files
C:\Program Files\nandview\LICENSE.TXT <- Contains the license agreement
C:\Program Files\nandview\nv_db.sql <- Used to create the nandview database

You are now ready to install and configure the supporting software.

Installing IIS
If you do not have IIS installed yet, follow these instructions. You will need your Windows 2003 Server Install CD. Select 'Add/Remove Programs' from the control panels. Now click on the 'Add/Remove Windows Components' icon. Double click on 'Application Server', and then select the 'Internet Information Service (IIS)' component. Click the 'ok' button, and then hit the 'next' button. You'll need to insert the Windows CD, and afterwards IIS will be installed. You will probably want to run Windows Update now, as several security patches become available when IIS is installed. Test the installation by opening a web browser and going to http://localhost

Installing PHP
You will need to download the PHP binary and install files. These can be found at http://windows.php.net/download/

There may be an option to choose the VC6 or VC9 build. You will need VC9 when using IIS. We're using 'PHP 5.3.0 VC9 x86 Non Thread Safe'. There will be a link for 'Zip' and another link for 'Installer' below it. Download both files and save to the desktop. On the left, you will see a link to the 'Microsoft 2008 C++ Runtime (x86)'. Click this link and download, saving to the desktop. Now download the FastCGI Extension from Microsoft. You can find this at http://www.iis.net/1521/ItemPermalink.ashx. You will have four files on the desktop: php-5.3.0-nts-Win32-VC9-x86.msi, php-5.3.0-nts-Win32-VC9-x86.zip, vcredist_x86.exe and fcgisetup32.msi.

Run vcredist_x86.exe first. It will go through a simple, standard install. Install fcgisetup32.msi, another straight forward install. You will now need to run the PHP msi file. It will default to installing the files in C:\Program Files\PHP\. When asked to set up a web server, choose 'IIS FastCGI'.

When the installer finishes, you have a basic PHP setup. Now right click the PHP zip file located on the desktop, and choose extract all. When asked for the destination, change it to C:\Program Files\PHP and overwrite the files.

Configuring PHP
Edit the php.ini file. It is located at:
C:\Program Files\PHP\php.ini

Search for "include_path". You'll see an entry as follows:
; Windows: "\path1;path2"
;include_path = ".;c:\php\includes"


Modify this section by adding the following line below it:
include_path = ".;c:\Program Files\nandview\include"

Search for "date.timezone". You'll see an entry as follows:
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone

Modify this section by adding the following line below it:
date.timezone = America/New_York

Note: If you need to change the mail server settings, you'll find it here. Look for the "SMTP =" and "smtp_port" and "sendmail_from" directives.

Configuring IIS
You will now need to configure IIS to recognize PHP.
Open a command shell, change to the inetsrv directory (cd "c:\WINDOWS\system32\inetsrv") and execute the following:
cscript fcgiconfig.js -add -section:"PHP" -extension:php -path:"C:\Program Files\PHP\php-cgi.exe"

Open the Internet Information Service Manager. This can be found in the Control Panels subgroup Administrative Tools. Expand the Web Site section, and select 'Default Web Site'. Right click, and choose Properties. You will be presented with the properties pane, and 8 tabs on the top. Select the 'Home Directory' tab. There will be a button labeled 'Configuration...'. Select it, then click 'Add...'. Set the executable to "C:\WINDOWS\system32\inetsrv\fcgiext.dll" and the extension to ".php" (without any quotes). Change the Verbs to 'Limit to' and fill in "GET,HEAD,POST". Finally, make sure the script engine and verify the file exists boxes are checked. Save the changes and close the properties pane.

You will now need to configure a virtual directory for nandview. Right click the Default Web Site and select New -> Virtual Directory. For the alias, enter "nandview". For the path, put in "C:\Program Files\nandview". For permissions, select Read, Run Scripts, Execute Scripts. After the directory is created, restart IIS or reboot.

Installing MySQL
You will need to download the free MySQL suite. Go to http://dev.mysql.com/downloads/mysql/5.1.html and choose to download the MySQL Community Server. You will want to select the "Windows MSI Installer" option. If it asks you to register a new account, this is unnecessary, as you should see a "No thanks, just take me to the downloads!" link below it.

Run the installer, and choose the Typical installation. At the end, you'll have two selection boxes, one for configuring the MySQL server now, the other for register the MySQL server. You can deselect the registration choice, and just configure the server.

In the configuration utility, choose a standard configuration, install as a service and include bin directory in Windows path. Next you will be able to specify a 'root password' for MySQL. This is preferred, so you should enter a password now.

Configuring MySQL
You will now import the nandview database schema. Open a command prompt and execute the following command:
mysql -u root -p < "C:\Program Files\nandview\nv_db.sql"

You will be prompted for the root password, as entered previously. If you choose not to have a root password, remove the '-p' option.

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.

Verification
Check that the poller and emailer scripts work. Run the following commands:
php "C:\Program Files\nandview\bin\nv_poller.exe"
php "C:\Program Files\nandview\bin\nv_emailer.exe"


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. Type in the following two commands on a prompt:
schtasks /create /st 00:00:00 /sc minute /mo 10 /tn "NV Poller" /ru "System" /tr "\"C:\Program Files\PHP\php.exe\" \"C:\Program Files\nandview\bin\nv_poller.php\""

schtasks /create /st 00:05:00 /sc minute /mo 10 /tn "NV Emailer" /ru "System" /tr "\"C:\Program Files\PHP\php.exe\" \"C:\Program Files\nandview\bin\nv_emailer.php\""


Note that the php.exe and nandview files are enclosed inside \"   \"

You can view or edit these in the Scheduled Tasks control panel. It will also show when they last ran, or if there was an error.

For advanced users and administrators: If you are going to use multiple run groups, you can add it after the second \". You will need to do this for every run group you wish to use.
Example: schtasks /create ........ \bin\nv_poller.php\" 2"

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