Instructions for setting up Crafty Scrapbook

Hardware Requirements:

One or more reasonably modern boxes.

You can run everything off the same box, or you can run the database on a different machine from your application server(s). For high scalability, you can even run your web server on a separate machine from your application server, although that setup is not discussed here.

The app server should work fine on any machine that supports Java, although I have only tested it on Linux and Mac OSX.

The database server runs Postgresql. I have only tested it on Linux and OS X, but it should be fine on any platform Postgres supports. The database box should have enough disk space (preferably 10+GB) to store all your pictures and movies.


Software Requirements

Before you can run Crafty Scrapbook, you must install the following software components: You should only install Tomcat version 4.1, sice Crafty makes very specific assumtions about the server.xml file format. Other components (Postgres, JDK, Ant) are untested with higher version numbers but should presumably work fine with Crafty.


Setting Up the Database Server


1. Install PostgreSQL Server. I'm not really a Postgres expert here, so if you need help your best bet is to consult the PostgreSQL documentation. There are many ways to download the bits -- it comes standard (as an optional install) with Red Hat Linux. Or you can download it from the PostgreSQL site here. Previous version of crafty have worked with just about every version of Postgres, but Crafty 0.2 requires PostgreSQL 7.3 or higher.

2. Create and configure the photo database. Once you have successfully installed PostgreSQL, you will need to set up a database to sick your photos and movies in. There is a preconfigured database you can just load, or you can run the SQL setup scripts in the code/sql directory. Loading the preconfigured database is the simplest way to go, and is the procedure discussed here.

steps:


Setting up the Application Server

1. Set Up Java. You will need JDK 1.4 or newer installed on your machine. Crafty will not run on JDK 1.3 or earlier. Download it here.

2. Set up Ant The setup script is requires ant. Get it here.

3. Get Tomcat Although Crafty will almost certainly run on any servlet container that supports the servlet 2.3 API, Tomcat is the only servlet container that is currently supported by the install scripts. download it here.

4. Configure the servlet engine In case of confusion, please consult the Tomcat Documentation. For version 0.11 this step is much simpler.

Be aware that Crafty Scrapbook's install script overwrites the normal tomcat config files web.xml and server.xml with versions of these files found in crafty/config. So if you have any preferred custom settings above and beyond what's required to set up Crafty Scrapbook, make sure this is where you put them.

5. Launch the servlet engine. In Tomcat, the bin/ directory constains a cript named startup.sh. It is important that this script be run from the tomcat directory, and not the tomcat/bin directory, or the relative paths required by Tea will break. To do this, type 'bin/startup.sh' from your Tomcat directory. There may be a better way to do this but I don't know it yet.

Special note for linux users
The code that handles file uploads uses javax.swing.ImageIcon. This class has to be able to talk to a running version of X windows. You must start tomcat locally, or the VM will not be able to connect to the display. ssh'ing into the box and launching tomcat remotely will cause the upload feature not to work. You can work around this by setting an environment variable that casues Tomcat to launch java in 'headless' mode.

Monitor these logs for clues if things go south: logs/catalina.out, logs/localhost_log.(timestamp).txt

6. Connect in the web browser Unless you have altered the main port number setting for Tomcat in server.xml, this app should be running on port 8080. Connect to it in your web browser: http://localhost:8080/crafty/ You will need to log in as the admin user in order to see the initial test content. By default the username is 'Joe Admin' and the password is 'admin'. You should be good to go!