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
However, when I tried to run YUM, I get the following 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/_rpmmodule.so: 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
wget http://linux1.fnal.gov/linux/slf52/i386/SL/rpm-python-4.4.2-48.el5.i386.rpm 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 wget ftp://ftp.ruby-lang.org:21/pub/ruby/1.8/ruby-1.8.7.tar.gz tar xzvf ruby-1.8.7.tar.gz &amp;&amp; cd ruby-1.8.7 ./configure &amp;&amp; make &amp;&amp; make install source /etc/profile;ruby -v
And go ahead with RubyGem 1.3.7
echo 'export PATH=/usr/local/bin:$PATH' &gt; /etc/profile.d/ruby.sh; source /etc/profile wget http://rubyforge.org/frs/download.php/70696/rubygems-1.3.7.tgz 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
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
And then I installed passenger to make my life easier.
gem install passenger assenger-install-apache2-module
Towards the end of the installation it tells you to add config and vhost.conf.
I will save vhost for later… but
and enter the following config
LoadModule passenger_module /usr/local/rubygems/gems/gems/passenger-2.2.15/ext/apache2/mod_passenger.so 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
* 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/XXXXX.com/subdomains/XXXXX/redmine/public PassengerAppRoot /var/www/vhosts/XXXXX.com/subdomains/XXXXX/redmine <Directory "/var/www/vhosts/deerstudio.com/subdomains/projects/redmine"> Allow from all Options -MultiViews </Directory> 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 (188.8.131.52) 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.
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/XXXXX.com/subdomain/XXXXX/ wget http://rubyforge.org/frs/download.php/72201/redmine-1.0.1.tar.gz 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…
production: adapter: mysql database: NAME-OF-DATABSE host: localhost username: MYSQL-USERNAME password: MYSQL-PASSWORD encoding: utf8 development: adapter: mysql database: NAME-OF-DATABSE host: localhost username: MYSQL-USERNAME password: MYSQL-PASSWORD 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. test: adapter: mysql database: NAME-OF-DATABSE host: localhost username: NAME-OF-DATABSE password: MYSQL-PASSWORD 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
production: delivery_method: :smtp smtp_settings: address: localhost port: 25 authentication: :plain domain: XXXXX.com user_name: "EMAIL ADDRESS" password: "PASSWORD" development: delivery_method: :smtp smtp_settings: address: localhost port: 25 authentication: :plain domain: XXXXX.com user_name: "EMAIL ADDRESS" password: "PASSWORD"
And of course, you have to change “XXXXX.com”, “EMAIL ADDRESS” and “PASSWORD” to working email address account.
And then… add ImageMagic parameter just in case…
By adding the following two lines on top
# Bypass imagemagick version check RMAGICK_BYPASS_VERSION_TEST = true
Create session file
RAILS_ENV=production rake generate_session_store
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.
You should be able to have redmine working now.