[Preparation] 1. Download and install the latest JDK from http://java.sun.com. Define an environment variable JAVA_HOME to be the directory where JDK is installed. 2. Download and install the latest Ant from http://ant.apache.org. Define an environment variable ANT_HOME to be the directory where Ant is installed, and add $ANT_HOME/bin (or %ANT_HOME%\bin on Windows) to the PATH environment variable. 3. Download and install the latest PostgreSQL DBMS from http://www.postgresql.org. Create a database for CSNS. The current release of CSNS uses PostgreSQL. To port it to other DBMS such as MySQL, you'll need to . specify the correct database dialect in /conf/hibernate.cfg.xml . modify some of the sql scripts under /db 4. Download and install the latest Tomcat server from http://tomcat.apache.org. You'll also need to . download the JDBC driver of your database, e.g. postgresql-8.1-407.jdbc3.jar, and put it under /common/lib. . modify /conf/tomcat-users.xml and add a manager user, e.g. . optionally, you may also change the port numbers specified in /conf/server.xml to avoid port conflict with existing services on your computer. Note that other than the JDBC driver, you do not need to install any other libraries. [CSNS] 1. Check out the source code from the Subversion repository. 2. Copy build.properties.sample to build.properties, and modify build.properties according to your own setup. 3. Initialize the database by running the following scripts: . /db/csns-create.sql . /test/setup/csns-test-insert.sql The first script creates the database schema, and the second one will populate the schema with some test data, which include 20 instructors and 1000 students. The username of each account starts with either "i" (for instructors) or "s" (for students), then followed by four digits, e.g. "i0001" or "s0002". The password of each account is the same as the username. 4. Start your Tomcat server, then deploy CSNS by entering the following command on the command line: > ant deploy Assume that your Tomcat server runs on your local machine at port 8080, you can access CSNS at http://localhost:8080/csns. [Development] Note that "ant deploy" packages all necessary libraries together with CSNS code in a single WAR file and deploy it to a Tomcat server. This could take a long time (usually 20 to 40 seconds) due to the size of the libraries. During development, assuming that you have a local Tomcat setup, you may shorten the deployment time by doing > ant install-lib which will copy all the libraries to /shared/lib under the Tomcat directory. Then whenever you need to deploy or redeploy CSNS, simply do > ant install The difference between "ant install" and "ant deploy" is that "ant install" only deploys CSNS code but not the libraries, and this should reduce the deployment time to about 5 seconds.