Redmine+Apache+Passenger InstallOnRedHat » History » Version 2
Neil McFarlane, 2011-01-27 16:57
Added passenger default user line
1 | 1 | Neil McFarlane | h1. Redmine 1.1.0 + Apache + Passenger installation on Red Hat to a sub-URI |
---|---|---|---|
2 | |||
3 | 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: |
||
4 | |||
5 | * You have a MySQL server up and running |
||
6 | * You have Apache Web Server up and running |
||
7 | |||
8 | h2. Install Ruby and required gems |
||
9 | |||
10 | # Get and install Ruby |
||
11 | # Get and install Gems |
||
12 | # <code>gem install rails -v=2.3.5</code> |
||
13 | # <code>gem install -v=0.4.2 i18n</code> |
||
14 | # <code>gem install mysql</code> |
||
15 | # <code>gem install rake -v=0.8.3</code> |
||
16 | # <code>gem install rack -v=1.0.1</code> |
||
17 | # <code>gem install RedCloth</code> |
||
18 | # <code>gem install passenger</code> |
||
19 | # <code>passenger-install-apache2-module</code> |
||
20 | |||
21 | h2. Install Redmine |
||
22 | |||
23 | # Get and untar Redmine to some location |
||
24 | # <code>export REDMINE_HOME=LOCATION_YOU_PLACED_REDMINE</code> |
||
25 | # <code>cd $REDMINE_HOME</code> |
||
26 | # <code>rake generate_session_store</code> |
||
27 | # <code>RAILS_ENV=production rake db:migrate</code> |
||
28 | # <code>RAILS_ENV=production rake redmine:load_default_data</code> (select "en" for language) |
||
29 | # <code>ruby script/server webrick -e production</code> (used to test that Redmine works on WEBrick, shutdown after test) |
||
30 | |||
31 | h2. Configure Apache to run Redmine |
||
32 | |||
33 | # <code>cd $REDMINE_HOME</code> |
||
34 | # <code>chown -R apache:apache files log tmp vendor</code> |
||
35 | # <code>cd $REDMINE_HOME/public</code> |
||
36 | # <code>mv dispatch.cgi.example dispatch.cgi</code> |
||
37 | # <code>mv dispatch.fcgi.example dispatch.fcgi</code> |
||
38 | # <code>mv dispatch.rb.example dispatch.rb</code> |
||
39 | # Edit dispatch.cgi and add the following lines |
||
40 | #* <code>#!/usr/local/bin/ruby</code> |
||
41 | #* <code>require /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/dispatcher.rb</code> |
||
42 | # Edit <code>$REDMINE_HOME/config/environment.rb</code> and add the following to the bottom: <code>Redmine::Utils::relative_url_root = "/redmine"</code> |
||
43 | # Edit <code>/etc/httpd/httpd.conf</code> and add the following lines |
||
44 | <pre> |
||
45 | LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2/ext/apache2/mod_passenger.so |
||
46 | PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2 |
||
47 | PassengerRuby /usr/local/bin/ruby |
||
48 | |||
49 | <VirtualHost *> |
||
50 | ServerName YOUR_SERVER |
||
51 | DocumentRoot YOUR_EXISTING_DOCUMENT_ROOT |
||
52 | RailsEnv production |
||
53 | RailsBaseURI /redmine |
||
54 | 2 | Neil McFarlane | PassengerDefaultUser apache |
55 | 1 | Neil McFarlane | </VirtualHost> |
56 | </pre> |
||
57 | # <code>sudo ln -s $REDMINE_HOME/public YOUR_EXISTING_DOCUMENT_ROOT/redmine</code> |
||
58 | # Modify <code>$REDMINE_HOME/config/environment.rb</code> to add the following: |
||
59 | <pre> |
||
60 | # The below line is already in the file |
||
61 | Rails::Initializer.run do |config| |
||
62 | # A bunch of stuff |
||
63 | config.action_controller.relative_url_root = '/redmine' # add this line here! |
||
64 | end |
||
65 | </pre> |
||
66 | |||
67 | h2. References |
||
68 | |||
69 | * "How to install Redmine on CentOS 5":http://www.redmine.org/projects/redmine/wiki/HowTo_install_Redmine_on_CentOS_5 |
||
70 | * "HowTo_Install_Redmine_in_a_sub-URI":http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_in_a_sub-URI |
||
71 | * "Rails Passenger":http://wiki.rubyonrails.org/deployment/apache-passenger |