HowTo install Redmine on CentOS 5 » History » Version 4
Neil McFarlane, 2011-01-24 21:27
Casing
| 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 | 1 | Serafim J Fagundes | h3. Get Ruby |
| 17 | |||
| 18 | 3 | Mischa The Evil | <pre> |
| 19 | cd ~/Downloads # YOUR FOLDER OF CHOICE |
||
| 20 | 1 | Serafim J Fagundes | ftp ftp.ruby-lang.org |
| 21 | cd /pub/ruby |
||
| 22 | get ruby-1.8.7.pXXX.tar.gz |
||
| 23 | tar zxvf ruby-1.8.7.pXXX.tar.gz ruby-1.8.7.pXXX |
||
| 24 | cd ruby-1.8.7.pXXX |
||
| 25 | ./configure |
||
| 26 | make |
||
| 27 | make install |
||
| 28 | ruby -v |
||
| 29 | which ruby |
||
| 30 | cd .. |
||
| 31 | 3 | Mischa The Evil | </pre> |
| 32 | 1 | Serafim J Fagundes | |
| 33 | h3. Get Gems |
||
| 34 | |||
| 35 | 3 | Mischa The Evil | <pre> |
| 36 | wget http://production.cf.rubygems.org/rubygems/rubygems-1.x.tgz |
||
| 37 | 1 | Serafim J Fagundes | tar zxvf rubygems-1.x.tgz rubygems-1.x |
| 38 | cd rubygems-1.x |
||
| 39 | ruby setup.rb |
||
| 40 | gem -v |
||
| 41 | which gem |
||
| 42 | cd .. |
||
| 43 | 3 | Mischa The Evil | </pre> |
| 44 | 1 | Serafim J Fagundes | |
| 45 | h3. Install Passenger |
||
| 46 | |||
| 47 | 3 | Mischa The Evil | <pre> |
| 48 | gem install passenger |
||
| 49 | 1 | Serafim J Fagundes | passenger-install-apache2-module |
| 50 | 3 | Mischa The Evil | </pre> |
| 51 | 1 | Serafim J Fagundes | |
| 52 | h3. Restart Apache |
||
| 53 | |||
| 54 | h3. Download Redmine |
||
| 55 | |||
| 56 | 3 | Mischa The Evil | <pre> |
| 57 | wget http://rubyforge.org/frs/download.php/73692/redmine-1.x.tar.gz # GET LATEST VERSION ON RUBYFORGE |
||
| 58 | 1 | Serafim J Fagundes | tar zxvf redmine-1.x.tar.gz redmine-1.x |
| 59 | 3 | Mischa The Evil | </pre> |
| 60 | 1 | Serafim J Fagundes | |
| 61 | h3. Copy the folder to its HTTP document root folder |
||
| 62 | |||
| 63 | 3 | Mischa The Evil | <pre>cp redmine-1.x /var/www/redmine-1.x</pre> |
| 64 | 1 | Serafim J Fagundes | |
| 65 | h3. Configure Apache to host the documents |
||
| 66 | |||
| 67 | h3. Install Bundler |
||
| 68 | |||
| 69 | 4 | Neil McFarlane | <pre>gem install bundler</pre> |
| 70 | 1 | Serafim J Fagundes | |
| 71 | h3. Add the Bundler Boot and preinitializer code |
||
| 72 | |||
| 73 | 3 | Mischa The Evil | For more info go to the "Bundler site":http://gembundler.com/. |
| 74 | 1 | Serafim J Fagundes | |
| 75 | h3. Create the Gemfile and register these gems in it |
||
| 76 | |||
| 77 | 3 | Mischa The Evil | * @"rake"@, "0.8.3" |
| 78 | * @"rack"@, "1.0.1" |
||
| 79 | * @"i18n"@, "0.3.7" |
||
| 80 | * @"rubytree"@, "0.5.2", :require => "tree" |
||
| 81 | * @"RedCloth"@, "~>4.2.3", :require => "redcloth" # for CodeRay |
||
| 82 | * @"mysql"@ |
||
| 83 | 1 | Serafim J Fagundes | |
| 84 | 3 | Mischa The Evil | <pre>bundle install</pre> |
| 85 | 1 | Serafim J Fagundes | |
| 86 | h3. Create the Redmine MySQL database |
||
| 87 | |||
| 88 | h3. Configure database.yml (rename database.yml.example) |
||
| 89 | |||
| 90 | h3. Set the production environment (optional) |
||
| 91 | |||
| 92 | Uncomment the following line: |
||
| 93 | |||
| 94 | 3 | Mischa The Evil | <pre>ENV['RAILS_ENV'] ||= 'production'</pre> |
| 95 | 1 | Serafim J Fagundes | |
| 96 | h3. Generate the session store |
||
| 97 | |||
| 98 | 3 | Mischa The Evil | <pre>RAILS_ENV=production bundle exec rake generate_session_store</pre> |
| 99 | 1 | Serafim J Fagundes | |
| 100 | h3. Migrate the database models |
||
| 101 | |||
| 102 | 3 | Mischa The Evil | <pre>RAILS_ENV=production bundle exec rake db:migrate</pre> |
| 103 | 1 | Serafim J Fagundes | |
| 104 | h3. Load default data (optional) |
||
| 105 | |||
| 106 | 3 | Mischa The Evil | <pre>RAILS_ENV=production bundle exec rake redmine:load_default_data</pre> |
| 107 | 1 | Serafim J Fagundes | |
| 108 | Follow instructions. |
||
| 109 | |||
| 110 | h3. Rename dispatch CGI files |
||
| 111 | |||
| 112 | 3 | Mischa The Evil | <pre> |
| 113 | mv dispatch.cgi.example dispatch.cgi |
||
| 114 | 1 | Serafim J Fagundes | mv dispatch.fcgi.example dispatch.fcgi |
| 115 | mv dispatch.rb.example dispatch.rb |
||
| 116 | 3 | Mischa The Evil | </pre> |
| 117 | 1 | Serafim J Fagundes | |
| 118 | h3. Edit .htaccess file for CGI dispatch configuration |
||
| 119 | |||
| 120 | h3. Chown and Chmod files for read/write access for the Apache user |
||
| 121 | |||
| 122 | 3 | Mischa The Evil | <pre> |
| 123 | cd .. |
||
| 124 | 1 | Serafim J Fagundes | chown -R apache:apache redmine-1.x |
| 125 | chmod -R 755 redmine-1.x |
||
| 126 | 3 | Mischa The Evil | </pre> |
| 127 | 2 | Serafim J Fagundes | |
| 128 | 1 | Serafim J Fagundes | h3. Redmine should be fully installed now and fully usable |
| 129 | |||
| 130 | Enjoy! |