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 the 'inst' directory of the distribution .

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

$ /path/to/psql template1 < /home/foo/NorthStar-x.x/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 the 'inst' directory of the distribution. If the file ends in a .sql extension apply the update by running these commands:

$ /path/to/psql northstar < /path/to/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 /path/to/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 the 'inst' directory of the distribution.

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> \. /path/to/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 the 'inst' directory of your distribution.. If the file ends in a .sql extension apply the update by running these commands:

$ /path/to/mysql -p --user=northstar northstar
mysql> \. /path/to/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 /path/to/update_x.x.pl
					

2.5.2. 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/cgi-bin/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.3. 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.