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