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
Last revisionBoth sides next revision
project_management:redmine [2010/10/19 17:57] aorthproject_management:redmine [2011/02/22 05:39] – [Updating Redmine from SVN] aorth
Line 1: Line 1:
-====== Redmine project management ====== +====== Redmine Project Management ====== 
-Redmine is a bug tracking, source code and project management web application.  Similar to [[project_management:trac|Trac]].+Redmine is a bug tracking, source code and project management web application (similar to [[project_management:trac|Trac]]).
  
   * Official install guide: http://www.redmine.org/wiki/redmine/RedmineInstall   * Official install guide: http://www.redmine.org/wiki/redmine/RedmineInstall
Line 6: Line 6:
   * Arch Linux wiki guide: http://wiki.archlinux.org/index.php/Redmine_setup   * Arch Linux wiki guide: http://wiki.archlinux.org/index.php/Redmine_setup
  
-====== 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>$ sudo apt-get install build-essential ruby rubygems 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: +===== Configure Redmine =====
-<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 ======+
 Download and unzip the latest stable tarball: Download and unzip the latest stable tarball:
 <code>$ wget http://rubyforge.org/frs/download.php/70486/redmine-0.9.4.tar.gz <code>$ wget http://rubyforge.org/frs/download.php/70486/redmine-0.9.4.tar.gz
 $ tar zxf redmine-0.9.4.tar.gz</code> $ tar zxf redmine-0.9.4.tar.gz</code>
  
-===== Move redmine =====+==== Move redmine ====
 Move redmine somewhere universal, outside of your home folder.  We will configure Apache to serve redmine from this location: Move redmine somewhere universal, outside of your home folder.  We will configure Apache to serve redmine from this location:
  
Line 51: Line 27:
 $ cd /opt/redmine-0.9.4</code> $ cd /opt/redmine-0.9.4</code>
  
-===== Configure the database =====+==== Configure the database ====
 We can either use MySQL or SQLite.  SQLite has less overhead, and I'm not sure if it's any slower so we'll use that. We can either use MySQL or SQLite.  SQLite has less overhead, and I'm not sure if it's any slower so we'll use that.
  
Line 59: Line 35:
    dbfile: db/redmine.db</file>    dbfile: db/redmine.db</file>
  
-===== Initialize the database =====+==== Initialize the database ====
 <code>$ chmod 600 config/database.yml <code>$ chmod 600 config/database.yml
 $ rake rake generate_session_store $ rake rake generate_session_store
Line 65: Line 41:
 $ RAILS_ENV=production rake redmine:load_default_data</code> $ RAILS_ENV=production rake redmine:load_default_data</code>
  
-===== Test the server =====+==== Test the server ====
 Before we can use Redmine with Apache, we have to make sure the installation worked fine.  Use the built-in webserver to test first: Before we can use Redmine with Apache, we have to make sure the installation worked fine.  Use the built-in webserver to test first:
 <code>$ script/server -e production</code> <code>$ script/server -e production</code>
Line 72: Line 48:
 Navigate to http://ip:3000 to see Redmine working.  The default username and password are "admin" Navigate to http://ip:3000 to see Redmine working.  The default username and password are "admin"
  
-====== 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).
  
   * Reference: http://www.modrails.com/install.html   * Reference: http://www.modrails.com/install.html
