2.5. Post-Installation Setup

2.5.1. Database Setup

This section includes instructions to setup your NorthStar database. The instructions are provided for PostgreSQL and MySQL. If you are trying to install under a different database system and are having trouble please email the general support list.

2.5.1.1. PostgreSQL Database Setup

2.5.1.1.1. New Installation

We will now configure your PostgreSQL Database server with the database structure needed to run NorthStar. This section assumes you have PostgreSQL installed and running, have a working knowledge of the PostgreSQL database system, and also have permission to create a new user and database.

Provided that you meet all the above conditions you can create the initial database structure by using the SQL command file named NorthStar.postgres.sql. This file is located in /usr/NorthStar.

To create the database users and structure execute the following command:

$ /path/to/psql template1 < /usr/NorthStar/NorthStar.sql
					

Additionally you probably want to create entries in pg_hba.conf to reference your host and assign a password for database access. If a password is assigned be sure to put the password in the NorthStar.conf file.

2.5.1.1.2. Upgrading From a Previous Version

If you are upgrading from a previous version of NorthStar then you may need to update the database schema in your existing database to run the new version. Before updating your existing database you should backup the information in it just in case something goes wrong. To do this run the command /path/to/pg_dump northstar > northstar.backup. If you need to update your database schema a file named update_x.x.postgres.sql or update_x.x.pl (where x.x will be the version number of NorthStar that you are trying to install) will be in your /usr/NorthStar directory. If the file ends in a .sql extension apply the update by running these commands:

$ /path/to/psql northstar < /usr/NorthStar/update_x.x.sql
					
If the file ends with a .pl extension then you run the file as a Perl script. To do this execute these commands:
$ perl /usr/NorthStar/update_x.x.pl
					

2.5.1.2. MySQL Database Setup

2.5.1.2.1. New Installation

We will now configure your MySQL Database server with the database structure needed to run NorthStar. This section assumes you have MySQL installed and running, have a working knowledge of the MySQL database system, and also have permission to create a new user and database.

Provided that you meet all the above conditions you can create the initial database structure by using the SQL command file named NorthStar.postgres.sql. This file is located in /usr/NorthStar.

To create the database, database users and structure execute the following command:

$ /path/to/mysqladmin -p create northstar

$ /path/to/mysql -p --user=root mysql
mysql> GRANT ALL PRIVILEGES ON northstar.* TO northstar@localhost IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON northstar.* TO northstar@"your webserver ip here" IDENTIFIED BY 'password';
mysql> \q

$ /path/to/mysql -p --user=northstar northstar
mysql> \. /usr/NorthStar/NorthStar.mysql.sql
mysql> \q
					

Your database is now setup and ready to use with NorthStar.

2.5.1.2.2. Upgrading From a Previous Version

If you are upgrading from a previous version of NorthStar then you may need to update the database schema in your existing database to run the new version. Before updating your existing database you should backup the information in it just in case something goes wrong. To do this run the command /path/to/mysqldump -p --user=northstar northstar > northstar.backup. If you need to update your database schema a file named update_x.x.mysql.sql or update_x.x.pl (where x.x will be the version number of NorthStar that you are trying to install) will be in your /usr/NorthStar directory. If the file ends in a .sql extension apply the update by running these commands:

$ /path/to/mysql -p --user=northstar northstar
mysql> \. /usr/NorthStar/update_x.x.sql
					
If the file ends with a .pl extension then you run the file as a Perl script. To do this execute these commands:
$ perl /usr/NorthStar/update_x.x.pl
					

2.5.2. Setting up your Webserver

NorthStar currently needs a web server that can execute CGI programs and also supports following symlinks in a configured directory. This section is specific to the Apache web server, however, configuring for another web server should not be very hard.

2.5.2.1. Installing with Symbolic Links

First, we need create a directory under your web root to hold the links to the NorthStar scripts and the html templates. In this example /var/www/htdocs/ is used as our webroot. You should change this in the following commands to your local webroot. To create the directory and symlinks execute the following commands:

$ mkdir /var/www/htdocs/NorthStar
$ ln -s /usr/NorthStar/NorthStar.cgi 	/var/www/htdocs/NorthStar/NorthStar.cgi
$ ln -s /usr/NorthStar/html /var/www/htdocs/NorthStar/html
				
Now that the needed links have been created we need to configure Apache to execute CGI programs and follow symbolic links in the NorthStar directory under your web root. To do this add a section to your httpd.conf file that looks like this:
										
<Directory /var/www/htdocs/NorthStar>
	Options ExecCGI FollowSymLinks
</Directory>
					
					
				

Your webserver should now be configured to run NorthStar. To complete the process restart the server by entering the command /path/to/apachectl restart

2.5.2.2. Installing without Symbolic Links

Installing without symlinks is fairly easy. We need to create a directory under your webroot called NorthStar to hold the main program files and HTML templates. In this example /var/www/htdocs/ is our web root.

To create the NorthStar directory and copy the needed files execute the following commands:

$ mkdir /var/www/htdocs/NorthStar
$ cp -R /usr/NorthStar/NorthStar.cgi /var/www/htdocs/NorthStar
$ cp -R /usr/NorthStar/html /var/www/htdocs/NorthStar

				

Be sure to set the 'HTMLDir' option in the NorthStar.conf file to the directory that the HTML files are in. In this example you would set HTMLDir to '/var/www/htdocs/NorthStar/html'.

Now that the needed files have been copied we need to configure Apache to execute CGI programs in the NorthStar directory under your web root. To do this add a section to your httpd.conf file that looks like this:

										
<Directory /var/www/htdocs/NorthStar>
	Options ExecCGI
</Directory>
					
					
				

Your webserver should now be configured to run NorthStar. To complete the process restart the server by entering the command /path/to/apachectl restart

2.5.3. See if it Runs

Now that you have completed the install steps you should open up your favorite web browser and enter the URL to the NorthStar script. Most likely this will look something like http://www.yourserver.com/NorthStar/NorthStar.cgi

You should be presented with a login page. If this is a new installation of NorthStar then you should login with the username admin and password admin. If you have any problems please check your error logs for more information and if need see the 'Support' section to find out how to get help.

2.5.4. Change the Default Admin Password

The last thing to do is to change the admin password to something a little more secure then the default of admin. To do this login to NorthStar as the admin user (you should have already done this) and click the "Change Password" link in the leftmost frame. You should be presented with a page asking you to enter the new password and verify it. After entering the new password click the "Change Password" button to change the password. You should now click the "Logout" link the in the leftmost menu and login with your new password to make sure everything worked ok.