Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Installing Redmine on 96MB VPS from source, quick and dirty guide :P
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Installing Redmine on 96MB VPS from source, quick and dirty guide :P

vedranvedran Veteran
edited October 2011 in Tutorials

After spending some time trying to install Redmine, I'll share the outcome. I tried installing from debian package, but that somehow always failed, and the package is quite old.

What we need:

SQLite3
ruby 1.8.7
RubyGems 1.6
And of course, Redmine (1.2.1)

First of all, make sure we have all libraries etc.

apt-get install build-essential libssl-dev libruby sqlite3 libsqlite3-dev

Let's install Ruby:

wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p72.tar.gz
tar -xzf ruby-1.8.7-p72.tar.gz
cd ruby-1.8.7-p72
./configure
make
make install

And RubyGems:

wget http://rubyforge.org/frs/download.php/74445/rubygems-1.6.2.tgz
tar -xzf rubygems-1.6.2.tgz
ruby rubygems-1.6.2/setup.rb

Gems we need:

gem install rake -v=0.8.7 --no-rdoc --no-ri
gem install rails -v=2.3.14 --no-rdoc --no-ri
gem install sqlite3  --no-rdoc --no-ri
gem install -v=0.4.2 i18n  --no-rdoc --no-ri

And finally, redmine:

wget http://rubyforge.org/frs/download.php/75097/redmine-1.2.1.tar.gz
tar -xzf redmine-1.2.1.tar.gz -C /usr/share
cd /usr/share/redmine-1.2.1

Put this in config/database.yml:

production:
   adapter: sqlite3
   dbfile: db/redmine.db

And setup database (we are still in redmine-1.2.1 folder):

rake generate_session_store 
rake db:migrate RAILS_ENV=production
rake redmine:load_default_data RAILS_ENV=production

Finally, run WEBrick server:

script/server -e production &

Or if you want to run it as a daemon

script/server -e production -d

That's it. Navigate to http://YOUR_DOMAIN_OR_IP:3000 and you should see Redmine

Outcome OpenVZ:

# free
             total       used       free     shared    buffers     cached
Mem:        196608      87260     109348          0          0          0
-/+ buffers/cache:      87260     109348
Swap:            0          0          0

Outcome Xen:

# free
             total       used       free     shared    buffers     cached
Mem:         91936      89272       2664          0       3272      15908
-/+ buffers/cache:      70092      21844
Swap:       262136       2388     259748

Not exactly great, but it works :D

This is tested on Debian Squeeze, haven't tried it on any other system. If something goes wrong you probably have to apt-get something and reinstall Ruby.

You'll also need to configure email if you want to fully use it (http://www.redmine.org/projects/redmine/wiki/EmailConfiguration).

I know WEBrick is not the greatest solution, but I'm not sure if this would work on nginx with 96MB limit.

Comments

  • Thanks

    I haven't used redmine and you mention Nginx so I'll ask. Does it take over for the webserver or is it being used on another server or...?

  • fanfan Veteran

    Installing ruby environment with RVM is quite faster and easier to manage upgrades.

  • @drmike
    WEBrick acts as a webserver here and it runs on port 3000. It's only useful for redmine so if you need something else you'll also need a "normal" server.
    It's possible to use Apache, nginx or another web server, I've tried Phusion Passenger on Apache and it uses too much memory (or I was doing something wrong).

    @fan
    I don't need ruby for anything else right now, so I don't need to manage upgrades since redmine is quite picky on that it wants to run on.
    Except compiling Ruby from source which takes a few minutes, I don't see how would RVM installation be any faster as it has at least the same number of steps. I must admit I haven't tried it, I've only read about it.

  • I used same approach a few days ago but I installed ruby and gems with apt-get (Squeeze).

    and if you are new to redmine, default admin user is admin with password admin ;-)

  • littleguylittleguy Member
    edited January 2012

    Wow, last time I setup Redmine it quickly chewed up ~500MB of memory when combined with MySQL and Apache.

    Will definitely try this out, thanks!

  • I assume you setup Redmine with Phusion Passenger, I tried that and it really eats all your RAM, probably because by default it starts several Passenger instances.

    Right now I'm running Redmine on Apache with thinserver as proxy balancer. You can also start multiple thin instances, but I don't see the need for more than one for me.

  • vedran: Yes, that's exactly what I did.

    What do you use thinserver for, specifically?

  • You can also run Redmine with Nginx and Phusion Passenger. Get it from the brightbox repository

  • @littleguy said: What do you use thinserver for, specifically?

    http://code.macournoyer.com/thin/. I'm using it as a web server for redmine, works much better than Phusion Passenger for me.

    @rchurch, I think I tried that but somehow it always used too much memory.

  • premisopremiso Member
    edited January 2012

    I did a similar setup, except at a friends suggestion I used unicorn proxied through nginx. It runs lichity split, but uses about 124MB Ram with a few users on it. Still way better than Phusion Passenger.

    :) I would try unicorn for anyone curious. It sped up my redmine a ton doing that.

Sign In or Register to comment.