-  * Also the guide on the [[http://wiki.archlinux.org/index.php/Redmine_setup#Apache_w.2F_Phusion_Passenger|Arch Linux wiki]]+  * http://wiki.brightbox.co.uk/docs:phusion-passenger
  
-==== Install the gem ==== +=== Enable the repository === 
-<code># gem install passenger</code>+<code>$ sudo sh -c 'echo "deb http://apt.brightbox.net lucid main" > /etc/apt/sources.list.d/phusion_passenger.list' 
 +$ sudo sh -c 'wget -q -O - http://apt.brightbox.net/release.asc | apt-key add -' 
 +$ sudo apt-get update</code>
  
-==== Install the Apache module ==== +=== Install the Apache module === 
-Edit the invocation line of the passenger installer program to point to ''ruby1.8'': +<code>$ sudo apt-get install libapache2-mod-passenger</code>
-<file>#!/usr/bin/env ruby1.8</file> +
-Run the installer: +
-<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 redmine.conf ===
-///etc/apache2/conf.d/mod_rails.conf//: +
-<file>LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-2.2.14/ext/apache2/mod_passenger.so +
-PassengerRoot /var/lib/gems/1.8/gems/passenger-2.2.14 +
-PassengerRuby /usr/bin/ruby1.8</file> +
- +
-==== Configure redmine.conf ====+
 ///etc/apache2/conf.d/redmine.conf//: ///etc/apache2/conf.d/redmine.conf//:
 <file>RailsBaseURI /redmine <file>RailsBaseURI /redmine
Line 114: Line 83:
 <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 ==== +=== Fix permissions ===
-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 ====+
 Change permissions so the web server can read/write important files/folders: Change permissions so the web server can read/write important files/folders:
 <code>$ chown -R www-data:www-data /opt/redmine-0.9.4</code> <code>$ chown -R www-data:www-data /opt/redmine-0.9.4</code>
  
-==== Restart Apache ====+=== Restart Apache ===
 <code># apache2ctl graceful</code> <code># apache2ctl graceful</code>
  
-==== Test the install ====+===== Test the install =====
  
 http://ip/redmine http://ip/redmine
  
-====== Migrate Trac projects ======+===== Migrate Trac projects =====
   * Reference: http://www.redmine.org/wiki/1/RedmineMigrate   * Reference: http://www.redmine.org/wiki/1/RedmineMigrate
  
-===== Install sqlite3-ruby =====+==== Install sqlite3-ruby ====
 My Trac 11.x databases were in sqlite3 format, so I needed the ''sqlite3-ruby'' gem: My Trac 11.x databases were in sqlite3 format, so I needed the ''sqlite3-ruby'' gem:
 <code># gem install sqlite3-ruby</code> <code># gem install sqlite3-ruby</code>
  
-===== Migrate project =====+==== Migrate project ====
 From the Redmine directory: From the Redmine directory:
 <code># rake redmine:migrate_from_trac RAILS_ENV="production" <code># rake redmine:migrate_from_trac RAILS_ENV="production"
Line 172: Line 130:
 Make sure you don't use spaces in the project identifier; this is part of the URL path for the Redmine interface. Make sure you don't use spaces in the project identifier; this is part of the URL path for the Redmine interface.
  
-====== Active Directory Authentication ======+===== Active Directory Authentication =====
 None of this seems to work... None of this seems to work...
  
Line 179: Line 137:
   * Reference: http://www.redmine.org/wiki/1/RedmineLDAP   * Reference: http://www.redmine.org/wiki/1/RedmineLDAP
  
-===== Patch =====+==== Patch ====
 http://www.redmine.org/issues/4283 http://www.redmine.org/issues/4283
  
Line 185: Line 143:
 # patch -p1 < /home/aorth/src/lookup_LDAP_attributes_as_user.patch</code> # patch -p1 < /home/aorth/src/lookup_LDAP_attributes_as_user.patch</code>
  
-====== Updating Redmine from SVN ====== +===== Updating Redmine from SVN ===== 
-See the [[http://www.redmine.org/wiki/redmine/RedmineUpgrade#Option-2-Upgrading-from-a-SVN-checkout|the official instructions]] on upgrading via SVN.  Also done below on a real instance, 1.0.0 -> 1.0.1: +See the [[http://www.redmine.org/wiki/redmine/RedmineUpgrade#Option-2-Upgrading-from-a-SVN-checkout|the official instructions]] on upgrading via SVN.  Also done below as root on a real instance, 1.0.0 -> 1.0.1: 
-<code>cd /opt +<code>cd /opt 
-tar cjf redmine_before_1.0.1.tar.bz2 redmine/ +tar cjf redmine_before_1.0.1.tar.bz2 redmine/ 
-cd redmine +cd redmine 
-svn update +svn update 
-rake db:migrate RAILS_ENV=production +rake db:migrate RAILS_ENV=production 
-rake db:migrate_plugins RAILS_ENV=production +rake db:migrate_plugins RAILS_ENV=production 
-rake tmp:cache:clear +rake tmp:cache:clear 
-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>