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