RedmineInstall » History » Version 234
Go MAEDA, 2015-03-18 11:23
Add 'bundle exec' before 'rake' and 'ruby' command
1 | 1 | Jean-Philippe Lang | h1. Installing Redmine |
---|---|---|---|
2 | |||
3 | {{>TOC}} |
||
4 | 73 | Liraz Siri | |
5 | 147 | Jean-Philippe Lang | This is the installation documentation for Redmine 1.4.0 and higher. You can still read the document for 1.3.x "here":/projects/redmine/wiki/RedmineInstall?version=146. |
6 | |||
7 | 1 | Jean-Philippe Lang | h2. Requirements |
8 | |||
9 | 25 | Jean-Philippe Lang | h3. Operating system |
10 | 1 | Jean-Philippe Lang | |
11 | 161 | Etienne Massip | Redmine should run on most Unix, Linux, [[RedmineInstallOSX|Mac]], [[RedmineInstallOSXServer|Mac Server]] and [[RedmineInstall#Notes-on-Windows-installation|Windows]] systems as long as Ruby is available on this platform. See specific installation HowTos [[HowTos|here]]. |
12 | 25 | Jean-Philippe Lang | |
13 | 163 | Etienne Massip | h3. Ruby interpreter |
14 | 25 | Jean-Philippe Lang | |
15 | 163 | Etienne Massip | The required Ruby versions for a given Redmine version is: |
16 | 1 | Jean-Philippe Lang | |
17 | 226 | Toshi MARUYAMA | |_. Redmine version|_. Supported Ruby versions |_. Rails version used| |
18 | 230 | Toshi MARUYAMA | |current trunk |ruby 1.9.3, 2.0.0[1], 2.1, 2.2 |Rails 4.2 | |
19 | 228 | Mischa The Evil | |trunk < !r13482 |ruby 1.8.7[2], 1.9.2, 1.9.3, 2.0.0[1], 2.1, jruby-1.7.6|Rails 3.2 | |
20 | 232 | Go MAEDA | |3.0 |ruby 1.9.3, 2.0.0[1], 2.1, 2.2 |Rails 4.2 | |
21 | |2.6 |ruby 1.8.7[2], 1.9.2, 1.9.3, 2.0.0[1], 2.1, jruby-1.7.6|Rails 3.2 | |
||
22 | 218 | Jean-Philippe Lang | |
23 | 232 | Go MAEDA | *Redmine 2.x does not support Ruby 2.2.* Redmine 3.0 supports Ruby 2.2 (#18947). |
24 | 231 | Toshi MARUYAMA | |
25 | 222 | Etienne Massip | MRI 1.9.3p327 contains "a bug":http://bugs.ruby-lang.org/issues/7374 breaking plugin loading under Windows which 1.9.3p194 or 1.9.3p392 haven't. |
26 | |||
27 | 211 | Etienne Massip | fn1. At time of writing (3/19/2013), SQL Server support is reported broken with *ruby 2.0.0 under Windows* because of a "database adapter gem incompatibility":https://github.com/rails-sqlserver/tiny_tds/issues/110 |
28 | 1 | Jean-Philippe Lang | |
29 | 222 | Etienne Massip | fn2. Ruby MRI 1.8.7 support has reached its EOL and its use is discouraged. See message#38518 and #14371 for additional information. |
30 | 212 | Etienne Massip | |
31 | 164 | Etienne Massip | h3. Supported database back-ends |
32 | 92 | Knight Samar | |
33 | 217 | Jean-Philippe Lang | * MySQL 5.0 or higher |
34 | 35 | Jean-Philippe Lang | |
35 | 195 | Mischa The Evil | * make sure to install the C bindings for Ruby that dramatically improve performance. You can get them by running @gem install mysql2@. |
36 | 229 | Jean-Philippe Lang | * Redmine 2.x is not compatible with mysql 5.7.3 (#17460). Il will be supported by Redmine 3. |
37 | 1 | Jean-Philippe Lang | |
38 | 191 | Etienne Massip | * PostgreSQL 8.2 or higher |
39 | 117 | Etienne Massip | |
40 | 1 | Jean-Philippe Lang | * 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";@ |
41 | 146 | Etienne Massip | * some bugs in PostgreSQL 8.4.0 and 8.4.1 affect Redmine behavior (#4259, #4314), they are fixed in PostgreSQL 8.4.2 |
42 | 1 | Jean-Philippe Lang | |
43 | 233 | Toshi MARUYAMA | * Microsoft SQL Server |
44 | |||
45 | * Redmine 2.x: 2008 or higher (since Redmine 2.3.0) |
||
46 | * Redmine 3.x: "2012 or higher":https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/blob/v4.2.3/README.md#activerecord-sql-server-adapter-for-sql-server-2012-and-higher |
||
47 | 192 | Etienne Massip | |
48 | * SQLite 3 (not for multi-user production use!) |
||
49 | 190 | Etienne Massip | |
50 | 1 | Jean-Philippe Lang | h3. Optional components |
51 | |||
52 | * SCM binaries (eg. @svn@), for repository browsing (must be available in your PATH). See [[RedmineRepositories]] for SCM compatibility and requirements. |
||
53 | 215 | Etienne Massip | * "ImageMagick":http://www.imagemagick.org/ (to enable Gantt export to PNG image and thumbnails generation). |
54 | 193 | Mischa The Evil | * "Ruby OpenID Library":http://openidenabled.com/ruby-openid/ (to enable OpenID support). Version 2 or greater is required. |
55 | 1 | Jean-Philippe Lang | |
56 | h2. Redmine Version |
||
57 | |||
58 | It is recommended that the majority of users install the proper point releases of redmine. Redmine currently releases a new version every 6 months, and these releases are considered very usable and stable. It is *not* recommended to install redmine from trunk, unless you are deeply familiar with Ruby on Rails and keep up with the changes - Trunk _does_ break from time-to-time. |
||
59 | |||
60 | 114 | Etienne Massip | h2. Installation procedure |
61 | 35 | Jean-Philippe Lang | |
62 | 165 | Etienne Massip | h3. Step 1 - Redmine application |
63 | 26 | Jean-Philippe Lang | |
64 | 165 | Etienne Massip | Get the Redmine source code by either downloading a packaged release or checking out the code repository. |
65 | 1 | Jean-Philippe Lang | |
66 | 174 | Etienne Massip | See the [[Download|download page]] for details. |
67 | 165 | Etienne Massip | |
68 | 202 | Jean-Philippe Lang | h3. Step 2 - Create an empty database and accompanying user |
69 | 165 | Etienne Massip | |
70 | 1 | Jean-Philippe Lang | Redmine database user will be named @redmine@ hereafter but it can be changed to anything else. |
71 | 165 | Etienne Massip | |
72 | 1 | Jean-Philippe Lang | h4. MySQL |
73 | 166 | Etienne Massip | |
74 | 208 | Etienne Massip | <pre><code class="sql"> |
75 | CREATE DATABASE redmine CHARACTER SET utf8; |
||
76 | CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password'; |
||
77 | GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost'; |
||
78 | </code></pre> |
||
79 | 1 | Jean-Philippe Lang | |
80 | 88 | Sean Farrell | For versions of MySQL prior to 5.0.2 - skip the 'create user' step and instead: |
81 | 208 | Etienne Massip | <pre><code class="sql"> |
82 | GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost' IDENTIFIED BY 'my_password'; |
||
83 | </code></pre> |
||
84 | |||
85 | 1 | Jean-Philippe Lang | |
86 | h4. PostgreSQL |
||
87 | 166 | Etienne Massip | |
88 | 205 | Etienne Massip | <pre><code class="sql"> |
89 | 1 | Jean-Philippe Lang | CREATE ROLE redmine LOGIN ENCRYPTED PASSWORD 'my_password' NOINHERIT VALID UNTIL 'infinity'; |
90 | CREATE DATABASE redmine WITH ENCODING='UTF8' OWNER=redmine; |
||
91 | 205 | Etienne Massip | </code></pre> |
92 | |||
93 | h4. SQL Server |
||
94 | |||
95 | The database, login and user can be created within ??SQL Server Management Studio?? with a few clicks. |
||
96 | |||
97 | If you prefer the command line option with @SQLCMD@, here's some basic example: |
||
98 | 206 | Etienne Massip | |
99 | {{collapse(Show SQL,Hide SQL) |
||
100 | 205 | Etienne Massip | <pre><code class="sql"> |
101 | USE [master] |
||
102 | GO |
||
103 | |||
104 | -- Very basic DB creation |
||
105 | CREATE DATABASE [REDMINE] |
||
106 | 1 | Jean-Philippe Lang | GO |
107 | |||
108 | 206 | Etienne Massip | -- Creation of a login with SQL Server login/password authentication and no password expiration policy |
109 | CREATE LOGIN [REDMINE] WITH PASSWORD=N'redminepassword', DEFAULT_DATABASE=[REDMINE], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF |
||
110 | 205 | Etienne Massip | GO |
111 | |||
112 | -- User creation using previously created login authentication |
||
113 | USE [REDMINE] |
||
114 | GO |
||
115 | CREATE USER [REDMINE] FOR LOGIN [REDMINE] |
||
116 | GO |
||
117 | -- User permissions set via roles |
||
118 | 207 | Etienne Massip | EXEC sp_addrolemember N'db_datareader', N'REDMINE' |
119 | 205 | Etienne Massip | GO |
120 | 207 | Etienne Massip | EXEC sp_addrolemember N'db_datawriter', N'REDMINE' |
121 | 1 | Jean-Philippe Lang | GO |
122 | 205 | Etienne Massip | </code></pre> |
123 | 206 | Etienne Massip | }} |
124 | 166 | Etienne Massip | |
125 | 202 | Jean-Philippe Lang | h3. Step 3 - Database connection configuration |
126 | 1 | Jean-Philippe Lang | |
127 | 165 | Etienne Massip | Copy @config/database.yml.example@ to @config/database.yml@ and edit this file in order to configure your database settings for "production" environment. |
128 | |||
129 | 209 | Etienne Massip | Example for a MySQL database using ruby 1.8 or jruby: |
130 | 88 | Sean Farrell | |
131 | 209 | Etienne Massip | <pre><code class="yml"> |
132 | 1 | Jean-Philippe Lang | production: |
133 | adapter: mysql |
||
134 | database: redmine |
||
135 | host: localhost |
||
136 | username: redmine |
||
137 | password: my_password |
||
138 | 209 | Etienne Massip | </code></pre> |
139 | 1 | Jean-Philippe Lang | |
140 | 209 | Etienne Massip | Example for a MySQL database using ruby 1.9 (adapter must be set to @mysql2@): |
141 | 1 | Jean-Philippe Lang | |
142 | 209 | Etienne Massip | <pre><code class="yml"> |
143 | 1 | Jean-Philippe Lang | production: |
144 | adapter: mysql2 |
||
145 | database: redmine |
||
146 | host: localhost |
||
147 | username: redmine |
||
148 | password: my_password |
||
149 | 209 | Etienne Massip | </code></pre> |
150 | 1 | Jean-Philippe Lang | |
151 | If your server is not running on the standard port (3306), use this configuration instead: |
||
152 | |||
153 | 209 | Etienne Massip | <pre><code class="yml"> |
154 | 1 | Jean-Philippe Lang | production: |
155 | adapter: mysql |
||
156 | database: redmine |
||
157 | host: localhost |
||
158 | port: 3307 |
||
159 | username: redmine |
||
160 | password: my_password |
||
161 | 209 | Etienne Massip | </code></pre> |
162 | 1 | Jean-Philippe Lang | |
163 | Example for a PostgreSQL database (default port): |
||
164 | |||
165 | 209 | Etienne Massip | <pre><code class="yml"> |
166 | 1 | Jean-Philippe Lang | production: |
167 | adapter: postgresql |
||
168 | database: <your_database_name> |
||
169 | host: <postgres_host> |
||
170 | username: <postgres_user> |
||
171 | password: <postgres_user_password> |
||
172 | encoding: utf8 |
||
173 | schema_search_path: <database_schema> (default - public) |
||
174 | 209 | Etienne Massip | </code></pre> |
175 | 1 | Jean-Philippe Lang | |
176 | 209 | Etienne Massip | Example for a SQL Server database (default host @localhost@, default port @1433@): |
177 | <pre><code class="yml"> |
||
178 | production: |
||
179 | adapter: sqlserver |
||
180 | database: redmine |
||
181 | username: redmine # should match the database user name |
||
182 | password: redminepassword # should match the login password |
||
183 | </code></pre> |
||
184 | 202 | Jean-Philippe Lang | |
185 | h3. Step 4 - Dependencies installation |
||
186 | |||
187 | Redmine uses "Bundler":http://gembundler.com/ to manage gems dependencies. |
||
188 | |||
189 | You need to install Bundler first: |
||
190 | |||
191 | gem install bundler |
||
192 | |||
193 | Then you can install all the gems required by Redmine using the following command: |
||
194 | |||
195 | bundle install --without development test |
||
196 | |||
197 | h4. Optional dependencies |
||
198 | |||
199 | h5. RMagick (allows the use of ImageMagick to manipulate images for PDF and PNG export) |
||
200 | |||
201 | If ImageMagick is not installed on your system, you should skip the installation of the rmagick gem using: |
||
202 | |||
203 | @bundle install --without development test rmagick@ |
||
204 | |||
205 | |||
206 | If you have trouble installing @rmagick@ on Windows, refer to [[HowTo_install_rmagick_gem_on_Windows|this HowTo]]. |
||
207 | |||
208 | h5. Database adapters |
||
209 | |||
210 | 214 | Etienne Massip | Redmine automatically installs the adapter gems required by your database configuration by reading it from the @config/database.yml@ file (eg. if you configured only a connection using the @mysql2@ adapter, then only the @mysql2@ gem will be installed). |
211 | |||
212 | Don't forget to re-run @bundle install --without development test ...@ after adding or removing adapters in the @config/database.yml@ file! |
||
213 | 202 | Jean-Philippe Lang | |
214 | h4. Additional dependencies (@Gemfile.local@) |
||
215 | |||
216 | If you need to load gems that are not required by Redmine core (eg. Puma, fcgi), create a file named @Gemfile.local@ at the root of your redmine directory. It will be loaded automatically when running @bundle install@. |
||
217 | |||
218 | Example: |
||
219 | <pre> |
||
220 | # Gemfile.local |
||
221 | gem 'puma' |
||
222 | 1 | Jean-Philippe Lang | </pre> |
223 | |||
224 | 165 | Etienne Massip | h3. Step 5 - Session store secret generation |
225 | 1 | Jean-Philippe Lang | |
226 | 165 | Etienne Massip | This step generates a random key used by Rails to encode cookies storing session data thus preventing their tampering. |
227 | Generating a new secret token invalidates all existing sessions after restart. |
||
228 | |||
229 | 151 | Jean-Philippe Lang | * with Redmine 1.4.x: |
230 | |||
231 | <pre> |
||
232 | 234 | Go MAEDA | bundle exec rake generate_session_store |
233 | 1 | Jean-Philippe Lang | </pre> |
234 | 151 | Jean-Philippe Lang | |
235 | 1 | Jean-Philippe Lang | * with Redmine 2.x: |
236 | |||
237 | 151 | Jean-Philippe Lang | <pre> |
238 | 234 | Go MAEDA | bundle exec rake generate_secret_token |
239 | 1 | Jean-Philippe Lang | </pre> |
240 | 90 | Jiongliang Zhang | |
241 | 165 | Etienne Massip | h3. Step 6 - Database schema objects creation |
242 | 90 | Jiongliang Zhang | |
243 | 165 | Etienne Massip | Create the database structure, by running the following command under the application root directory: |
244 | |||
245 | 234 | Go MAEDA | RAILS_ENV=production bundle exec rake db:migrate |
246 | 1 | Jean-Philippe Lang | |
247 | 184 | Etienne Massip | Windows syntax: |
248 | 1 | Jean-Philippe Lang | |
249 | 184 | Etienne Massip | set RAILS_ENV=production |
250 | 234 | Go MAEDA | bundle exec rake db:migrate |
251 | 184 | Etienne Massip | |
252 | It will create tables by running all migrations one by one then create the set of the permissions and the application administrator account, named @admin@. |
||
253 | |||
254 | +Ubuntu troubleshooting:+ |
||
255 | 1 | Jean-Philippe Lang | |
256 | 165 | Etienne Massip | If you get this error with Ubuntu: |
257 | 90 | Jiongliang Zhang | <pre> |
258 | 114 | Etienne Massip | Rake aborted! |
259 | 1 | Jean-Philippe Lang | no such file to load -- net/https |
260 | </pre> |
||
261 | |||
262 | 165 | Etienne Massip | Then you need to install @libopenssl-ruby1.8@ just like this: @apt-get install libopenssl-ruby1.8@. |
263 | 1 | Jean-Philippe Lang | |
264 | 165 | Etienne Massip | h3. Step 7 - Database default data set |
265 | 1 | Jean-Philippe Lang | |
266 | 165 | Etienne Massip | Insert default configuration data in database, by running the following command: |
267 | |||
268 | 234 | Go MAEDA | RAILS_ENV=production bundle exec rake redmine:load_default_data |
269 | 62 | Vladimir L | |
270 | 171 | Etienne Massip | Redmine will prompt you for the data set language that should be loaded; you can also define the @REDMINE_LANG@ environment variable before running the command to a value which will be automatically and silently picked up by the task. |
271 | |||
272 | E.g.: |
||
273 | |||
274 | Unices: |
||
275 | |||
276 | 234 | Go MAEDA | RAILS_ENV=production REDMINE_LANG=fr bundle exec rake redmine:load_default_data |
277 | 171 | Etienne Massip | |
278 | Windows: |
||
279 | <pre> |
||
280 | set RAILS_ENV=production |
||
281 | set REDMINE_LANG=fr |
||
282 | 234 | Go MAEDA | bundle exec rake redmine:load_default_data |
283 | 171 | Etienne Massip | </pre> |
284 | 32 | Jean-Philippe Lang | |
285 | 167 | Etienne Massip | h3. Step 8 - File system permissions |
286 | 32 | Jean-Philippe Lang | |
287 | 165 | Etienne Massip | NB: _Windows users can skip this section._ |
288 | 14 | Jean-Philippe Lang | |
289 | 165 | Etienne Massip | The user account running the application must have write permission on the following subdirectories: |
290 | 1 | Jean-Philippe Lang | |
291 | 165 | Etienne Massip | # @files@ (storage of attachments) |
292 | # @log@ (application log file @production.log@) |
||
293 | 167 | Etienne Massip | # @tmp@ and @tmp/pdf@ (create these ones if not present, used to generate PDF documents among other things) |
294 | 220 | Jean-Baptiste Barth | # @public/plugin_assets@ (assets of plugins) |
295 | 221 | Jean-Baptiste Barth | |
296 | 167 | Etienne Massip | E.g., assuming you run the application with a redmine user account: |
297 | 165 | Etienne Massip | |
298 | 1 | Jean-Philippe Lang | <pre> |
299 | 219 | Jean-Baptiste Barth | mkdir -p tmp tmp/pdf public/plugin_assets |
300 | 1 | Jean-Philippe Lang | sudo chown -R redmine:redmine files log tmp public/plugin_assets |
301 | sudo chmod -R 755 files log tmp public/plugin_assets |
||
302 | </pre> |
||
303 | |||
304 | 165 | Etienne Massip | h3. Step 9 - Test the installation |
305 | 1 | Jean-Philippe Lang | |
306 | 165 | Etienne Massip | Test the installation by running WEBrick web server: |
307 | |||
308 | 1 | Jean-Philippe Lang | * with Redmine 1.4.x: |
309 | |||
310 | 151 | Jean-Philippe Lang | <pre> |
311 | 234 | Go MAEDA | bundle exec ruby script/server webrick -e production |
312 | 1 | Jean-Philippe Lang | </pre> |
313 | |||
314 | 151 | Jean-Philippe Lang | * with Redmine 2.x: |
315 | |||
316 | <pre> |
||
317 | 234 | Go MAEDA | bundle exec ruby script/rails server webrick -e production |
318 | 151 | Jean-Philippe Lang | </pre> |
319 | |||
320 | Once WEBrick has started, point your browser to http://localhost:3000/. You should now see the application welcome page. |
||
321 | |||
322 | 165 | Etienne Massip | > Note: Webrick is *not* suitable for production use, please only use webrick for testing that the installation up to this point is functional. Use one of the many other guides in this wiki to setup redmine to use either Passenger (aka @mod_rails@), FCGI or a Rack server (Unicorn, Thin, Puma, hellip;) to serve up your redmine. |
323 | 14 | Jean-Philippe Lang | |
324 | 165 | Etienne Massip | h3. Step 10 - Logging into the application |
325 | 158 | Etienne Massip | |
326 | 165 | Etienne Massip | Use default administrator account to log in: |
327 | |||
328 | 1 | Jean-Philippe Lang | * login: admin |
329 | * password: admin |
||
330 | 14 | Jean-Philippe Lang | |
331 | 165 | Etienne Massip | You can go to ??Administration?? menu and choose ??Settings?? to modify most of the application settings. |
332 | |||
333 | 130 | Etienne Massip | h2. Configuration |
334 | 1 | Jean-Philippe Lang | |
335 | 185 | Etienne Massip | Redmine settings are defined in a file named @config/configuration.yml@. |
336 | 1 | Jean-Philippe Lang | |
337 | 185 | Etienne Massip | If you need to override default application settings, simply copy @config/configuration.yml.example@ to @config/configuration.yml@ and edit the new file; the file is well commented by itself, so you should have a look at it. |
338 | 1 | Jean-Philippe Lang | |
339 | 185 | Etienne Massip | These settings may be defined per Rails environment (@production@/@development@/@test@). |
340 | 131 | Etienne Massip | |
341 | +Important+ : don't forget to restart the application after any change. |
||
342 | |||
343 | 130 | Etienne Massip | h3. Email / SMTP server settings |
344 | |||
345 | 132 | Etienne Massip | Email configuration is described in a [[EmailConfiguration|dedicated page]]. |
346 | 1 | Jean-Philippe Lang | |
347 | h3. SCM settings |
||
348 | |||
349 | 133 | Etienne Massip | This configuration section allows you to: |
350 | 131 | Etienne Massip | * override default commands names if the SCM binaries present in the @PATH@ variable doesn't use the standard name (Windows .bat/.cmd names won't work) |
351 | * specify the full path to the binary |
||
352 | |||
353 | 133 | Etienne Massip | Examples (with Subversion): |
354 | 131 | Etienne Massip | |
355 | 133 | Etienne Massip | Command name override: |
356 | 131 | Etienne Massip | |
357 | scm_subversion_command: "svn_replacement.exe" |
||
358 | |||
359 | 133 | Etienne Massip | Absolute path: |
360 | 1 | Jean-Philippe Lang | |
361 | scm_subversion_command: "C:\Program Files\Subversion\bin\svn.exe" |
||
362 | |||
363 | h3. Attachment storage settings |
||
364 | |||
365 | 133 | Etienne Massip | You can set a path where Redmine attachments will be stored which is different from the default 'files' directory of your Redmine instance using the @attachments_storage_path@ setting. |
366 | |||
367 | Examples: |
||
368 | |||
369 | attachments_storage_path: /var/redmine/files |
||
370 | |||
371 | attachments_storage_path: D:/redmine/files |
||
372 | 130 | Etienne Massip | |
373 | h2. Logging configuration |
||
374 | |||
375 | 101 | T. Hauptman | Redmine defaults to a log level of :info, writing to the @log@ subdirectory. Depending on site usage, this can be a lot of data so to avoid the contents of the logfile growing without bound, consider rotating them, either through a system utility like @logrotate@ or via the @config/additional_environment.rb@ file. |
376 | 21 | Jean-Philippe Lang | |
377 | To use the latter, copy @config/additional_environment.rb.example@ to @config/additional_environment.rb@ and add the following lines. Note that the new logger defaults to a high log level and hence has to be explicitly set to @info@. |
||
378 | 123 | Jean-Philippe Lang | <pre><code class="ruby"> |
379 | 21 | Jean-Philippe Lang | #Logger.new(PATH,NUM_FILES_TO_ROTATE,FILE_SIZE) |
380 | 162 | Jean-Philippe Lang | config.logger = Logger.new('/path/to/logfile.log', 2, 1000000) |
381 | 11 | Jean-Philippe Lang | config.logger.level = Logger::INFO |
382 | </code></pre> |
||
383 | |||
384 | h2. Backups |
||
385 | |||
386 | Redmine backups should include: |
||
387 | * data (stored in your redmine database) |
||
388 | * attachments (stored in the @files@ directory of your Redmine install) |
||
389 | |||
390 | Here is a simple shell script that can be used for daily backups (assuming you're using a mysql database): |
||
391 | |||
392 | <pre> |
||
393 | # Database |
||
394 | 55 | Lukasz Slonina | /usr/bin/mysqldump -u <username> -p<password> <redmine_database> | gzip > /path/to/backup/db/redmine_`date +%y_%m_%d`.gz |
395 | 11 | Jean-Philippe Lang | |
396 | # Attachments |
||
397 | 1 | Jean-Philippe Lang | rsync -a /path/to/redmine/files /path/to/backup/files |
398 | </pre> |
||
399 | 69 | Giuliano Simoncelli | |
400 | 216 | Jean-Baptiste Barth | h2. Notes on Linux/Unix installation |
401 | |||
402 | Be sure to disable security hardenning tools during the installation process if you run into bizarre permission problems. These problems are mostly silent and can be caused by tools like extended ACLs, SELinux, or AppArmor. There tools are mostly used in big companies with a strict security policy, default Linux/Unix distributions settings shouldn't be a problem. |
||
403 | |||
404 | 69 | Giuliano Simoncelli | h2. Notes on Windows installation |
405 | |||
406 | 156 | Etienne Massip | There is an prebuilt installer of Ruby MRI available from http://rubyinstaller.org. |
407 | After installing it, select _Start Command Prompt with Ruby_ in the start menu. |
||
408 | 1 | Jean-Philippe Lang | |
409 | 156 | Etienne Massip | +Specifying the @RAILS_ENV@ environment variable:+ |
410 | 69 | Giuliano Simoncelli | |
411 | 156 | Etienne Massip | When running command as described in this guide, you have to set the @RAILS_ENV@ environment variable using a separate command. |
412 | 1 | Jean-Philippe Lang | |
413 | 156 | Etienne Massip | I.e. commands with the following syntaxes: |
414 | 69 | Giuliano Simoncelli | |
415 | 156 | Etienne Massip | <pre>RAILS_ENV=production <any commmand></pre> |
416 | 69 | Giuliano Simoncelli | |
417 | 156 | Etienne Massip | <pre><any commmand> RAILS_ENV=production</pre> |
418 | 1 | Jean-Philippe Lang | |
419 | 156 | Etienne Massip | have to be turned into 2 subsequent commands: |
420 | 69 | Giuliano Simoncelli | |
421 | 156 | Etienne Massip | <pre>set RAILS_ENV=production |
422 | <any commmand></pre> |
||
423 | |||
424 | +MySQL gem installation issue:+ |
||
425 | |||
426 | You may need to manually install the mysql gem using the following command: |
||
427 | |||
428 | 69 | Giuliano Simoncelli | <pre> |
429 | gem install mysql |
||
430 | </pre> |
||
431 | 1 | Jean-Philippe Lang | |
432 | 156 | Etienne Massip | And in some case it is required to copy the _libmysql.dll_ file in your ruby/bin directory. |
433 | Not all libmysql.dll are ok this seem to works http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/libmySQL.dll. |
||
434 | |||
435 | 186 | Jan Niggemann (redmine.org team member) | *Important note for Win7 and later* |
436 | On Win7 and later, @localhost@ is commented out in the hosts file[1] and IPV6 is the default[2]. As the mysql2 gem does no support IPV6 addresses[3], a connection can't be established and you get the error "@Can't connect to MySQL server on 'localhost' (10061)@". |
||
437 | You can confirm this by pinging @localhost@, if ping targets "::1:" IPV6 is being used. |
||
438 | |||
439 | +Workaround:+ |
||
440 | Replace @localhost@ with @127.0.0.1@ in database.yml. |
||
441 | |||
442 | fn1. http://serverfault.com/questions/4689/windows-7-localhost-name-resolution-is-handled-within-dns-itself-why |
||
443 | |||
444 | fn2. http://www.victor-ratajczyk.com/post/2012/02/25/mysql-fails-to-resolve-localhost-disable-ipv6-on-windows.aspx |
||
445 | |||
446 | fn3. https://github.com/brianmario/mysql2/issues/279 |
||
447 | |||
448 | 80 | Jean-Philippe Lang | |
449 | h2. Alternative to manual installation |
||
450 | |||
451 | Some users may prefer to skip manual installation by using one of the [[Download#Third-party-Redmine-bundles|third-party Redmine bundles]] on the download page. |