Thursday, June 10, 2010

How to install Redmine on Ubuntu 10.04

This was a huge struggle for me until i found the following blog:

Here is what i did to make this work plus some of my edits as i ran into a couple problems:


Introduciton

Redmine is an open source, web-based project management and bug-tracking tool. It includes calendar and gantt charts to aid visual representation of projects and their deadlines. It supports multiple projects. Redmine is free and open source software which provides integrated project management features, issue tracking, and support for multiple version control options.

The design of Redmine is significantly influenced by Trac, a software package with some similar features.

Redmine is written using the Ruby on Rails framework. It is cross-platform and cross-database.

Installation Steps
The following are my steps to install it on the new Ubuntu 10.04 system:
1) install mysql server & phpmyadmin tool
$ sudo apt-get install mysql-server phpmyadmin
You can just set all initial passwords to 'admin'. When finished, you can use http://localhost/phpmyadmin to manage your databases.

2) change mysql database directory (optional, I just want to store it in the /srv directory)
$ mysqladmin -u root -p shutdown
$ sudo mv /var/lib/mysql /srv/
$ sudo nano /etc/mysql/my.cnf (change datadir value from "/var/lib/mysql" to "/srv/mysql")
$ sudo nano /etc/apparmor.d/usr.sbin.mysqld (replace all "/var/lib/mysql" to "/srv/mysql")
$ sudo /etc/init.d/mysql restart (FIXME: doesn't work, I just reboot the system instead)

3) install redmine & redmine-mysql
$ sudo apt-get install redmine redmine-mysql

4) install rails...
$ sudo apt-get install mongrel ruby1.8-dev

5) change redmine files default directory (optional, I prefer to store them in the /srv directory)
$ sudo mv /var/lib/redmine /srv/
$ sudo nano /usr/share/redmine/config/ennanoronment.rb (replace all "/var/lib" to "/srv")

6) test redmine
$ cd /usr/share/redmine
$ sudo mkdir /usr/share/redmine/log
$ sudo ruby /usr/share/redmine/scripts/server -e production
(now in PC web-browser, you can use http://localhost:3000 to do the test)

7) configure apache to run redmine
$ sudo apt-get install libapache2-mod-passenger (seems it has been already installed)
$ sudo ln -s /usr/share/redmine/public /var/www/redmine
$ sudo a2enmod passanger (seems already been enabled too)
$ sudo nano /etc/apache2/sites-available/default

Add the following lines:
+ RailsEnv production
+ RailsBaseURI /redmine

Should look like this (replace all the [ and ] with < and >):

[VirtualHost *:80]
RailsEnv production
RailsBaseURI /redmine

DocumentRoot /var/www
[Directory /]
Options FollowSymLinks
AllowOverride None
[/Directory]
[Directory /var/www/]
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
[/Directory]

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
[Directory "/usr/lib/cgi-bin"]
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
[/Directory]

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined

Alias /doc/ "/usr/share/doc/"
[Directory "/usr/share/doc/"]
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
[/Directory]

[/VirtualHost]

$ sudo chown www-data /usr/share/redmine/config/ennanoronment.rb
$ sudo /etc/init.d/apache2 reload

Thats it...

1 comment:

  1. This was a complete failure and i ended up using the turnkey linux 9.04 version instead

    ReplyDelete

Phoenix

I am resurrecting this tech blog for notes related to Azure Logic Apps with SAP.