Project

General

Profile

HowTo install Redmine on CentOS 5 » History » Version 6

Gary Wilson, 2011-06-28 16:37
This will mitigate gem --zlib error and passenger-install-apache2-module will not complain

1 3 Mischa The Evil
h1. HowTo install Redmine on CentOS 5
2 1 Serafim J Fagundes
3 3 Mischa The Evil
{{>toc}}
4
5
h2. Assumptions
6
7 1 Serafim J Fagundes
* Apache is up and running
8
* Apache has previously been used and works quite well 
9
* MySQL is up and running
10
* MySQL has previously been used and works quite well
11
* Your are logged as root
12
* The next steps are done successively without errors
13
14 3 Mischa The Evil
h2. Steps to take
15
16 6 Gary Wilson
h3. Install gem and passenger dependencies
17
18
<pre>
19
yum -y install zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel
20
</pre>
21
22 1 Serafim J Fagundes
h3. Get Ruby
23
24 3 Mischa The Evil
<pre>
25
cd ~/Downloads  # YOUR FOLDER OF CHOICE
26 1 Serafim J Fagundes
ftp ftp.ruby-lang.org
27
cd /pub/ruby
28
get ruby-1.8.7.pXXX.tar.gz
29
tar zxvf ruby-1.8.7.pXXX.tar.gz ruby-1.8.7.pXXX
30
cd ruby-1.8.7.pXXX
31
./configure
32
make
33
make install
34
ruby -v
35
which ruby
36
cd ..
37 3 Mischa The Evil
</pre>
38 1 Serafim J Fagundes
39 5 Mauro Mazzieri
h3. Get Gems 1.4 (does not work with Gems 1.5)
40 1 Serafim J Fagundes
41 3 Mischa The Evil
<pre>
42
wget http://production.cf.rubygems.org/rubygems/rubygems-1.x.tgz
43 1 Serafim J Fagundes
tar zxvf rubygems-1.x.tgz rubygems-1.x
44
cd rubygems-1.x
45
ruby setup.rb
46
gem -v
47
which gem
48
cd ..
49 3 Mischa The Evil
</pre>
50 1 Serafim J Fagundes
51
h3. Install Passenger
52
53 3 Mischa The Evil
<pre>
54
gem install passenger
55 1 Serafim J Fagundes
passenger-install-apache2-module
56 3 Mischa The Evil
</pre>
57 1 Serafim J Fagundes
58
h3. Restart Apache
59
60
h3. Download Redmine
61
62 3 Mischa The Evil
<pre>
63
wget http://rubyforge.org/frs/download.php/73692/redmine-1.x.tar.gz  # GET LATEST VERSION ON RUBYFORGE
64 1 Serafim J Fagundes
tar zxvf redmine-1.x.tar.gz redmine-1.x
65 3 Mischa The Evil
</pre>
66 1 Serafim J Fagundes
67
h3. Copy the folder to its HTTP document root folder
68
69 3 Mischa The Evil
<pre>cp redmine-1.x /var/www/redmine-1.x</pre>
70 1 Serafim J Fagundes
71
h3. Configure Apache to host the documents
72
73
h3. Install Bundler
74
75 4 Neil McFarlane
<pre>gem install bundler</pre>
76 1 Serafim J Fagundes
77
h3. Add the Bundler Boot and preinitializer code
78
79 3 Mischa The Evil
For more info go to the "Bundler site":http://gembundler.com/.
80 1 Serafim J Fagundes
81
h3. Create the Gemfile and register these gems in it
82
83 3 Mischa The Evil
* @"rake"@, "0.8.3"
84
* @"rack"@, "1.0.1"
85 5 Mauro Mazzieri
* @"i18n"@, "0.4.2"
86 3 Mischa The Evil
* @"rubytree"@, "0.5.2", :require => "tree"
87 1 Serafim J Fagundes
* @"RedCloth"@, "~>4.2.3", :require => "redcloth" # for CodeRay
88 3 Mischa The Evil
* @"mysql"@
89 5 Mauro Mazzieri
* @"coderay"@, "~>0.9.7"
90 1 Serafim J Fagundes
91 3 Mischa The Evil
<pre>bundle install</pre>
92 1 Serafim J Fagundes
93
h3. Create the Redmine MySQL database
94
95
h3. Configure database.yml (rename database.yml.example)
96
97
h3. Set the production environment (optional)
98
99
Uncomment the following line:
100
101 3 Mischa The Evil
<pre>ENV['RAILS_ENV'] ||= 'production'</pre>
102 1 Serafim J Fagundes
103
h3. Generate the session store
104
105 3 Mischa The Evil
<pre>RAILS_ENV=production bundle exec rake generate_session_store</pre>
106 1 Serafim J Fagundes
107
h3. Migrate the database models
108
109 3 Mischa The Evil
<pre>RAILS_ENV=production bundle exec rake db:migrate</pre>
110 1 Serafim J Fagundes
111
h3. Load default data (optional)
112
113 3 Mischa The Evil
<pre>RAILS_ENV=production bundle exec rake redmine:load_default_data</pre>
114 1 Serafim J Fagundes
115
Follow instructions.
116
117
h3. Rename dispatch CGI files
118
119 3 Mischa The Evil
<pre>
120
mv dispatch.cgi.example dispatch.cgi
121 1 Serafim J Fagundes
mv dispatch.fcgi.example dispatch.fcgi
122
mv dispatch.rb.example dispatch.rb
123 3 Mischa The Evil
</pre>
124 1 Serafim J Fagundes
125
h3. Edit .htaccess file for CGI dispatch configuration
126 5 Mauro Mazzieri
127
<pre>
128
mv htaccess.fcgi.example .htaccess
129
</pre>
130 1 Serafim J Fagundes
131
h3. Chown and Chmod files for read/write access for the Apache user
132
133 3 Mischa The Evil
<pre>
134
cd ..
135 1 Serafim J Fagundes
chown -R apache:apache redmine-1.x
136
chmod -R 755 redmine-1.x
137 3 Mischa The Evil
</pre>
138 2 Serafim J Fagundes
139 1 Serafim J Fagundes
h3. Redmine should be fully installed now and fully usable
140
141
Enjoy!