HowTo install Redmine on CentOS 5 » History » Version 12
Erwin Baeyens, 2011-09-19 11:45
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 | 8 | Erwin Baeyens | <pre>service httpd restart</pre> |
61 | |||
62 | 1 | Serafim J Fagundes | h3. Download Redmine |
63 | |||
64 | 3 | Mischa The Evil | <pre> |
65 | 12 | Erwin Baeyens | wget http://rubyforge.org/frs/download.php/75097/redmine-1.2.1.tar.gz # GET LATEST VERSION ON RUBYFORGE |
66 | tar zxvf redmine-1.2.1.tar.gz |
||
67 | cd redmine-1.2.1 |
||
68 | 3 | Mischa The Evil | </pre> |
69 | 1 | Serafim J Fagundes | |
70 | h3. Copy the folder to its HTTP document root folder |
||
71 | |||
72 | 8 | Erwin Baeyens | <pre>cp -av redmine-1.x/* /var/www/redmine-1.x</pre> |
73 | 1 | Serafim J Fagundes | |
74 | h3. Configure Apache to host the documents |
||
75 | |||
76 | 10 | Erwin Baeyens | more information can be found here: [[HowTo configure Apache to run Redmine]] |
77 | |||
78 | 1 | Serafim J Fagundes | h3. Install Bundler |
79 | |||
80 | 4 | Neil McFarlane | <pre>gem install bundler</pre> |
81 | 1 | Serafim J Fagundes | |
82 | h3. Add the Bundler Boot and preinitializer code |
||
83 | |||
84 | 3 | Mischa The Evil | For more info go to the "Bundler site":http://gembundler.com/. |
85 | 1 | Serafim J Fagundes | |
86 | h3. Create the Gemfile and register these gems in it |
||
87 | |||
88 | 8 | Erwin Baeyens | <pre> cd /var/www/redmine-1.x/ |
89 | touch Gemfile |
||
90 | vi gemfile |
||
91 | </pre> |
||
92 | |||
93 | * source "http://rubygems.org" |
||
94 | * gem @"rake"@, "0.8.3" |
||
95 | * gem @"rack"@, "1.0.1" |
||
96 | * gem @"i18n"@, "0.4.2" |
||
97 | * gem @"rubytree"@, "0.5.2", :require => "tree" |
||
98 | * gem @"RedCloth"@, "~>4.2.3", :require => "redcloth" # for CodeRay |
||
99 | * gem @"mysql"@ |
||
100 | * gem @"coderay"@, "~>0.9.7" |
||
101 | 1 | Serafim J Fagundes | |
102 | 3 | Mischa The Evil | <pre>bundle install</pre> |
103 | 1 | Serafim J Fagundes | |
104 | h3. Create the Redmine MySQL database |
||
105 | |||
106 | 11 | Erwin Baeyens | > For MySQL: |
107 | > start the mysql client and enter the following commands |
||
108 | > > <pre>create database redmine character set utf8; |
||
109 | create user 'redmine'@'localhost' identified by 'my_password'; |
||
110 | grant all privileges on redmine.* to 'redmine'@'localhost'; </pre> |
||
111 | 10 | Erwin Baeyens | |
112 | 11 | Erwin Baeyens | > For versions of MySQL prior to 5.0.2 - skip the 'create user' step and instead: |
113 | |||
114 | > > <pre> grant all privileges on redmine.* to 'redmine'@'localhost' identified by 'my_password';</pre> |
||
115 | 9 | Erwin Baeyens | |
116 | 1 | Serafim J Fagundes | h3. Configure database.yml (rename database.yml.example) |
117 | |||
118 | h3. Set the production environment (optional) |
||
119 | |||
120 | 7 | Thibault B | Uncomment the following line in file redmine/config/environment.rb: |
121 | 1 | Serafim J Fagundes | |
122 | 3 | Mischa The Evil | <pre>ENV['RAILS_ENV'] ||= 'production'</pre> |
123 | 1 | Serafim J Fagundes | |
124 | h3. Generate the session store |
||
125 | |||
126 | 3 | Mischa The Evil | <pre>RAILS_ENV=production bundle exec rake generate_session_store</pre> |
127 | 1 | Serafim J Fagundes | |
128 | h3. Migrate the database models |
||
129 | |||
130 | 3 | Mischa The Evil | <pre>RAILS_ENV=production bundle exec rake db:migrate</pre> |
131 | 1 | Serafim J Fagundes | |
132 | h3. Load default data (optional) |
||
133 | |||
134 | 3 | Mischa The Evil | <pre>RAILS_ENV=production bundle exec rake redmine:load_default_data</pre> |
135 | 1 | Serafim J Fagundes | |
136 | Follow instructions. |
||
137 | |||
138 | h3. Rename dispatch CGI files |
||
139 | |||
140 | 3 | Mischa The Evil | <pre> |
141 | mv dispatch.cgi.example dispatch.cgi |
||
142 | 1 | Serafim J Fagundes | mv dispatch.fcgi.example dispatch.fcgi |
143 | mv dispatch.rb.example dispatch.rb |
||
144 | 3 | Mischa The Evil | </pre> |
145 | 1 | Serafim J Fagundes | |
146 | h3. Edit .htaccess file for CGI dispatch configuration |
||
147 | 5 | Mauro Mazzieri | |
148 | <pre> |
||
149 | mv htaccess.fcgi.example .htaccess |
||
150 | </pre> |
||
151 | 1 | Serafim J Fagundes | |
152 | h3. Chown and Chmod files for read/write access for the Apache user |
||
153 | |||
154 | 3 | Mischa The Evil | <pre> |
155 | cd .. |
||
156 | 1 | Serafim J Fagundes | chown -R apache:apache redmine-1.x |
157 | chmod -R 755 redmine-1.x |
||
158 | 3 | Mischa The Evil | </pre> |
159 | 2 | Serafim J Fagundes | |
160 | 1 | Serafim J Fagundes | h3. Redmine should be fully installed now and fully usable |
161 | |||
162 | Enjoy! |