RedmineInstall » History » Version 66
Henry Bernard, 2009-11-06 03:55
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 | 63 | Thanos Kyritsis | For PostgreSQL: |
64 | |||
65 | <pre> |
||
66 | CREATE ROLE redmine LOGIN ENCRYPTED PASSWORD 'my_password' NOINHERIT VALID UNTIL 'infinity'; |
||
67 | 64 | Thanos Kyritsis | CREATE DATABASE redmine WITH ENCODING='UTF8' OWNER=redmine; |
68 | 63 | Thanos Kyritsis | </pre> |
69 | |||
70 | 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. |
71 | 1 | Jean-Philippe Lang | |
72 | 14 | Jean-Philippe Lang | Example for a MySQL database: |
73 | |||
74 | <pre> |
||
75 | production: |
||
76 | adapter: mysql |
||
77 | database: redmine |
||
78 | host: localhost |
||
79 | 40 | Yclept Nemo | username: redmine |
80 | password: my_password |
||
81 | 3 | Jean-Philippe Lang | </pre> |
82 | |||
83 | 54 | Barbara Post | If your server is not running on the standard port (3306), use this configuration instead: |
84 | |||
85 | <pre> |
||
86 | production: |
||
87 | adapter: mysql |
||
88 | database: redmine |
||
89 | host: localhost |
||
90 | port: 3307 |
||
91 | username: redmine |
||
92 | password: my_password |
||
93 | </pre> |
||
94 | |||
95 | |||
96 | Example for a PostgreSQL database (default port): |
||
97 | 44 | Alexey Lustin | |
98 | <pre> |
||
99 | production: |
||
100 | adapter: postgresql |
||
101 | database: <your_database_name> |
||
102 | host: <postgres_host> |
||
103 | username: <postgres_user> |
||
104 | 46 | Istvan DEMETER | password: <postgres_user_password> |
105 | 44 | Alexey Lustin | encoding: utf8 |
106 | schema_search_path: <database_schema> (default - public) |
||
107 | </pre> |
||
108 | |||
109 | 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. |
110 | 1 | Jean-Philippe Lang | |
111 | 48 | Mat Tipton | Redmine stores session data in cookies by default, which requires a secret to be generated. This can be done by running: |
112 | 41 | Yclept Nemo | |
113 | 61 | Ethan Fremen | rake config/initializers/session_store.rb |
114 | 41 | Yclept Nemo | |
115 | 5. Create the database structure, by running the following command under the application root directory: |
||
116 | |||
117 | 62 | Vladimir L | RAILS_ENV=production rake db:migrate |
118 | 1 | Jean-Philippe Lang | |
119 | It will create tables and an administrator account. |
||
120 | |||
121 | 41 | Yclept Nemo | 6. Insert default configuration data in database, by running the following command: |
122 | 1 | Jean-Philippe Lang | |
123 | 62 | Vladimir L | RAILS_ENV=production rake redmine:load_default_data |
124 | 32 | Jean-Philippe Lang | |
125 | 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. |
||
126 | |||
127 | 7. Setting up permissions |
||
128 | |||
129 | 14 | Jean-Philippe Lang | NB: _Windows users have to skip this section._ |
130 | |||
131 | The user who runs Redmine must have write permission on the following subdirectories: @files@, @log@, @tmp@ (create the last one if not present). |
||
132 | |||
133 | Assuming you run Redmine with a @redmine@ user: |
||
134 | |||
135 | 31 | Eric Davis | <pre> |
136 | 1 | Jean-Philippe Lang | mkdir tmp public/plugin_assets |
137 | 31 | Eric Davis | sudo chown -R redmine:redmine files log tmp public/plugin_assets |
138 | 14 | Jean-Philippe Lang | sudo chmod -R 755 files log tmp public/plugin_assets |
139 | </pre> |
||
140 | 1 | Jean-Philippe Lang | |
141 | 32 | Jean-Philippe Lang | 8. Test the installation by running WEBrick web server: |
142 | 1 | Jean-Philippe Lang | |
143 | 33 | Jean-Philippe Lang | ruby script/server webrick -e production |
144 | 1 | Jean-Philippe Lang | |
145 | 14 | Jean-Philippe Lang | Once WEBrick has started, point your browser to http://localhost:3000/. You should now see the application welcome page. |
146 | 1 | Jean-Philippe Lang | |
147 | 32 | Jean-Philippe Lang | 9. Use default administrator account to log in: |
148 | 1 | Jean-Philippe Lang | |
149 | * login: admin |
||
150 | 14 | Jean-Philippe Lang | * password: admin |
151 | 1 | Jean-Philippe Lang | |
152 | You can go to @Admin & Settings@ to modify application settings. |
||
153 | |||
154 | 21 | Jean-Philippe Lang | h2. SMTP server Configuration |
155 | |||
156 | h3. 0.8.x releases |
||
157 | |||
158 | 66 | Henry Bernard | Copy @config/email.yml.example@ to @config/email.yml@ and edit this file to adjust your SMTP settings. |
159 | 21 | Jean-Philippe Lang | |
160 | 45 | Cyber Sprocket | See the [[Email Configuration|email configuration]] examples. |
161 | |||
162 | 1 | Jean-Philippe Lang | h3. 0.7.x releases |
163 | |||
164 | In config/environment.rb, you can set parameters for your SMTP server: |
||
165 | |||
166 | * config.action_mailer.smtp_settings: SMTP server configuration |
||
167 | 7 | Thomas Lecavelier | * config.action_mailer.perform_deliveries: set to false to disable mail delivering |
168 | 11 | Jean-Philippe Lang | |
169 | Don't forget to restart the application after any change. |
||
170 | |||
171 | h2. Backups |
||
172 | |||
173 | Redmine backups should include: |
||
174 | * data (stored in your redmine database) |
||
175 | * attachments (stored in the @files@ directory of your Redmine install) |
||
176 | |||
177 | Here is a simple shell script that can be used for daily backups (assuming you're using a mysql database): |
||
178 | |||
179 | <pre> |
||
180 | # Database |
||
181 | 55 | Lukasz Slonina | /usr/bin/mysqldump -u <username> -p<password> <redmine_database> | gzip > /path/to/backup/db/redmine_`date +%y_%m_%d`.gz |
182 | 11 | Jean-Philippe Lang | |
183 | # Attachments |
||
184 | 1 | Jean-Philippe Lang | rsync -a /path/to/redmine/files /path/to/backup/files |
185 | </pre> |