Project

General

Profile

RedmineInstall » History » Version 28

Jean-Philippe Lang, 2009-01-03 14:44
RubyGems requirement

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