Wednesday, February 6, 2008

ANN: Setup guide for botlist web application front-end

The botlist J2EE web frontend might be considered a medium sized web application. Make sure that you have a J2EE servlet container. Tomcat 5.5+ is recommended but not required. MySQL database server is required (expect a Postgres configuration in the future). The java build tool Ant is also required for building the project.

Test Environment and Recommended Configuration

* Mysql Ver 14.12 Distrib 5.0.51a, for Win32 (ia32) (db server)
* Ant 1.7.0 (java build tool)
* Tomcat 5.5.26 (application server)
* Java SDK java version "1.5.0_11" (java compiler), 1.6 recommended
* Operating systems: WinXP and Ubuntu Linux 7.10
* All other libraries are provided in the subversion source or download

Check out source from subversion

As of 2/2/2008

Checking out the botlist source is the recommended way to get build and run the application. In the future, regular releases and snapshots will be available, for now you should retrieve the latest source code.

I extracted tomcat to my home directory for development.

tomcat_home = ~/projects/tomcat/tomcat5526

cd ~/projects/tomcat/tomcat5526/webapps

svn co

mv openbotlist botlist

The project name is called openbotlist, it is best to change the directory
name to just botlist because of URI references to 'botlist' in the web

Run mysqld and setup the database

Start the mysql daemon and create the databases.

* mysqld (leave the daemon running)
* Open a new shell environment and cd to the tomcat botlist directory
* example: cd ~/projects/tomcat/tomcat5526/webapps/botlist
* cd db
* mysql -uroot (enter the mysql shell)
* source create_database.sql; (create the databases)
* source create_tables.sql; (create the tables)
* source insert_link_groups.sql; (addtional step to setup link group table)

Example output:

Query OK, 1 row affected (0.00 sec)

Query OK, 1 row affected (0.00 sec)

Query OK, 1 row affected (0.00 sec)

Query OK, 1 row affected (0.00 sec)

mysql> source insert_link_groups.sql;

At this point, you have created the MySQL database.
Build the project

To build the project, you simply need to enter the botlist web app directory and invoke the ant command.

* cd the botlist web application directory
* example: cd ~/projects/tomcat/tomcat5526/webapps/botlist
* ant
* ant tomcat.deploy (this will copy the java class files to the WEB-INF dir)

Example output:

$ ant
Buildfile: build.xml

[mkdir] Created dir: c:\projects\tools\home\projects\tomcat\tomcat5526\webap
[mkdir] Created dir: c:\projects\tools\home\projects\tomcat\tomcat5526\webap

Web application database configuration

To configure the application, you need to set the database parameters including username and password.


Edit the file.


Run tomcat and navigate to the botlist site

At this point, launch the tomcat server.

* example: cd ~/projects/tomcat/tomcat5526/bin
* ./
* navigate your browser to:

No comments: