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