Personal tools
You are here: Home CinnamonServer Installation of Binary Package 2. Configuration and Deployment

2. Configuration and Deployment

How to configure a Cinnamon server

Set environment variables and memory

Set the variable CINNAMON_HOME_DIR to the directory where you are going to put the cinnamon_config.xml (as well as other configuration files). This environment variable has to be available to the servlet container at the time it's starting. On Ubuntu for example, you may need to add

export CINNAMON_HOME_DIR=/path/to/your/config_dir
export DANDELION_HOME_DIR=$CINNAMON_HOME_DIR
export JAVA_OPTS="$JAVA_OPTS  -XX:MaxPermSize=128M  -Xmx720M -Djava.net.preferIPv4Stack=true "

after the indroductory comments in /etc/init.d/tomcat6.

Prepare the database

Note: the provided SQL script works only with a Postgresql database. If you wish to use another RDBMS, you will have to adjust the SQL script.

  1. Create a database 'demo'.
  2. If you are just testing the cinnamon install, create a user cinnamon with password cinnamon. Otherwise, use a more secure username/password combination.
  3. Load the pg-SQL script into the demo database.
    The script requires the psql tool. GUI-tools like pgadmin3 will not work.  Example for Ubuntu:
    sudo su postgres
    psql -f postgres_dita_all.sql -d demo
    exit

Hint: make sure that the database accepts connections from the servlet's server.

Adjust configuration files

  1. Unpack the Cinnamon server package.
  2. Edit the cinnamon_config.xml to reflect your system's layout (the settings that need to be changed like database URL and data directories should be self explanatory. If not, please ask in the forum.)
  3. Edit the logback.xml file to enable/disable logging. If you set <root level="DEBUG"> to level="ERROR" and delete the <logger ...> elements, you should get only very few log messages. Please note that on some systems log messages may appear in the system's log.

Unpack the data files

  • Create the folders for cinnamon-data and cinnamon-system. Add "global/log" and "index" to cinnamon-system.
  • Unpack dita_files.zip into your cinnamon-data directory.
  • Unpack dita_index.zip into your cinnamon-system/index directory.

You should now have the following directory layout (unless you changed the name of the cinnamon-data and -system directories):

CINNAMON_HOME_DIR:
./cinnamon-data/demo/ (with lots of files)
./cinnamon-system/templates (since version 1.0.2)
./cinnamon-system/global/log
./cinnamon-system/index/demo (with a couple of Lucene index files)
./cinnamon_config.xml
./logback.xml

Adjust servlet container security settings

If you are using Tomcat6, you may need to adjust the security settings the server's policy files. On Ubuntu, change /etc/tomcat6/policy.d/03catalina.policy or .../50local.policy and add

grant{
    permission java.security.AllPermission;
}

This should allow Cinnamon to write data of uploaded files to temporary storage as well as copy this data to cinnamon-data directory.

An improved security management would be nice to have.

Add jdbc jar to servlet container classpath

Download the JDBC-4 driver from http://jdbc.postgresql.org/download.html and put it into the servlet container's classpath so it is loaded at server start and made available to all webapps.

Copy cinnamon.war into webapps

Copy the cinnamon.war file into the servlet container's webapps directory. If your servlet container is properly configured, it should pick up the new war automatically (note: to upgrade an existing installation on tomcat, stop the server, remove the cinnamon directory in webapps and replace the cinnamon.war).

Finished. Your new Cinnamon server should be up and running on the configured port. You may test this by opening
http://localhost:8080/cinnamon/cinnamon, which should give you an XML list of repositories.

Document Actions