Archive for the ‘Redmine’ Category

Installing redmine on a shared host(Bluehost/Dreamhost/Apthost/Hostgator etc)

Redmine is a popular open source tool built on top of RoR. Recently, we@enbake got a task to install Redmine on a shared host.  We faced several problems during the process to which we thought that documentation were necessary. I will take you through a step by step guide to install redmine on a shared host. The host happened to be apthost for our case but i guess that the same would apply for bluehost, dreamhost, apthost and other shared hosts.
  1. Ensure that you have the ssh access to your server. If you dont have currently, then please apply for ssh access to your host.
  2. Once you have ssh access. Login into server via ssh.
  3. Please check the ruby and the rails version on your host and download the appropriate redmine source code from
  4. Extract redmine to the target folder. For the ease of this guide, we assume that redmine was extracted to ~/redmine.
  5. Create a database using mysql on your server(most probably using cpanel) and add appropriate database settings to the rails config/database.yml.
  6. Install the gems required by redmine using rake gems:install. The command will install gems onto your user home directory and you might need to add the gem path to your .bash_profile.
  7. If your .bash_profile does not contain the following directives, please add them to it:
  8. export GEM_PATH=/usr/lib/ruby/gems/1.8:~/ruby/gems export GEM_HOME=~/ruby/gems (here ~/ruby/gems is the path where local gems are usually installed)
  9. Redmine stores session data in cookies by default, which requires a secret to be generated. So we need to generate session store secret. Under the application main directory run: rake generate_session_store
  10. Create the database structure by running the redmine migrations: RAILS_ENV=production rake db:migrate
  11. Migrations will create all the tables and an administrator account with admin/admin as username/password.
  12. The user who runs Redmine must have write permission on the following subdirectories: files, log, tmp & public/plugin_assets:- chown -R user:group files log tmp public/plugin_assets chmod -R 755 files log tmp public/plugin_assets
  13. Redmine comes with a prebuilt dispatcher and .htaccess files. Rename the .example dispatcher files to their respective extensions. Similarly rename the example .htaccess to .htaccess
  14. Test the installation by running the WEBrick web server. Under the main application directory run: ruby script/server -e production
  15. If there is no error in step 14, then the redmine is all set and now you should move ahead to configure apache to serve the redmine. Otherwise, please move back and check the errors.
  16. We will install redmine on a subdomain in this guide since most of the shared hosts support subdomaining.
  17. Create a subdomain using cpanel’s subdomain management option. Give it some path in the apache directory. Normally ~/public_html. Lets say the path is ~/public_html/redmine and the subdomain is for the purpose of this guide.
  18. Now move to shell again and make a symbolic link in ~/public_html/redmine to your redmine install’s public directory (~/redmine) in this case. This command will create a symbolic link : ln -s ~/redmine/public ~/public_html/redmine
  19. Add the local gem path in your config/environment.rb file ,  ENV[‘GEM_PATH’]=’/home/username/ruby/gems:/usr/lib/ruby/gems/1.8′
  20. Run the application by entering your application’s url in browser and your shiny new redmine install should be there.
Enjoy Managing your projects !!