User Tools

Site Tools


project_management:redmine

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
project_management:redmine [2010/10/19 17:59] aorthproject_management:redmine [2011/01/26 14:08] – [Install Phusion Passenger] aorth
Line 7: Line 7:
  
 ===== Install dependencies ===== ===== Install dependencies =====
-==== aptitude ==== +==== apt-get ==== 
-<code># aptitude install build-essential rake ruby1.8 ruby1.8-dev irb1.8 rdoc1.8 zlib1g-dev libopenssl-ruby1.8 libzlib-ruby libssl-dev rubygems1.8</code>+<code># apt-get install build-essential ruby rubygems libopenssl-ruby libopenssl-ruby libsqlite3-dev</code>
  
-==== Download ruby gems ==== +==== Ruby gems ==== 
-Problems I faced: +<code>sudo gem install rails -v=2.3.5 
-  * DNS is screwed up for rubyforge.org and rubygems.org. +sudo gem install sqlite3 
-  * rubyforge.org has old versions of some gems (rails!) +sudo gem install fastthread 
- +sudo gem install -v=0.4.2 i18n</code>
-You SHOULD be able to ''gem install'' the modules, but I downloaded them all manually and installed manually.  It turns out it was a DNS issue, and I had to add some entries to the machine's ///etc/hosts// file: +
-<file>216.137.39.169  production.cf.rubygems.org d2chzxaqi4y7f8.cloudfront.net +
-72.21.202.165   production.s3.rubygems.org</file> +
-Don't ask.  I guess they are using the "cloud" and Amazon to host the files.  I found these IPs from doing DNS queries outside ILRI. +
- +
-<code>wget http://rubygems.org/downloads/rack-1.0.1.gem +
-$ wget http://rubygems.org/downloads/rails-2.3.5.gem +
-wget http://rubygems.org/downloads/mysql-2.8.1.gem +
-$ wget http://rubygems.org/downloads/sqlite3-ruby-1.3.0.gem +
-wget http://rubygems.org/downloads/rake-0.8.7.gem +
-wget http://rubygems.org/downloads/fastthread-1.0.7.gem</code> +
- +
-==== Install gems ==== +
-Rake, for building gems: +
-<code># gem install rake-0.8.3.gem</code> +
-Make sure you can execute the ''rake'' binary: +
-<code># cd /usr/local/bin/ +
-# ln -s /var/lib/gems/1.8/bin/rake</code> +
-Continue installing gems: +
-<code># gem install rack-1.0.1.gem +
-# gem install fastthread-1.0.7.gem +
-# gem install mysql-2.8.1.gem +
-# gem install sqlite3-ruby-1.3.0.gem +
-# gem install rails-2.3.5.gem</code>+
  
 ===== Configure Redmine ===== ===== Configure Redmine =====
Line 74: Line 50:
 ===== Configure Apache ===== ===== Configure Apache =====
  
-==== Install Phusion Passenger ====+===== Install Phusion Passenger =====
 Phusion Passenger ("mod_rails") is an Apache module which allows Apache to run ruby code (like mod_perl, mod_php, etc). Phusion Passenger ("mod_rails") is an Apache module which allows Apache to run ruby code (like mod_perl, mod_php, etc).
  
Line 84: Line 60:
  
 === Install the Apache module === === Install the Apache module ===
-Edit the invocation line of the passenger installer program to point to ''ruby1.8'': +Edit the invocation line of the passenger installer program to point to ''ruby1.8'' instead of ''ruby'': 
-<file>#!/usr/bin/env ruby1.8</file>+<code># vim /var/lib/gems/1.8/gems/passenger-2.2.14/bin/passenger-install-apache2-module</code>
 Run the installer: Run the installer:
 <code># /var/lib/gems/1.8/gems/passenger-2.2.14/bin/passenger-install-apache2-module</code> <code># /var/lib/gems/1.8/gems/passenger-2.2.14/bin/passenger-install-apache2-module</code>
  
 === Configure Apache settings === === Configure Apache settings ===
-Apache will serve Redmine via FastCGI using the included ''dispatch.fcgi'' script.  This is much faster than using Webrick or regular CGI.+Apache will serve Redmine via Phusion Passenger, which doesn't rely on CGI or FastCGI!  Make sure the .htaccess in ''redmine/public'' is not enabled or it might try to serve Redmine via ''dispatch.cgi''.
  
 === Configure mod_rail.conf === === Configure mod_rail.conf ===
Line 113: Line 89:
 Link the Redmine installation to the web document root; make sure to use the same name as in your Apache configuration: Link the Redmine installation to the web document root; make sure to use the same name as in your Apache configuration:
 <code># ln -s /opt/redmine-0.9.4/public/ /var/www/redmine</code> <code># ln -s /opt/redmine-0.9.4/public/ /var/www/redmine</code>
- 
-=== Fix dispatch.fcgi === 
-Rename it and make sure its executable: 
-<code>$ mv public/dispatch.fcgi.example public/dispatch.fcgi 
-$ chmod 755 public/dispatch.fcgi</code> 
- 
-Edit the invocation line in the FastCGI script to make sure it points to your ruby version (''ruby1.8''), and that the ''dispatcher'' line is correct: 
-<file>#!/usr/bin/env ruby1.8 
-... 
-require "/var/lib/gems/1.8/gems/rails-2.3.5/lib/dispatcher.rb" 
-...</file> 
  
 === Fix permissions === === Fix permissions ===
Line 196: Line 161:
 # rake tmp:sessions:clear # rake tmp:sessions:clear
 # apache2ctl graceful</code> # apache2ctl graceful</code>
 +
 +===== Change local administrator password manually =====
 +<code># cd /opt/redmine
 +# RAILS_ENV=production ruby1.8 script/runner 'user = User.find(:first, :conditions => {:admin => true}) ; user.password, user.password_confirmation = "my_password"; user.save!'</code>