HowTo Install Redmine 231 On Ubuntu 1204 with git and Redmine Git Hosting plugin » History » Version 7
Yovav Cohen Tene, 2013-07-13 21:04
1 | 1 | Yovav Cohen Tene | h1. HowTo Install Redmine 231 On Ubuntu 1204 clean installation with git and Redmine Git Hosting plugin |
---|---|---|---|
2 | |||
3 | h2. Installing LAMP |
||
4 | 2 | Yovav Cohen Tene | |
5 | 1 | Yovav Cohen Tene | <pre> |
6 | apt-get update && apt-get upgrade -y |
||
7 | apt-get install tasksel |
||
8 | 3 | Yovav Cohen Tene | tasksel |
9 | 1 | Yovav Cohen Tene | </pre> |
10 | |||
11 | 3 | Yovav Cohen Tene | choose LAMP server and choose a password for MySQL root account |
12 | |||
13 | h2. Installing Packages |
||
14 | |||
15 | <pre> |
||
16 | apt-get install ruby rubygems libruby libapache2-mod-passenger ruby-dev libmysqlclient-dev libmagickcore-dev libmagickwand-dev -y |
||
17 | 1 | Yovav Cohen Tene | </pre> |
18 | 6 | Yovav Cohen Tene | |
19 | Reboot your machine!!! |
||
20 | 3 | Yovav Cohen Tene | |
21 | h2. Installing Redmine |
||
22 | |||
23 | <pre> |
||
24 | cd /tmp |
||
25 | wget rubyforge.org/frs/download.php/76933/redmine-2.3.1.tar.gz |
||
26 | tar -xzvf redmine-2.3.1.tar.gz |
||
27 | mv redmine-2.3.1 /usr/local/share/redmine-2.3.1 |
||
28 | ln -s /usr/local/share/redmine-2.3.1 /usr/local/share/redmine |
||
29 | chown -R root:root /usr/local/share/redmine-2.3.1 |
||
30 | 4 | Yovav Cohen Tene | gem install bundler |
31 | cd /usr/local/share/redmine/ |
||
32 | bundle install --without development test postgresql sqlite |
||
33 | </pre> |
||
34 | |||
35 | h2 .Setting up Redmine user and database in MySQL |
||
36 | |||
37 | <pre> |
||
38 | mysql -u root -p |
||
39 | </pre> |
||
40 | <pre> |
||
41 | CREATE DATABASE redmine CHARACTER SET utf8; |
||
42 | CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password'; |
||
43 | 1 | Yovav Cohen Tene | GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost'; |
44 | 5 | Yovav Cohen Tene | </pre> |
45 | |||
46 | h2. Configuration |
||
47 | |||
48 | Copy /usr/local/share/redmine/config/database.yml.example to /usr/local/share/redmine/config/database.yml and edit this file in order to configure your database settings for "production" environment. |
||
49 | Example for a MySQL database using ruby1.8 or jruby: |
||
50 | <pre> |
||
51 | production: |
||
52 | adapter: mysql2 (note: For Rails < 3.1 use mysql instead of mysql2) |
||
53 | database: redmine |
||
54 | host: localhost |
||
55 | username: redmine |
||
56 | password: my_password |
||
57 | </pre> |
||
58 | |||
59 | Generate a session store secret: |
||
60 | <pre> |
||
61 | rake generate_secret_token |
||
62 | </pre> |
||
63 | |||
64 | Generate the database structure: |
||
65 | <pre> |
||
66 | RAILS_ENV=production rake db:migrate |
||
67 | </pre> |
||
68 | |||
69 | Generate default configuration data: |
||
70 | <pre> |
||
71 | RAILS_ENV=production rake redmine:load_default_data |
||
72 | </pre> |
||
73 | (using “es” for Spanish language in terminal prompt) |
||
74 | |||
75 | h4. Database encryption |
||
76 | |||
77 | If you want to encrypt your redmine database do as follows: |
||
78 | |||
79 | # Copy the default config file @/usr/local/share/redmine/config/configuration.yml.example@ to @/usr/local/share/redmine/config/configuration.yml@ |
||
80 | # Edit configuration.yml and create a cipher key there for the environment you've used so thus far - production. Be sure to read the comment in this file. They are very detailed and there for you. |
||
81 | # Run: <pre> |
||
82 | rake db:encrypt RAILS_ENV=production |
||
83 | 3 | Yovav Cohen Tene | </pre> |
84 | 7 | Yovav Cohen Tene | |
85 | h2. Apache |
||
86 | |||
87 | Setup Apache’s VirtualHost config |
||
88 | |||
89 | <pre> |
||
90 | # 8080 in this case is because we use a reverse proxy before Apache. Otherwise simply use "*:80" |
||
91 | |||
92 | <VirtualHost *:8080> |
||
93 | ServerName redmine.example.com |
||
94 | DocumentRoot /usr/local/share/redmine/public |
||
95 | <Directory /usr/local/share/redmine/public> |
||
96 | AllowOverride all |
||
97 | Options -MultiViews |
||
98 | </Directory> |
||
99 | </VirtualHost> |
||
100 | </pre> |
||
101 | |||
102 | Once you enable this virtual host (a2ensite redmine.example.com) and reload Apache (apache2ctl graceful), you should see your site running on http://redmine.example.com. |
||
103 | |||
104 | The default login/password is admin/admin (don't forget to change this). |
||
105 | |||
106 | h2. Sources of inspiration |
||
107 | |||
108 | We used the following resources as a starting point. Thanks to their respective authors. |
||
109 | |||
110 | * http://madpropellerhead.com/random/20100820-installing-redmine-on-debian-with-apache (outdated, for Lenny) |
||
111 | * http://www.redmine.org/projects/redmine/wiki/RedmineInstall |
||
112 | * http://hodza.net/2012/03/15/howto-install-redmine-on-debian-6-squeeze-ruby-on-rails-apache2-passenger/ |
||
113 | * http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_Debian_with_Ruby-on-Rails_and_Apache2-Passenger |