Wednesday, June 13, 2007

Installing the original prototype

Installing and running the previous prototype for gPasma

First things first, so the first step was to import the project into CVS.

I decided to import it under the folder 'PasmaTaskLibraryProject\5_implementation\original_prototype' of the repository: '/home/gpasma-1/gpasma-1_valju_pasmaweb/repository'

Next step was to get rid of some word documents that were hanging around with the source files (they were already inside the 'doc' folder) and deleting all the .class files.

Finally to the fun part. After a quick look into the sources I concluded the previous project was using a database schema called 'prosessimalli' and logging in as root to the MySQL server.

Since I don't want to have my MySQL root account open like that I decided to create an unprivileged user called 'proto'.

For this I started my MySQL command line client, log in as root (locally) and issued the commands:


cd C:\Program Files\MySQL\MySQL Server 5.0\bin
mysql -u root -p
  • Starts the mysql command line client
create database prosessimalli;
  • Creates a new database
grant all privileges on prosessimalli.* to proto identified by 'myPass';
  • This gives all privileges on the db 'prosessimalli' to my new user 'proto'
next step is create the tables and populate them. This was done using the existing sql scripts for creating and populating the DB, with the commands:

mysql -u proto -p prosessimalli < sql_lauseet.sql
mysql -u proto -p prosessimalli < insert_tehtava.sql
mysql -u proto -p prosessimalli < insert_tehtavatulos_1.sql

the names after the '<' simbol are the sql scritpts. The password for the user you just created will be asked before the script is run.

In case you are wondering why I used the command line, it is just because I don't have PHPMyAdmin, don't know how to use it and can't be bothered to learn...

Next step is to run the application. Since I had tomcat integrated to Eclipse via TomcatPlug-in (see tools of the trade post) I decide to use it. Here are the steps:

  1. Created a new Tomcat project called 'proto'
  2. Copied the .htm files to the project root
  3. Copied the business, tietokanta and WebGui folders to /web-inf/src
  4. Copied the jsp and lib folders and the web.xml file to /web-inf
  5. restarted Tomcat and accessed the URI: http://localhost:8080/proto/
Default user names and passwords for the application:

Regular user: kirkas
pass: aurinko

Admin user: sininen
pass: meri

No comments: