Project

General

Profile

RedmineInstall » History » Version 22

Jean-Philippe Lang, 2008-12-07 12:45
rails installation

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