HowTo install Redmine on CentOS 5 » History » Version 34
Nick Shel, 2012-03-05 11:29
1 | 27 | Yu Kobayashi | h1. HowTo install Redmine on CentOS 5 or 6 |
---|---|---|---|
2 | 1 | Serafim J Fagundes | |
3 | 3 | Mischa The Evil | {{>toc}} |
4 | 3 | Mischa The Evil | |
5 | 31 | Nick Shel | h2. Assumptions |
6 | 33 | Nick Shel | |
7 | 34 | Nick Shel | * Apache is up and running |
8 | 34 | Nick Shel | * Apache has previously been used and works quite well |
9 | 34 | Nick Shel | * MySQL is up and running |
10 | 34 | Nick Shel | * 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 | 30 | Nick Shel | |
14 | 34 | Nick Shel | h2. Steps to take |
15 | 1 | Serafim J Fagundes | |
16 | 1 | Serafim J Fagundes | h3. Install gem and passenger dependencies |
17 | 1 | Serafim J Fagundes | |
18 | 33 | Nick Shel | <pre> |
19 | 3 | Mischa The Evil | yum -y install zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql-devel |
20 | 28 | Nick Shel | </pre> |
21 | 28 | Nick Shel | |
22 | 28 | Nick Shel | h3. Get Ruby |
23 | 28 | Nick Shel | |
24 | 28 | Nick Shel | <pre> |
25 | 34 | Nick Shel | cd ~/Downloads # YOUR FOLDER OF CHOICE |
26 | 34 | Nick Shel | ftp ftp.ruby-lang.org |
27 | 34 | Nick Shel | cd /pub/ruby |
28 | 34 | Nick Shel | get ruby-1.8.7.pXXX.tar.gz |
29 | 34 | Nick Shel | tar zxvf ruby-1.8.7.pXXX.tar.gz |
30 | 34 | Nick Shel | cd ruby-1.8.7.pXXX |
31 | 28 | Nick Shel | ./configure |
32 | 1 | Serafim J Fagundes | make |
33 | 1 | Serafim J Fagundes | make install |
34 | 28 | Nick Shel | ruby -v |
35 | 28 | Nick Shel | which ruby |
36 | 1 | Serafim J Fagundes | cd .. |
37 | 3 | Mischa The Evil | </pre> |
38 | 1 | Serafim J Fagundes | |
39 | 18 | Johannes M. | h3. Get Gems 1.4.2 (does not work with Gems 1.5) |
40 | 1 | Serafim J Fagundes | |
41 | 3 | Mischa The Evil | <pre> |
42 | 18 | Johannes M. | wget http://production.cf.rubygems.org/rubygems/rubygems-1.4.2.tgz |
43 | 19 | Johannes M. | tar zxvf rubygems-1.4.2.tgz |
44 | 18 | Johannes M. | cd rubygems-1.4.2 |
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 | 26 | Anonymous | h3. Install Passenger (requires gcc) |
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 | 1 | Serafim J Fagundes | </pre> |
57 | 1 | Serafim J Fagundes | |
58 | 26 | Anonymous | An alternate method is to install mod_passenger RPM for Apache from the following location: |
59 | 26 | Anonymous | http://passenger.stealthymonkeys.com/ |
60 | 26 | Anonymous | |
61 | 26 | Anonymous | RHEL/CentOS 5 |
62 | 26 | Anonymous | <pre> |
63 | 26 | Anonymous | rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm |
64 | 26 | Anonymous | yum install mod_passenger |
65 | 26 | Anonymous | </pre> |
66 | 26 | Anonymous | |
67 | 26 | Anonymous | RHEL/CentOS 6 |
68 | 26 | Anonymous | <pre> |
69 | 26 | Anonymous | rpm --import http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc |
70 | 26 | Anonymous | yum install http://passenger.stealthymonkeys.com/rhel/6/passenger-release.noarch.rpm |
71 | 26 | Anonymous | yum install mod_passenger |
72 | 26 | Anonymous | </pre> |
73 | 26 | Anonymous | |
74 | 8 | Erwin Baeyens | h3. Restart Apache |
75 | 1 | Serafim J Fagundes | |
76 | 1 | Serafim J Fagundes | <pre>service httpd restart</pre> |
77 | 3 | Mischa The Evil | |
78 | 1 | Serafim J Fagundes | h3. Download Redmine |
79 | 1 | Serafim J Fagundes | |
80 | 26 | Anonymous | Download page: http://rubyforge.org/frs/?group_id=1850 |
81 | 26 | Anonymous | |
82 | 16 | Steven Verbeek | <pre> |
83 | 26 | Anonymous | wget http://rubyforge.org/frs/download.php/75597/redmine-1.3.0.tar.gz # GET LATEST VERSION ON RUBYFORGE |
84 | 26 | Anonymous | tar zxvf redmine-1.3.0.tar.gz |
85 | 1 | Serafim J Fagundes | </pre> |
86 | 1 | Serafim J Fagundes | |
87 | 1 | Serafim J Fagundes | h3. Copy the folder to its HTTP document root folder |
88 | 16 | Steven Verbeek | |
89 | 26 | Anonymous | <pre>cp -av redmine-1.3.0/* /var/www/redmine</pre> |
90 | 1 | Serafim J Fagundes | |
91 | 1 | Serafim J Fagundes | h3. Configure Apache to host the documents |
92 | 10 | Erwin Baeyens | |
93 | 10 | Erwin Baeyens | more information can be found here: [[HowTo configure Apache to run Redmine]] |
94 | 1 | Serafim J Fagundes | |
95 | 1 | Serafim J Fagundes | h3. Install Bundler |
96 | 4 | Neil McFarlane | |
97 | 1 | Serafim J Fagundes | <pre>gem install bundler</pre> |
98 | 1 | Serafim J Fagundes | |
99 | 1 | Serafim J Fagundes | h3. Add the Bundler Boot and preinitializer code |
100 | 3 | Mischa The Evil | |
101 | 1 | Serafim J Fagundes | For more info go to the "Bundler site":http://gembundler.com/. |
102 | 1 | Serafim J Fagundes | |
103 | 1 | Serafim J Fagundes | h3. Create the Gemfile and register these gems in it |
104 | 22 | Johannes M. | |
105 | 8 | Erwin Baeyens | <pre>vi /var/www/redmine/Gemfile</pre> |
106 | 20 | Johannes M. | |
107 | 22 | Johannes M. | <pre> |
108 | 20 | Johannes M. | # file: /var/www/redmine/Gemfile |
109 | 21 | Johannes M. | source "http://rubygems.org" |
110 | 21 | Johannes M. | gem "rake", "0.8.3" |
111 | 21 | Johannes M. | gem "rack", "1.1.0" |
112 | 21 | Johannes M. | gem "i18n", "0.4.2" |
113 | 21 | Johannes M. | gem "rubytree", "0.5.2", :require => "tree" |
114 | 21 | Johannes M. | gem "RedCloth", "~>4.2.3", :require => "redcloth" # for CodeRay |
115 | 21 | Johannes M. | gem "mysql" |
116 | 20 | Johannes M. | gem "coderay", "~>0.9.7" |
117 | 1 | Serafim J Fagundes | </pre> |
118 | 3 | Mischa The Evil | |
119 | 1 | Serafim J Fagundes | <pre>bundle install</pre> |
120 | 1 | Serafim J Fagundes | |
121 | 1 | Serafim J Fagundes | h3. Create the Redmine MySQL database |
122 | 23 | Johannes M. | |
123 | 23 | Johannes M. | <pre> |
124 | 23 | Johannes M. | yum install mysql-server |
125 | 23 | Johannes M. | chkconfig mysqld on |
126 | 23 | Johannes M. | service mysqld start |
127 | 23 | Johannes M. | /usr/bin/mysql_secure_installation |
128 | 23 | Johannes M. | </pre> |
129 | 1 | Serafim J Fagundes | |
130 | 23 | Johannes M. | > For MySQL: |
131 | 11 | Erwin Baeyens | > start the mysql client (@mysql -u root -p@) and enter the following commands |
132 | 11 | Erwin Baeyens | > > <pre>create database redmine character set utf8; |
133 | 11 | Erwin Baeyens | create user 'redmine'@'localhost' identified by 'my_password'; |
134 | 10 | Erwin Baeyens | grant all privileges on redmine.* to 'redmine'@'localhost'; </pre> |
135 | 11 | Erwin Baeyens | |
136 | 11 | Erwin Baeyens | > For versions of MySQL prior to 5.0.2 - skip the 'create user' step and instead: |
137 | 11 | Erwin Baeyens | |
138 | 9 | Erwin Baeyens | > > <pre> grant all privileges on redmine.* to 'redmine'@'localhost' identified by 'my_password';</pre> |
139 | 24 | Johannes M. | |
140 | 1 | Serafim J Fagundes | h3. Configure /var/www/redmine/config/database.yml (rename database.yml.example) |
141 | 1 | Serafim J Fagundes | |
142 | 1 | Serafim J Fagundes | h3. Set the production environment (optional) |
143 | 7 | Thibault B | |
144 | 1 | Serafim J Fagundes | Uncomment the following line in file redmine/config/environment.rb: |
145 | 3 | Mischa The Evil | |
146 | 1 | Serafim J Fagundes | <pre>ENV['RAILS_ENV'] ||= 'production'</pre> |
147 | 1 | Serafim J Fagundes | |
148 | 1 | Serafim J Fagundes | h3. Generate the session store |
149 | 3 | Mischa The Evil | |
150 | 1 | Serafim J Fagundes | <pre>RAILS_ENV=production bundle exec rake generate_session_store</pre> |
151 | 1 | Serafim J Fagundes | |
152 | 1 | Serafim J Fagundes | h3. Migrate the database models |
153 | 3 | Mischa The Evil | |
154 | 1 | Serafim J Fagundes | <pre>RAILS_ENV=production bundle exec rake db:migrate</pre> |
155 | 1 | Serafim J Fagundes | |
156 | 1 | Serafim J Fagundes | h3. Load default data (optional) |
157 | 3 | Mischa The Evil | |
158 | 1 | Serafim J Fagundes | <pre>RAILS_ENV=production bundle exec rake redmine:load_default_data</pre> |
159 | 1 | Serafim J Fagundes | |
160 | 1 | Serafim J Fagundes | Follow instructions. |
161 | 25 | Johannes M. | |
162 | 1 | Serafim J Fagundes | h3. Rename dispatch CGI files in /var/www/redmine/public/ |
163 | 3 | Mischa The Evil | |
164 | 3 | Mischa The Evil | <pre> |
165 | 1 | Serafim J Fagundes | mv dispatch.cgi.example dispatch.cgi |
166 | 1 | Serafim J Fagundes | mv dispatch.fcgi.example dispatch.fcgi |
167 | 3 | Mischa The Evil | mv dispatch.rb.example dispatch.rb |
168 | 1 | Serafim J Fagundes | </pre> |
169 | 1 | Serafim J Fagundes | |
170 | 5 | Mauro Mazzieri | h3. Edit .htaccess file for CGI dispatch configuration |
171 | 5 | Mauro Mazzieri | |
172 | 5 | Mauro Mazzieri | <pre> |
173 | 5 | Mauro Mazzieri | mv htaccess.fcgi.example .htaccess |
174 | 1 | Serafim J Fagundes | </pre> |
175 | 1 | Serafim J Fagundes | |
176 | 1 | Serafim J Fagundes | h3. Chown and Chmod files for read/write access for the Apache user |
177 | 3 | Mischa The Evil | |
178 | 3 | Mischa The Evil | <pre> |
179 | 1 | Serafim J Fagundes | cd .. |
180 | 1 | Serafim J Fagundes | chown -R apache:apache redmine-1.x |
181 | 3 | Mischa The Evil | chmod -R 755 redmine-1.x |
182 | 2 | Serafim J Fagundes | </pre> |
183 | 1 | Serafim J Fagundes | |
184 | 1 | Serafim J Fagundes | h3. Redmine should be fully installed now and fully usable |
185 | 1 | Serafim J Fagundes | |
186 | 1 | Serafim J Fagundes | Enjoy! |