| |
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:
- Create a new database ("cosmo" for instance) in your database server. Make sure the default charset is
utf8
.
- Edit
$OSAFSRV_HOME/etc/cosmo.properties
and change the property cosmo.hibernate.dialect
to org.hibernate.dialect.MySQL5InnoDBDialect
.
- 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.
- 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.
- 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:
- Create a new database ("cosmo" for instance) in your database server. Make sure the default charset is
utf8
.
- Download the latest PostgreSQL JDBC 3 driver from http://jdbc.postgresql.org/download.html and copy to =$OSAFSRV_HOME/tomcat/common/lib.
- 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
.
- 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.
- Start Cosmo and the database schema will automatically be created the first time.