Installing Redmine 1.0.1 on Media Temple (dv) 3.5

OK I spent 6 hours figuring out this.

Now it looks like my Remine 1.0.1 is working fine.

There were a couple Hiccup due to old documentations.

For those of who want to install Redmine, especially on Media Temple (dv) 3.5 server…

1. Installing YUM

I thought I could just follow…

However, when I tried to run YUM, I get the following message.

Error Message

There was a problem importing one of the Python modules

required to run yum. The error leading to this problem was:

/usr/lib/python2.4/site-packages/rpm/ undefined symbol: rpmdbCheckTerminate

Please install a package which provides this module, or
verify that the module is installed correctly

This is because of incompatibility of rpm-python. You have two options. Whether to downgrade rpm-python, or upgrade the depending packages to rpm-phthon.

I chose easier one… but it took me a while to find the old rpm-python… probably there may be security stuff you may be aware of…

But I found the old package from the US Department of Energy site :p

rpm -Uvh rpm-python-4.4.2-48.el5.i386.rpm --replacefiles --replacepkgs --oldpackage

So my YUM works fine now.
I could continue to uninstall SiteBuilder.

2. Ruby + Ruby Gem + Passenger Installation

Found this on the Internet

So, I also decided to go with Ruby + RubyGem + Passenger Gem

I also followed the following guide…

But I did with Ruby.1.8.7

yum remove ruby
tar xzvf ruby-1.8.7.tar.gz && cd ruby-1.8.7
./configure && make && make install
source /etc/profile;ruby -v

And go ahead with RubyGem 1.3.7

echo 'export PATH=/usr/local/bin:$PATH' > /etc/profile.d/; source /etc/profile
tar -xzvf rubygems-1.3.7.tgz
cd rubygems-1.3.7
export GEM_HOME=/usr/local/rubygems/gems; mkdir -p $GEM_HOME
ruby setup.rb all --prefix=/usr/local/rubygems

Create profile

vi /etc/profile.d/

And insert the following config

export GEM_HOME=/usr/local/rubygems/gems
export GEM_PATH=/usr/local/rubygems/gems
export RUBYLIB=/usr/local/rubygems/lib
export PATH=/usr/local/rubygems/gems/bin:/usr/local/rubygems/bin:$PATH

Refresh source

source /etc/profile

And then I installed passenger to make my life easier.

gem install passenger

Towards the end of the installation it tells you to add config and vhost.conf.
I will save vhost for later… but

vi /etc/httpd/conf.d/passenger.conf

and enter the following config

LoadModule passenger_module /usr/local/rubygems/gems/gems/passenger-2.2.15/ext/apache2/
PassengerRoot /usr/local/rubygems/gems/gems/passenger-2.2.15
PassengerRuby /usr/local/bin/ruby
PassengerUserSwitching off
PassengerDefaultUser apache

The number may change depends on the passenger version.
I installed my Redmine on my subdomain.. so

vi /var/www/vhosts/

* You have to change your “XXXXX”to yours.

I installed Remine on
* You have to change your “XXXXX”to yours.

So my vhosts.conf looked like

DocumentRoot /var/www/vhosts/
PassengerAppRoot /var/www/vhosts/
<Directory "/var/www/vhosts/">
Allow from all
Options -MultiViews

RailsBaseURI /

  • You have to change your “XXXXX”to yours.
  • The difference is I had to add PassengerAppRoot and point DocumentRoot to public folder.

3. Ruby + Ruby Gem + Passenger Modification

Readmine 1.0.1 has heavy dependency to ruby libraries… I couldn’t go to Users page for some reason… later I found out that “i8n” library was “too new” for redmine 1.0.1

So I had to run the following commands to fix the versions of various libraries

gem uninstall i18n -v=0.4.1
gem uninstall actionpack -v=3.0.0
gem uninstall rails -v=3.0.0
gem uninstall activesource -v=3.0.0
gem uninstall rack -v=1.2.1
gem install rack -v=1.0.1
gem install mysql
gem install i18n -v=0.3.7

When you uninstall above package, it asks you if you are sure to uninstall because of dependency… no worry… you are re-installing the old version towards the end of the commands.

Here is my gem list

abstract (1.0.0)
actionmailer (2.3.5)
actionpack (2.3.5)
activemodel (3.0.0)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
arel (1.0.1)
builder (2.1.2)
bundler (1.0.0)
erubis (2.6.6)
fastthread (1.0.7)
i18n (0.3.7)
mail (
mime-types (1.16)
mysql (2.8.1)
passenger (2.2.15)
polyglot (0.3.1)
rack (1.0.1)
rack-mount (0.6.13)
rack-test (0.5.5)
rails (2.3.5)
railties (3.0.0)
rake (0.8.7)
thor (0.14.2)
treetop (1.4.8)
tzinfo (0.3.23)

*You don’t need “Activemodel” and some of the libraries for sure… but hey.. all I care is if Redmine works or now.. :p

Now restart httpd to take the effects of all changes
First, make sure all the config syntax is ok.

/etc/init.d/httpd configtest

and then

/etc/init.d/httpd restart

That’s it


4. Installing Redmine

Finally installing Redmine by reading this (must be MediaTemple customer to read)

You need Redmine

I will write based on 1.0.1
And the ALL of following commands were executed from Redmine installed directory.

Create your mysql database and email address

cd /var/www/vhost/
tar xvfz redmine-1.0.1.tar.gz
rm redmine-1.0.1.tar.gz
mv redmine-1.1.1 redmine
chmod -R apache:apache redmine
cd redmine

I created “redmine” directory directly underneath of “XXXXX subdomain” directory.
Now setting up MySQL

cp config/database.yml.example config/database.yml
vi config/database.yml

Assign all production, development and test to the previously created MySQL db, user and password. And delete [posgre] and [sqlite] section

My database.yml looks liks…

adapter: mysql
host: localhost
encoding: utf8

adapter: mysql
host: localhost
encoding: utf8

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
adapter: mysql
host: localhost
encoding: utf8

Of course, you change NAME-OF-DATABSE, NAME-OF-DATABSE & MYSQL-PASSWORD to your own MySQL

And then, setting up SMTP server

cp config/email.yml.example config/email.yml

This is my setting

delivery_method: :smtp
address: localhost
port: 25
authentication: :plain
user_name: "EMAIL ADDRESS"
password: "PASSWORD"

delivery_method: :smtp
address: localhost
port: 25
authentication: :plain
user_name: "EMAIL ADDRESS"
password: "PASSWORD"

And of course, you have to change “”, “EMAIL ADDRESS” and “PASSWORD” to working email address account.

And then… add ImageMagic parameter just in case…

vi config/environment.rb

By adding the following two lines on top

# Bypass imagemagick version check

Create session file

RAILS_ENV=production rake generate_session_store

Import database

RAILS_ENV=production rake db:migrate

And load the default data

RAILS_ENV=production rake redmine:load_default_data

Enter “en” if you want English to be default.
That’s it…

You should be able to have redmine working now.