2.4. Installation Procedure

2.4.1. Unpacking the NorthStar Source

We will assume that you have already downloaded the latest source package as described in the "Downloading the NorthStar Source" section above. After downloading the file execute the following commands to unpack the archive:

$ gzip -dc NorthStar-x-x.tar.gz | tar -xvf -
			
You should now have the NorthStar package untared and ready to install.

2.4.2. Configuring and Installing NorthStar

Now that we have unpacked the NorthStar system were ready to set the parameters that NorthStar will need to run. This configuration is handled by the file /etc/NorthStar.conf. Most of the configuration and installation process is automated. To run the installation script goto the directory that your unpacked NorthStar in (we'll use /home/foo/NorthStar-x.x for example) and run the following command:

$ sh nsinstall.sh
         
This script will walk you through configuring and installing the files neccessary to install NorthStar. A sample session is show below and most of the parameters should be fairly straightforward.
# sh nsinstall.sh

=========================================================
= Configuring the NorthStar Package                     =
=========================================================

Checking for DBI...ok
Checking for CGI...ok


Welcome to the NorthStar installation script.  This script
will help guide you through most of the steps required to
get NorthStar up and running.

Would you like to configure NorthStar now [Y/n]? y

The NorthStar administrator email address [user@email.com]? foo@bar.com
Please enter the path to your website document root [/usr/local/htdocs]? /usr/local/htdocs
  The directory to install the HTML files in [/usr/local/htdocs/NorthStar]? 
Please enter your cgi-bin directory path [/usr/local/httpd/cgi-bin]? /usr/local/httpd/cgi-bin
Please enter your webserver hostname [www.yourserver.com]? www.foo.com
  The URL to your cgi-bin directory [http://www.foo.com/cgi-bin]?
  The URL to your template directory [http://www.foo.com/NorthStar]?

Select your database type
  1) PostgreSQL
  2) MySQL
Enter your choice: 1
The hostname of your database server [db.yourserver.com]? db.foo.com
The port number to connect to [5432]?
The name of the database to use [northstar]?
The username to connect to the database with [northstar]?
The password to use when connecting []? password
Writing Makefile for NorthStar

=========================================================
= Configuring the NorthStar Perl Modules                =
=========================================================

cp lib/NorthStar/Location.pm blib/lib/NorthStar/Location.pm
cp lib/NorthStar/User.pm blib/lib/NorthStar/User.pm
cp lib/NorthStar/Device.pm blib/lib/NorthStar/Device.pm
cp lib/NorthStar/API.pm blib/lib/NorthStar/API.pm
cp lib/NorthStar/Session.pm blib/lib/NorthStar/Session.pm
cp lib/NorthStar/Template.pm blib/lib/NorthStar/Template.pm
cp lib/NorthStar/Owner.pm blib/lib/NorthStar/Owner.pm
cp lib/NorthStar/Search.pm blib/lib/NorthStar/Search.pm
cp lib/NorthStar.pm blib/lib/NorthStar.pm
cp lib/NorthStar/Network.pm blib/lib/NorthStar/Network.pm
cp lib/NorthStar/Regex.pm blib/lib/NorthStar/Regex.pm
cp lib/NorthStar/View.pm blib/lib/NorthStar/View.pm

=========================================================
= Installing the NorthStar Perl Modules                 =
=========================================================

Writing /usr/lib/perl5/site_perl/5.6.1/i686-linux/auto/NorthStar/.packlist
Appending installation info to /usr/lib/perl5/5.6.1/i686-linux/perllocal.pod

=========================================================
= Installing the NorthStar HTML Templates               =
=========================================================

Done

=========================================================
= Installing the NorthStar CGI Scripts                  =
=========================================================

Done
         
You should not have to edit any entries in the configuration file after doing this however, a reference to the config values is included below just in case.

Table 2-1. NorthStar Configuration Reference

SectionDirectiveDescription
GlobalAdminEmailThe email address of the local NorthStar administrator
GlobalScriptURLThe URL to be used to access the NorthStar program
GlobalTemplateURLThe relative URL used to access templates from a web browser
GlobalShowAllMaskLensThis option is a small aesthetic option to enable showing all CIDR mask lengths in dropdowns (normally the /31 length is not shown because it is totally unusable).
DatabaseDatabaseDriverThe DBI Database Driver. Change this to the DBI driver that you would like to use.
DatabaseDatabaseHostThe hostname of your database server
DatabaseDatabasePortThe port that is running your database software
DatabaseDatabaseNameThe name of the database used to store NorthStar data.
DatabaseDatabaseUserThe username used to access the database
DatabaseDatabasePassThe password used to access the database