Project

General

Profile

RedmineInstall » History » Version 31

Eric Davis, 2009-02-20 02:03
Added notes about setting up permissions for public/plugin_assets

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