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