Project

General

Profile

RedmineInstall » History » Version 24

Jean-Philippe Lang, 2008-12-30 12:30

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