Project

General

Profile

HowTo Install Redmine on Debian Wheezy Testing with MySQL and Apache2-Passenger » History » Revision 2

Revision 1 (Gergely Szabo, 2011-03-29 15:18) → Revision 2/10 (Gergely Szabo, 2011-03-29 15:24)

h1. Installation on Debian Wheezy Testing 

 This page describes the installation of Redmine on Debian Wheezy Testing, as of 29 March 2011. 
 It's actually a Linux Mint Debian Edition (LMDE) virtual server. 

 First, the most important fact: it does not work out of the box. But it's very easy to fix (thanks to Jérémy Lal). See below. below 

 The used configuration contains an Apache2 webserver, its Ruby-interface Passenger and a MySQL database. 

 h2. Preparation 

 All command lines below assume you're root. 
 <pre> 
 # apt-get update 
 # apt-get install apache2 
 # apt-get install mysql-server 
 </pre> 

 The mysql-server installation will guide you through the process of creating an administrative (root) account. Don't forget the password! 

 h2. Install Redmine 

 This is the tricky part. Debian Wheezy contains Redmine 1.0.5-1, which requires RubyGems 1.3.x or 1.4.x. But Wheezy comes with RubyGems 1.6.2. It breaks during installation. Click for related "Redmine Wiki page":http://www.redmine.org/projects/redmine/wiki/RedmineInstall. 

 There are two ways out: 
 * downgrade RubyGems 
 * take a much newer Redmine (1.1.2) from Debian Experimental 

 I chose the second option, as the new Gantt-charts are also available from 1.1.0. 

 First, Fist let's enable the Debian Experimental repositories (see "Debian Wiki":http://wiki.debian.org/DebianExperimental): 

 Add the line below to /etc/apt/sources.list: 
 <pre> 
 deb http://ftp.debian.org/debian experimental main 
 </pre> 

 Then install Redmine 1.1.2: 
 <pre> 
 # apt-get update 
 # apt-get -t experimental install redmine-mysql 
 # apt-get -t experimental install redmine 
 # apt-get install libapache2-mod-passenger 
 </pre> 

 Redmine's missing dependencies will be installed too, mostly exotic Ruby-related stuff (ruby, rails, rake etc.) 

 Redmine installation will also prompt you for the MySQL admin password (I told you to remember it), then it'll create the database called redmine_default and MySQL user redmine. You can specify its password or let the installer generate a random password. 

 All database settings, including the password, are stored here: 
 <pre> 
 /etc/redmine/default/database.yml 
 </pre> 

 h2. Start Redmine 

 We have to configure the Apache2 webserver to start running the Redmine application. 

 Create a symlink from the webserver doc root to redmine: 
 <pre> 
 # ln -s /usr/share/redmine/public /var/www/redmine 
 </pre> 

 Passenger should run as user www-data (same as Apache2). Add the line below to /etc/apache2/mods-available/passenger.conf: 
 <pre> 
     PassengerDefaultUser www-data 
 </pre> 

 Add the /var/www/redmine location in /etc/apache2/sites-available/default: 
 <pre> 
     <Directory /var/www/redmine> 
         RailsBaseURI /redmine 
         PassengerResolveSymlinksInDocumentRoot on 
     </Directory> 
 </pre> 

 Usually the Passenger module is enabled during installation (libapache2-mod-passenger). If not, enable it manually: 
 <pre> 
 # a2enmod passenger 
 </pre> 

 And last but not least, restart apache2: 
 <pre> 
 # /etc/init.d/apache2 restart 
 </pre> 

 Your new Communist Underground Movement a.k.a. Redmine is now available here: 
 <pre> 
 http://yourservername/redmine 
 </pre>