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