Project

General

Profile

RedmineInstall » History » Version 16

Jean-Philippe Lang, 2008-06-17 21:08
ruby version

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