r6 - 18 Apr 2009 - 05:29:47 - PeterCaronYou are here: OSAF >  Projects Web  > ChandlerServerConfiguration


Installing Chandler Server

Once you have either downloaded and installed the pre-built package or build Chandler Server from source you can then extract the tarball and use Chandler Server.

In the directory you have extracted the package you will see several directories (more are present than listed here):

  • bin
  • tomcat
  • etc
  • migration
  • logs (created during first-run)

Now you can run the server with bin/osafsrvctl start. You will want to check logs/osafsrv.log to make sure the server started correctly. You should see messages like this (along with some interspersed debug messages):

2006-11-02 13:43:29,418 INFO  [LifecycleLoggerListener] Cosmo Sharing Server 0.6-SNAPSHOT starting
2006-11-02 13:43:40,852 INFO  [DbInitializer] Creating database
2006-11-02 13:43:43,482 INFO  [DbInitializer] found schema version 0.6-SNAPSHOT
2006-11-02 13:43:43,531 INFO  [DbInitializer] Initializing database
2006-11-02 13:43:46,406 INFO  [Catalina] Server startup in 17896 ms

Now point your browser at http://localhost:8080/. If all has gone well, you will see a welcome page with a link to sign up for a Cosmo account. The base URL for Cosmo is http://localhost:8080/chandler/.

See the server bundle Administrator's Guide for more details on running the server.

Using a relational database back-end

Using MySQL

If you want to develop against a MySQL 5.x database server rather than the default embedded Derby database, do the following:

  1. Create a new database ("cosmo" for instance) in your database server. Make sure the default charset is utf8.
  2. Edit $OSAFSRV_HOME/etc/cosmo.properties and change the property cosmo.hibernate.dialect to org.hibernate.dialect.MySQL5InnoDBDialect.
  3. Edit $OSAFSRV_HOME/tomcat/conf/server.xml, comment out the <Resource> definition for the Derby datasource, and uncomment the example <Resource> definition for the MySQL datasource. Set the datasource properties to match your database server.
  4. OR if <Resource> is not defined in the server.xml, then you may have to Edit =$OSAFSRV_HOME/tomcat/conf/Catalina/localhost/chandler.xml and comment out the Derby settings and uncomment the MySQL? settings. Don't forget to set the server and db options to match your database.
  5. Start Cosmo and the database schema will automatically be created the first time.

Using PostgreSQL

If you want to develop against a PostgreSQL 8.2 database server rather than the default embedded Derby database, do the following:

  1. Create a new database ("cosmo" for instance) in your database server. Make sure the default charset is utf8.
  2. Download the latest PostgreSQL JDBC 3 driver from http://jdbc.postgresql.org/download.html and copy to =$OSAFSRV_HOME/tomcat/common/lib.
  3. Edit $OSAFSRV_HOME/etc/cosmo.properties and change the property cosmo.hibernate.dialect to org.hibernate.dialect.PostgreSQLDialect and the property cosmo.hibernate.sql.booleanStringValue to TRUE.
  4. Edit $OSAFSRV_HOME/tomcat/conf/server.xml, comment out the <Resource> definition for the Derby datasource, and uncomment the example <Resource> definition for the PostgreSQL datasource. Set the datasource properties to match your database server.
  5. Start Cosmo and the database schema will automatically be created the first time.

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r6 < r5 < r4 < r3 < r2 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.