HowTo Install Redmine 212 in Ubuntu 1210 and Apache Passenger » History » Version 1
Julian Perelli, 2012-11-07 18:29
1 | 1 | Julian Perelli | h1. HowTo Install Redmine 212 in Ubuntu 1210 and Apache Passenger |
---|---|---|---|
2 | |||
3 | Inspired in "HowTo Install Redmine 210 on Debian Squeeze with Apache Passenger", from this same wiki, so meta-kudos, to the original authors. |
||
4 | |||
5 | h2. Assumptions |
||
6 | |||
7 | * We will be using redmine.example.com; so every time you see this below, replace it by your own domain |
||
8 | * If you are behind a proxy, you could do export http_proxy="http://proxy.domain.tld:port" and the installation should work ok. |
||
9 | |||
10 | h2. Warming up |
||
11 | |||
12 | We will first need to install basic packages: |
||
13 | <pre> |
||
14 | apt-get install ruby rubygems libruby libapache2-mod-passenger |
||
15 | </pre> |
||
16 | Download the latest version of Redmine (2.1.2 in our case) and untar it, then move it to /usr/local/share |
||
17 | <pre> |
||
18 | wget |
||
19 | tar -xzvf redmine-2.1.2.tar.gz |
||
20 | ln /usr/local/share/redmine-2.1.2 /usr/local/share/redmine |
||
21 | chown -R root:root /usr/local/share/redmine-2.1.2 |
||
22 | </pre> |
||
23 | |||
24 | Install development libraries for MySQL: |
||
25 | <pre> |
||
26 | apt-get install libmysqlclient-dev |
||
27 | </pre> |
||
28 | |||
29 | Install development libs for Imagick: |
||
30 | <pre> |
||
31 | apt-get install libmagickcore-dev libmagickwand-dev (install shitload of packages) |
||
32 | </pre> |
||
33 | |||
34 | h2. Running the Gem stuff |
||
35 | |||
36 | Install Bundler (removing useless module, which would otherwise create dependencies): |
||
37 | <pre> |
||
38 | gem install bundler |
||
39 | cd /usr/local/share/redmine/ |
||
40 | /var/lib/gems/1.8/bin/bundle install --without development test postgresql sqlite |
||
41 | </pre> |
||
42 | |||
43 | h2. Configuration |
||
44 | |||
45 | Copy config/database.yml.example to config/database.yml and edit this file in order to configure your database settings for "production" environment. |
||
46 | Example for a MySQL database using ruby1.8 or jruby: |
||
47 | <pre> |
||
48 | production: |
||
49 | adapter: mysql |
||
50 | database: redmine |
||
51 | host: localhost |
||
52 | username: redmine |
||
53 | password: my_password |
||
54 | </pre> |
||
55 | |||
56 | Generate a session store secret: |
||
57 | <pre> |
||
58 | /var/lib/gems/1.8/bin/rake generate_secret_token |
||
59 | </pre> |
||
60 | |||
61 | Generate the database structure: |
||
62 | <pre> |
||
63 | RAILS_ENV=production /var/lib/gems/1.8/bin/rake db:migrate |
||
64 | </pre> |
||
65 | |||
66 | Generate default configuration data: |
||
67 | <pre> |
||
68 | RAILS_ENV=production /var/lib/gems/1.8/bin/rake redmine:load_default_data |
||
69 | </pre> |
||
70 | (using “es” for Spanish language in terminal prompt) |
||
71 | |||
72 | Setup config file in config/configuration.yml |
||
73 | |||
74 | Change database_ciphr_key: ******* |
||
75 | <pre> |
||
76 | /var/lib/gems/1.8/bin/rake db:encrypt RAILS_ENV=production |
||
77 | </pre> |
||
78 | |||
79 | h2. Apache |
||
80 | |||
81 | Setup Apache’s VirtualHost config |
||
82 | |||
83 | <pre> |
||
84 | # 8080 in this case is because we use a reverse proxy before Apache. Otherwise simply use "*:80" |
||
85 | |||
86 | <VirtualHost *:8080> |
||
87 | ServerName redmine.example.com |
||
88 | DocumentRoot /usr/local/share/redmine/public |
||
89 | <Directory /usr/local/share/redmine/public> |
||
90 | AllowOverride all |
||
91 | Options -MultiViews |
||
92 | </Directory> |
||
93 | </VirtualHost> |
||
94 | </pre> |
||
95 | |||
96 | Once you enable this virtual host (a2ensite redmine.example.com) and reload Apache (/etc/init.d/apache2/reload), you should see your site running on http://redmine.example.com. |
||
97 | |||
98 | The default login/password is admin/admin (don't forget to change this). |
||
99 | |||
100 | h2. Sources of inspiration |
||
101 | |||
102 | We used the following resources as a starting point. Thanks to their respective authors. |
||
103 | |||
104 | * http://madpropellerhead.com/random/20100820-installing-redmine-on-debian-with-apache (outdated, for Lenny) |
||
105 | * http://www.redmine.org/projects/redmine/wiki/RedmineInstall |
||
106 | * http://hodza.net/2012/03/15/howto-install-redmine-on-debian-6-squeeze-ruby-on-rails-apache2-passenger/ |
||
107 | * http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_Debian_with_Ruby-on-Rails_and_Apache2-Passenger |