====== Redmine Installation =======
[[https://www.gandi.net/hosting/simple?language=ruby&db=mysql|{{:fr:tutorials:simple:ruby.png?nolink|}}]]{{:fr:tutorials:simple:plus.png?nolink|}}[[https://www.gandi.net/hosting/simple?language=ruby&db=mysql|{{:fr:tutorials:simple:mysql.png?nolink|}}]]{{:fr:tutorials:simple:slash.png?nolink|}}[[https://www.gandi.net/hosting/simple?language=ruby&db=mysql|{{:fr:tutorials:simple:pgsql.png?nolink|}}]]
This tutorial will guide you through the process of installing [[http://www.redmine.org/|Redmine]], a flexible project management web application written in Ruby on Rails, on a Ruby Simple Hosting instance.
Redmine is open source and released under the terms of the GNU General Public License v2 (GPL).
Start by downloading the [[http://www.redmine.org/projects/redmine/wiki/Download|latest version of Redmine]] (version 2.5.1, at the time of this writing, in our example):
$ wget http://www.redmine.org/releases/redmine-2.5.1.tar.gz
$ tar -xzvf redmine-2.5.1.tar.gz
$ mv redmine-2.5.1 redmine
$ rm redmine-2.5.1.tar.gz
$ cd redmine
===== Prepare the .gitignore file =====
Remove the following lines from the file ''.gitignore'':
/config/database.yml
/config/initializers/session_store.rb
/config/initializers/secret_token.rb
/public/plugin_assets
/Gemfile.lock
/Gemfile.local
/db/schema.rb
===== Database configuration =====
$ cp config/database.yml.example config/database.yml
Configure the database:
**For MySQL:**
--
file : config/database.yml
--
production:
adapter: mysql2
database: redmine
socket: /srv/run/mysqld/mysqld.sock
username: root
password: ""
encoding: utf8
pool: 5
**For PostgreSQL:**
--
file: config/database.yml
--
[...]
production:
adapter: postgresql
template: template0
database: redmine
host: localhost
port: 5432
username: hosting-db
password:
encoding: unicode
pool: 5
[...]
===== Install dependencies =====
Next, install the necessary dependencies and generate the ''Gemfile.lock'' file using Bundler:
Redmine uses Rmagick for image manipulation and PDF/PNG export.
If you want to use Rmagick, install the ''libmagickwand-dev'' package to meet dependencies when generating the ''Gemfile.lock'' file. Otherwise, use the ''--without rmagick'' option, as in the second option below.
$ bundle install
or, without Rmagick:
$ bundle install --without rmagick
Next, generate a secret token:
$ bundle exec rake generate_secret_token
===== Push to your instance =====
In the commands below, replace **''INSTANCE_ID''** with your instance ID, and and **''DC_ID''** with the ID of the datacenter where your instance lives (''dc0'' for Paris, ''dc1'' for Baltimore, ''dc2'' for Luxembourg).
Initialize the repo and push the code to the instance:
$ git init
$ git add .
$ git commit -am 'Initial install'
$ git remote add gandi git+ssh://INSTANCE_ID@git.DC_ID.gpaas.net/default.git
$ git push gandi master
===== Deployment =====
Deployment is performed by running the following command:
$ ssh LOGIN@git.DC_ID.gpaas.net 'deploy default.git'
To finish, activate the SSH console of the instance, then connect via SSH and run the following command to initialize the database:
$ cd web/vhosts/default/
$ bundle exec rake db:setup
===== Steps to take upon first login =====
It's often useful to run an extra command to create certain default Redmine options, such as the interface language.
Still in the ''web/vhosts/default/'' directory, run:
$ bundle exec rake redmine:load_default_data
Choose "en" for English, "fr" for French, or "es" for Spanish.
To access your Redmine installation, browse to the default URL that is displayed on the instance control panel in your Gandi account.
The default login credentials are as follows:
* Login: **admin**
* Password: **admin**
Don't forget to change your password after your first login!
You can now use your Redmine installation to manage your projects!