HowTo Install Redmine 231 On Ubuntu 1204 with git and Redmine Git Hosting plugin » History » Version 8
Yovav Cohen Tene, 2013-07-13 21:25
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 | 8 | Yovav Cohen Tene | apt-get install ruby rubygems libruby libapache2-mod-passenger ruby-dev libmysqlclient-dev libmagickcore-dev libmagickwand-dev git git-core -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 | 1 | Yovav Cohen Tene | |
48 | 8 | Yovav Cohen Tene | h3. File premissions |
49 | |||
50 | <pre> |
||
51 | useradd redmine |
||
52 | mkdir -p tmp tmp/pdf public/plugin_assets |
||
53 | sudo chown -R redmine:redmine files log tmp public/plugin_assets |
||
54 | sudo chmod -R 755 files log tmp public/plugin_assets |
||
55 | </pre> |
||
56 | 5 | Yovav Cohen Tene | 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. |
57 | Example for a MySQL database using ruby1.8 or jruby: |
||
58 | <pre> |
||
59 | production: |
||
60 | adapter: mysql2 (note: For Rails < 3.1 use mysql instead of mysql2) |
||
61 | database: redmine |
||
62 | host: localhost |
||
63 | username: redmine |
||
64 | password: my_password |
||
65 | </pre> |
||
66 | |||
67 | Generate a session store secret: |
||
68 | <pre> |
||
69 | rake generate_secret_token |
||
70 | </pre> |
||
71 | |||
72 | Generate the database structure: |
||
73 | <pre> |
||
74 | RAILS_ENV=production rake db:migrate |
||
75 | </pre> |
||
76 | |||
77 | Generate default configuration data: |
||
78 | <pre> |
||
79 | RAILS_ENV=production rake redmine:load_default_data |
||
80 | </pre> |
||
81 | (using “es” for Spanish language in terminal prompt) |
||
82 | |||
83 | h4. Database encryption |
||
84 | |||
85 | If you want to encrypt your redmine database do as follows: |
||
86 | |||
87 | # Copy the default config file @/usr/local/share/redmine/config/configuration.yml.example@ to @/usr/local/share/redmine/config/configuration.yml@ |
||
88 | # 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. |
||
89 | # Run: <pre> |
||
90 | 3 | Yovav Cohen Tene | rake db:encrypt RAILS_ENV=production |
91 | 7 | Yovav Cohen Tene | </pre> |
92 | |||
93 | h2. Apache |
||
94 | 1 | Yovav Cohen Tene | |
95 | Setup Apache’s VirtualHost config |
||
96 | 8 | Yovav Cohen Tene | <pre> |
97 | vim /etc/apache2/sites-available/redmine.example.com |
||
98 | 7 | Yovav Cohen Tene | <pre> |
99 | # 8080 in this case is because we use a reverse proxy before Apache. Otherwise simply use "*:80" |
||
100 | |||
101 | <VirtualHost *:8080> |
||
102 | ServerName redmine.example.com |
||
103 | DocumentRoot /usr/local/share/redmine/public |
||
104 | <Directory /usr/local/share/redmine/public> |
||
105 | AllowOverride all |
||
106 | Options -MultiViews |
||
107 | </Directory> |
||
108 | </VirtualHost> |
||
109 | </pre> |
||
110 | |||
111 | 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. |
||
112 | |||
113 | The default login/password is admin/admin (don't forget to change this). |
||
114 | |||
115 | h2. Sources of inspiration |
||
116 | |||
117 | We used the following resources as a starting point. Thanks to their respective authors. |
||
118 | |||
119 | * http://madpropellerhead.com/random/20100820-installing-redmine-on-debian-with-apache (outdated, for Lenny) |
||
120 | * http://www.redmine.org/projects/redmine/wiki/RedmineInstall |
||
121 | * http://hodza.net/2012/03/15/howto-install-redmine-on-debian-6-squeeze-ruby-on-rails-apache2-passenger/ |
||
122 | * http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_Debian_with_Ruby-on-Rails_and_Apache2-Passenger |