Project

General

Profile

RedmineInstall » History » Version 11

Jean-Philippe Lang, 2008-04-16 23:46
backups

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