Installation Guide

Grab the latest sources

They are located at : http://redmine.tosca-project.net/projects/list_files/tosca

Install the dependencies

On Debian / Ubuntu

  • Install packages :
sudo apt-get install librmagick-ruby1.8 ruby1.8 ruby1.8-dev ri ri1.8 rdoc rubygems rake irb libopenssl-ruby libonig-dev libldap-ruby1.8 

note: on some system, package libgettext-ruby-util can be needed if you have error `msgmerge' can not be found. while making rake updatepo

  • Upgrade RubyGems to the latest version :
sudo gem install rubygems-update
sudo /var/lib/gems/1.8/bin/update_rubygems
  • Install gems :
sudo gem install gettext desert xmpp4r
sudo gem install -v=2.3.5 rails
  • Install more gems
In application's directory :
sudo rake gems:install

Choose a database

SQLite

sudo apt-get install libsqlite3-ruby1.8

PostgreSQL

sudo apt-get install libpgsql-ruby1.8

MySQL

sudo apt-get install libmysql-ruby mysql-server
Note : If you need to install the DB gem from sources, you'll need to install some dev tools :
sudo apt-get install gcc make libmysqlclient15-dev

Configure the database

Database parameters must be defined in application's

config/database.yml

This file should look like this example (in the case of a sqlite database):

development:
  adapter: sqlite3
  database: db/tosca-dev.db
test:
  adapter: sqlite3
  database: db/tosca-test.db
production:
  adapter: sqlite3
  database: db/tosca-prod.db

Install Tosca

In application's directory :
rake tosca:install

Note : Answer "No" when asked to use default database configuration. Otherwise changes made to the database.yml file will be lost.

With the next command, you can add some example data in your database :
rake tosca:generate
Note : Check your config/database.yml, you should have this for an sqlite database:
development:
  adapter: sqlite3
  *database: db/tosca-dev.db*

test:
  adapter: sqlite3
  *database: db/tosca-dev.db*

production:
  adapter: sqlite3
  *database: db/tosca-prod.db*

Test and developement environnements use the same database.

Access the application from the web

Using WEBrick

Export the test environnement
export RAILS_ENV=test

In application's directory :
./script/server

Using Apache

It's detailled here : CompleteInstallation

Configuration

Authentificate on LDAP

You have ton install the ruby-ldap lib
sudo apt-get install libldap-ruby1.8
Copy the file config/ldap.yml.sample to config/ldap.yml
cp config/ldap.yml.sample config/ldap.yml
Edit this file to match you configuration
ldap:
  host: localhost
  port: 389
  binddn: "cn=admin,dc=linagora,dc=lan" 
  bindpw: linagora
  filter: "(&(objectclass=person)(uid=?))" 
  basedn: "ou=People,dc=linagora,dc=lan" 
  scope: "LDAP::LDAP_SCOPE_ONELEVEL" 
  protocol: 3

Also available in: HTML TXT