RedmineInstall » History » Version 58
Eric Davis, 2009-09-14 06:26
Updated the version table for Rails 2.3.4
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 | 58 | Eric Davis | |current trunk|ruby 1.8.6, 1.8.7|Rails 2.3.4| |
17 | |trunk from r2493 to r2886|ruby 1.8.6, 1.8.7|Rails 2.2.2| |
||
18 | 32 | Jean-Philippe Lang | |trunk before r2493|ruby 1.8.6, 1.8.7|Rails 2.1.2| |
19 | 30 | Jean-Philippe Lang | |0.8.x|ruby 1.8.6, 1.8.7|Rails 2.1.2| |
20 | |0.7.x|ruby 1.8.6|Rails 2.0.2| |
||
21 | 22 | Jean-Philippe Lang | |
22 | Official releases include the appropriate Rails version in their @vendor@ directory. So no particular action is needed. |
||
23 | 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: |
24 | |||
25 | 32 | Jean-Philippe Lang | gem install rails -v=2.2.2 |
26 | 25 | Jean-Philippe Lang | |
27 | 28 | Jean-Philippe Lang | Notes: |
28 | 27 | Jean-Philippe Lang | * RubyGems 1.3.1 is required |
29 | 25 | Jean-Philippe Lang | * Rake 0.8.3 is required |
30 | 1 | Jean-Philippe Lang | |
31 | 25 | Jean-Philippe Lang | h3. Database |
32 | |||
33 | 50 | Mat Tipton | * MySQL 4.1 or higher (recommended) [One exception- the ruby mysql gem does not currently support mysql 5.1] |
34 | 1 | Jean-Philippe Lang | |
35 | 35 | Jean-Philippe Lang | * make sure to install the C bindings for ruby that dramatically improve performance. You can get them by running @gem install mysql@. |
36 | |||
37 | * PostgreSQL 8 |
||
38 | |||
39 | * make sure your database datestyle is set to ISO (Postgresql default setting). You can set it using: @ALTER DATABASE "redmine_db" SET datestyle="ISO,MDY";@ |
||
40 | |||
41 | * SQLite 3 |
||
42 | 26 | Jean-Philippe Lang | |
43 | 25 | Jean-Philippe Lang | h3. Optional components |
44 | 23 | Jean-Philippe Lang | |
45 | 25 | Jean-Philippe Lang | * SCM binaries (eg. @svn@), for repository browsing (must be available in your PATH). See [[RedmineRepositories]] for SCM compatibility and requirements. |
46 | * "RMagick":http://rmagick.rubyforge.org/ (to enable Gantt export to png image) |
||
47 | 56 | Eric Davis | * "Ruby OpenID Library":http://openidenabled.com/ruby-openid/ (to enable OpenID support) [only on Redmine trunk / 0.9-dev] Version 2 or greater is required. |
48 | 1 | Jean-Philippe Lang | |
49 | 8 | Thomas Lecavelier | h2. Installation |
50 | 1 | Jean-Philippe Lang | |
51 | 6 | Jean-Philippe Lang | 1. [[Download]] and extract the archive or [[CheckingoutRedmine|checkout]] Redmine. |
52 | |||
53 | 36 | Yclept Nemo | 2. Create an empty database and accompanying user named @redmine@ for example. |
54 | 6 | Jean-Philippe Lang | |
55 | For MySQL: |
||
56 | 1 | Jean-Philippe Lang | |
57 | 38 | Yclept Nemo | <pre> |
58 | 39 | Yclept Nemo | create database redmine character set utf8; |
59 | create user 'redmine'@'localhost' identified by 'my_password'; |
||
60 | grant all privileges on redmine.* to 'redmine'@'localhost'; |
||
61 | 38 | Yclept Nemo | </pre> |
62 | 1 | Jean-Philippe Lang | |
63 | 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. |
64 | 1 | Jean-Philippe Lang | |
65 | 14 | Jean-Philippe Lang | Example for a MySQL database: |
66 | |||
67 | <pre> |
||
68 | production: |
||
69 | adapter: mysql |
||
70 | database: redmine |
||
71 | host: localhost |
||
72 | 40 | Yclept Nemo | username: redmine |
73 | password: my_password |
||
74 | 3 | Jean-Philippe Lang | </pre> |
75 | |||
76 | 54 | Barbara Post | If your server is not running on the standard port (3306), use this configuration instead: |
77 | |||
78 | <pre> |
||
79 | production: |
||
80 | adapter: mysql |
||
81 | database: redmine |
||
82 | host: localhost |
||
83 | port: 3307 |
||
84 | username: redmine |
||
85 | password: my_password |
||
86 | </pre> |
||
87 | |||
88 | |||
89 | Example for a PostgreSQL database (default port): |
||
90 | 44 | Alexey Lustin | |
91 | <pre> |
||
92 | production: |
||
93 | adapter: postgresql |
||
94 | database: <your_database_name> |
||
95 | host: <postgres_host> |
||
96 | username: <postgres_user> |
||
97 | 46 | Istvan DEMETER | password: <postgres_user_password> |
98 | 44 | Alexey Lustin | encoding: utf8 |
99 | schema_search_path: <database_schema> (default - public) |
||
100 | </pre> |
||
101 | |||
102 | 57 | Eric Davis | 4. Generate a session store secret. This is only required on the *trunk* version of Redmine at r2493 or above. Users installing a released version of 0.8.x can skip this step. |
103 | 1 | Jean-Philippe Lang | |
104 | 48 | Mat Tipton | Redmine stores session data in cookies by default, which requires a secret to be generated. This can be done by running: |
105 | 41 | Yclept Nemo | |
106 | 48 | Mat Tipton | rake config/initializers/session_store.rb |
107 | 41 | Yclept Nemo | |
108 | 5. Create the database structure, by running the following command under the application root directory: |
||
109 | |||
110 | 1 | Jean-Philippe Lang | rake db:migrate RAILS_ENV="production" |
111 | |||
112 | It will create tables and an administrator account. |
||
113 | |||
114 | 41 | Yclept Nemo | 6. Insert default configuration data in database, by running the following command: |
115 | 1 | Jean-Philippe Lang | |
116 | 32 | Jean-Philippe Lang | rake redmine:load_default_data RAILS_ENV="production" |
117 | |||
118 | 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. |
||
119 | |||
120 | 7. Setting up permissions |
||
121 | |||
122 | 14 | Jean-Philippe Lang | NB: _Windows users have to skip this section._ |
123 | |||
124 | The user who runs Redmine must have write permission on the following subdirectories: @files@, @log@, @tmp@ (create the last one if not present). |
||
125 | |||
126 | Assuming you run Redmine with a @redmine@ user: |
||
127 | |||
128 | 31 | Eric Davis | <pre> |
129 | 1 | Jean-Philippe Lang | mkdir tmp public/plugin_assets |
130 | 31 | Eric Davis | sudo chown -R redmine:redmine files log tmp public/plugin_assets |
131 | 14 | Jean-Philippe Lang | sudo chmod -R 755 files log tmp public/plugin_assets |
132 | </pre> |
||
133 | 1 | Jean-Philippe Lang | |
134 | 32 | Jean-Philippe Lang | 8. Test the installation by running WEBrick web server: |
135 | 1 | Jean-Philippe Lang | |
136 | 33 | Jean-Philippe Lang | ruby script/server webrick -e production |
137 | 1 | Jean-Philippe Lang | |
138 | 14 | Jean-Philippe Lang | Once WEBrick has started, point your browser to http://localhost:3000/. You should now see the application welcome page. |
139 | 1 | Jean-Philippe Lang | |
140 | 32 | Jean-Philippe Lang | 9. Use default administrator account to log in: |
141 | 1 | Jean-Philippe Lang | |
142 | * login: admin |
||
143 | 14 | Jean-Philippe Lang | * password: admin |
144 | 1 | Jean-Philippe Lang | |
145 | You can go to @Admin & Settings@ to modify application settings. |
||
146 | |||
147 | 21 | Jean-Philippe Lang | h2. SMTP server Configuration |
148 | |||
149 | h3. 0.8.x releases |
||
150 | |||
151 | Copy @config/email.yml.example@ to @config/email.yml@ and edit this file to adjust your SMTP settings. |
||
152 | |||
153 | 45 | Cyber Sprocket | See the [[Email Configuration|email configuration]] examples. |
154 | |||
155 | 1 | Jean-Philippe Lang | h3. 0.7.x releases |
156 | |||
157 | In config/environment.rb, you can set parameters for your SMTP server: |
||
158 | |||
159 | * config.action_mailer.smtp_settings: SMTP server configuration |
||
160 | 7 | Thomas Lecavelier | * config.action_mailer.perform_deliveries: set to false to disable mail delivering |
161 | 11 | Jean-Philippe Lang | |
162 | Don't forget to restart the application after any change. |
||
163 | |||
164 | h2. Backups |
||
165 | |||
166 | Redmine backups should include: |
||
167 | * data (stored in your redmine database) |
||
168 | * attachments (stored in the @files@ directory of your Redmine install) |
||
169 | |||
170 | Here is a simple shell script that can be used for daily backups (assuming you're using a mysql database): |
||
171 | |||
172 | <pre> |
||
173 | # Database |
||
174 | 55 | Lukasz Slonina | /usr/bin/mysqldump -u <username> -p<password> <redmine_database> | gzip > /path/to/backup/db/redmine_`date +%y_%m_%d`.gz |
175 | 11 | Jean-Philippe Lang | |
176 | # Attachments |
||
177 | 1 | Jean-Philippe Lang | rsync -a /path/to/redmine/files /path/to/backup/files |
178 | </pre> |