Project

General

Profile

Actions

Redmine 1.1.0 + Apache + Passenger installation on Red Hat to a sub-URI

This guide line takes you through a new Redmine v. 1.1.0 installation on Red Hat Linux including the use of Passenger on Apache. The following assumptions are made:

  • You have a MySQL server up and running
  • You have Apache Web Server up and running

Install Ruby and required gems

  1. Get and install Ruby
  2. Get and install Gems
  3. gem install rails -v=2.3.5
  4. gem install -v=0.4.2 i18n
  5. gem install mysql
  6. gem install rake -v=0.8.3
  7. gem install rack -v=1.0.1
  8. gem install RedCloth
  9. gem install passenger
  10. passenger-install-apache2-module

Install Redmine

  1. Get and untar Redmine to some location
  2. export REDMINE_HOME=LOCATION_YOU_PLACED_REDMINE
  3. cd $REDMINE_HOME
  4. rake generate_session_store
  5. RAILS_ENV=production rake db:migrate
  6. RAILS_ENV=production rake redmine:load_default_data (select "en" for language)
  7. ruby script/server webrick -e production (used to test that Redmine works on WEBrick, shutdown after test)

Configure Apache to run Redmine

  1. cd $REDMINE_HOME
  2. chown -R apache:apache files log tmp vendor
  3. cd $REDMINE_HOME/public
  4. mv dispatch.cgi.example dispatch.cgi
  5. mv dispatch.fcgi.example dispatch.fcgi
  6. mv dispatch.rb.example dispatch.rb
  7. Edit dispatch.cgi and add the following lines
    • #!/usr/local/bin/ruby
    • require /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/dispatcher.rb
  8. Edit $REDMINE_HOME/config/environment.rb and add the following to the bottom: Redmine::Utils::relative_url_root = "/redmine"
  9. Edit /etc/httpd/httpd.conf and add the following lines
       LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2/ext/apache2/mod_passenger.so
       PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2
       PassengerRuby /usr/local/bin/ruby
    
    <VirtualHost *>
      ServerName YOUR_SERVER
      DocumentRoot YOUR_EXISTING_DOCUMENT_ROOT
      RailsEnv production
      RailsBaseURI /redmine
      PassengerDefaultUser apache
    </VirtualHost>
    
  10. sudo ln -s $REDMINE_HOME/public YOUR_EXISTING_DOCUMENT_ROOT/redmine
  11. Modify $REDMINE_HOME/config/environment.rb to add the following:
    # The below line is already in the file
    Rails::Initializer.run do |config|
      # A bunch of stuff
      config.action_controller.relative_url_root = '/redmine'    # add this line here!
    end
    

References

Updated by Neil McFarlane about 13 years ago ยท 2 revisions