Project

General

Profile

HowTo Install Redmine 231 On Ubuntu 1204 with git and Redmine Git Hosting plugin » History » Version 13

mark edwards, 2013-09-05 03:02

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 13 mark edwards
32
(marke - i found this extra step from shah helpful  gem install rdp-mysql2 )
33
34 4 Yovav Cohen Tene
cd /usr/local/share/redmine/
35 13 mark edwards
 
36 4 Yovav Cohen Tene
bundle install --without development test postgresql sqlite
37
</pre>
38
39
h2 .Setting up Redmine user and database in MySQL
40
41
<pre>
42
mysql -u root -p
43
</pre>
44
<pre>
45
CREATE DATABASE redmine CHARACTER SET utf8;
46
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';
47 1 Yovav Cohen Tene
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
48 5 Yovav Cohen Tene
</pre>
49
50
h2. Configuration
51 1 Yovav Cohen Tene
52 8 Yovav Cohen Tene
h3. File premissions
53
54
<pre>
55
useradd redmine
56
mkdir -p tmp tmp/pdf public/plugin_assets
57
sudo chown -R redmine:redmine files log tmp public/plugin_assets
58
sudo chmod -R 755 files log tmp public/plugin_assets
59
</pre>
60 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.
61
Example for a MySQL database using ruby1.8 or jruby:
62
<pre>
63
production:
64
  adapter: mysql2      (note: For Rails < 3.1 use mysql instead of mysql2)
65
  database: redmine
66
  host: localhost
67
  username: redmine
68
  password: my_password
69
</pre>
70
71
Generate a session store secret:
72
<pre>
73
rake generate_secret_token
74
</pre>
75
76
Generate the database structure:
77
<pre>
78
RAILS_ENV=production rake db:migrate
79
</pre>
80
81
Generate default configuration data:
82
<pre>
83
RAILS_ENV=production rake redmine:load_default_data
84
</pre>
85
(using “es” for Spanish language in terminal prompt)
86
87
h4. Database encryption
88
89
If you want to encrypt your redmine database do as follows:
90
91
# Copy the default config file @/usr/local/share/redmine/config/configuration.yml.example@ to @/usr/local/share/redmine/config/configuration.yml@
92
# 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.
93
# Run: <pre>
94 3 Yovav Cohen Tene
rake db:encrypt RAILS_ENV=production
95 7 Yovav Cohen Tene
</pre>
96
97
h2. Apache
98 1 Yovav Cohen Tene
99
Setup Apache’s VirtualHost config
100 8 Yovav Cohen Tene
<pre>
101
vim /etc/apache2/sites-available/redmine.example.com
102 11 Yovav Cohen Tene
</pre>
103
104 7 Yovav Cohen Tene
<pre>
105
# 8080 in this case is because we use a reverse proxy before Apache. Otherwise simply use "*:80"
106
107
<VirtualHost *:8080>
108
 ServerName redmine.example.com
109
 DocumentRoot /usr/local/share/redmine/public
110
 <Directory /usr/local/share/redmine/public>
111
   AllowOverride all
112
   Options -MultiViews
113
 </Directory>
114
</VirtualHost>
115
</pre>
116 10 Yovav Cohen Tene
117 13 mark edwards
(marke - that didnt work for me - so i played it fast and loose by killing the 'default' file and using modified 
118
  'default from  http://imsunnyshah.wordpress.com/2013/04/29/how-to-setup-redmine-2-3-0-on-ubuntu-12-10/  )
119 10 Yovav Cohen Tene
120 12 Yovav Cohen Tene
*TODO:: The redmine installation works but users editing return an error when using passenger and to add git pluging*
121 10 Yovav Cohen Tene
122 7 Yovav Cohen Tene
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.
123
124
The default login/password is admin/admin (don't forget to change this).
125
126
h2. Sources of inspiration
127
128
We used the following resources as a starting point. Thanks to their respective authors.
129
130
* http://madpropellerhead.com/random/20100820-installing-redmine-on-debian-with-apache (outdated, for Lenny)
131
* http://www.redmine.org/projects/redmine/wiki/RedmineInstall
132
* http://hodza.net/2012/03/15/howto-install-redmine-on-debian-6-squeeze-ruby-on-rails-apache2-passenger/
133
* http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_Debian_with_Ruby-on-Rails_and_Apache2-Passenger