Project

General

Profile

Installing Redmine 1.4 in Debian 6

Added by Gabriel Rilo over 12 years ago

Hello I'm uploading this instructions to install Redmine in Debian 6 (squeeze), I suppose Debian 5 or other Debian based distors should work but didn't test.

I had to install RM several times so I thought it would be handy to have a "in-one-place" guide.

I hope this guide can help some people, like that me, couldn't find a complete guide for a Debian environment.

Here are the steps:

Download RM

Download RM 1.4 and configure the folder permissions.

apt-get install subversion

cd /var/www

svn co http://redmine.rubyforge.org/svn/branches/1.4-stable redmine

chmod -R 775 public files log tmp
chown -R www-data:www-data public files log tmp

Install mysql

Install MySQL and create the Database for Redmine.

apt-get install mysql-server

mysql -p

create database redmine character set utf8; 
grant all on redmine.* to ‘redmine’ identified by ‘*****’;

Install Ruby

Install Ruby and all dependencies, packages, gems, etc.

apt-get install ruby rake rubygems
apt-get install libmysql-ruby libopenssl-ruby
apt-get install rails
apt-get install libmysqlclient-dev
apt-get install libmagick9-dev
apt-get install libpq-dev

gem install rails -v=2.1.2
gem install mysql
gem install rack
gem install mocha
gem install rmagick
gem install bundle
gem install bundler
gem install rake

gem update

Now we need to export the Bundle's command folder into the PATH environment variable.

export PATH=$PATH:/var/lib/gems/1.8/bin

Install Mod Passenger

Install the Mod Passenger to use Redmine with Apache2

apt-get install apache2 libapache2-mod-passenger

Now edit /etc/apache2/sites-available/default and replace its content with:

<VirtualHost *:80>
    SetEnv RAILS_ENV production

    ServerAdmin webmaster@localhost

    DocumentRoot /var/www/redmine/public

    <Directory />
        Options FollowSymLinks
        AllowOverride None    
    </Directory>

    <Directory /var/www/redmine/public>
        Order allow,deny
        allow from all
        AllowOverride All
    </Directory>
</VirtualHost>

Last we have to enable Mod Passenger and Rewrite Apache modules.

a2enmod passenger
a2enmod rewrite

Configure RM

Now we have to configure RM itself. First we grab the database template and edit with our database values.

cd /var/www/redmine
cp config/database.yml.example config/database.yml

Now edit it.

production:
    adapter: mysql
    database: DATABASE_NAME
    host: localhost
    username: USERNAME
    password: USERNAME
    encoding: utf8

Save the changes.

Now step in the redmine folder (/var/www/redmine for example) and run:

bundle install --without development test sqlite

Finally edit Rakefile and, above "require 'rake'", add:

require 'rake/dsl_definition'

Save the changes.

Final step is to run these commands:

rake generate_session_store
rake db:migrate RAILS_ENV=production

Done, ensure to start apache (services apache2 start) and you should be good.

Access your machine IPs with a web browser and you should access your RM.