Project

General

Profile

RedmineInstall » History » Version 17

Jean-Philippe Lang, 2008-07-04 20:01
Rails 2.1 compatibility

1 1 Jean-Philippe Lang
h1. Installing Redmine
2
3
{{>TOC}}
4
5
h2. Requirements
6
7 17 Jean-Philippe Lang
    * Ruby on Rails:
8 1 Jean-Philippe Lang
9 17 Jean-Philippe Lang
      * Redmine 0.7.x requires Rails 2.0.2
10
      * Redmine devel r1623 and above is compatible with Rails 2.1
11
12
    * A database:
13
14
      * MySQL 4 or higher (recommended)
15
      * PostgreSQL 8
16
      * SQLite 3 (please read this: http://weblog.rubyonrails.org/2007/1/29/using-sqlite3-with-rails)
17
18 1 Jean-Philippe Lang
Optional:
19 13 Jean-Philippe Lang
20
    * SVN binaries (>= 1.3), for repository browsing (must be available in your PATH)
21
    * RMagick (Gantt export to a png image)
22 1 Jean-Philippe Lang
23 16 Jean-Philippe Lang
Note that Rails has some compatibility issues with ruby 1.8.7. The recommended ruby version is 1.8.6.
24
25 1 Jean-Philippe Lang
h2. Installation
26
27 8 Thomas Lecavelier
1. [[Download]] and extract the archive or [[CheckingoutRedmine|checkout]] Redmine.
28 1 Jean-Philippe Lang
29 6 Jean-Philippe Lang
2. Create an empty database named @redmine@ for example.
30
31
For MySQL:
32
33
  create database redmine character set utf8;
34 1 Jean-Philippe Lang
35 9 Jean-Philippe Lang
3. Copy @config/database.yml.example@ to @config/database.yml@ and edit this file in order to configure your database settings for "production" environment.
36 1 Jean-Philippe Lang
37 3 Jean-Philippe Lang
Example for a MySQL database:
38 1 Jean-Philippe Lang
39 14 Jean-Philippe Lang
<pre>
40
production:
41
  adapter: mysql
42
  database: redmine
43
  host: localhost
44
  username: bduser
45
  password: bdpasswd
46
</pre>
47 3 Jean-Philippe Lang
48
4. Create the database structure, by running the following command under the application root directory:
49
50 1 Jean-Philippe Lang
  rake db:migrate RAILS_ENV="production"
51
52
It will create tables and an administrator account.
53
54 3 Jean-Philippe Lang
5. Insert default configuration data in database, by running the following command:
55 1 Jean-Philippe Lang
56
  rake redmine:load_default_data RAILS_ENV="production"
57
58
This step is optional but *highly recommended*, as you can define your own configuration from scratch. It will load default roles, trackers, statuses, workflows and enumerations.
59
60 14 Jean-Philippe Lang
6. Setting up permissions
61 1 Jean-Philippe Lang
62 14 Jean-Philippe Lang
The user who runs Redmine must have write permission on the following subdirectories: @files@, @log@, @tmp@ (create the last one if not present).
63
64
Assuming you run Redmine with a @redmine@ user:
65
66
<pre>
67
mkdir tmp
68
sudo chown -R redmine:redmine files log tmp
69
sudo chmod -R 755 files log tmp
70
</pre>
71
72
7. Test the installation by running WEBrick web server:
73
74 1 Jean-Philippe Lang
  ruby script/server -e production
75
76
Once WEBrick has started, point your browser to http://localhost:3000/. You should now see the application welcome page.
77
78 14 Jean-Philippe Lang
8. Use default administrator account to log in:
79 1 Jean-Philippe Lang
80
    * login: admin
81
    * password: admin
82
83 14 Jean-Philippe Lang
You can go to @Admin & Settings@ to modify application settings.
84 1 Jean-Philippe Lang
85
h2. SMTP server Configuration
86
87
In config/environment.rb, you can set parameters for your SMTP server:
88
89
    * config.action_mailer.smtp_settings: SMTP server configuration
90
    * config.action_mailer.perform_deliveries: set to false to disable mail delivering
91
92 7 Thomas Lecavelier
Don't forget to restart the application after any change.
93 11 Jean-Philippe Lang
94
h2. Backups
95
96
Redmine backups should include:
97
* data (stored in your redmine database)
98
* attachments (stored in the @files@ directory of your Redmine install)
99
100
Here is a simple shell script that can be used for daily backups (assuming you're using a mysql database):
101
102
<pre>
103
# Database
104
/usr/bin/mysqldump -u <username> -p <password> <redmine_database> | gzip > /path/to/backup/db/redmine_`date +%y_%m_%d`.gz
105
106
# Attachments
107
rsync -a /path/to/redmine/files /path/to/backup/files
108
</pre>