I want to setup simple bug tracking system for our internal use, which don’t require any kind of training before start. After evaluating couple of free, open source systems (Bugzilla, Trac, Pivotal Tracker, BugTracker.NET) I found redmine was good, simple and build upon rails. As I also want to learn ruby and rails so I thought it could be good exercise. Redmine also includes wiki, which makes it more attractive.
After 5-6 hours of adventures ride, finally I was able to install it on dreamhost shared hosting.
Following are the steps I have taken to install it.
If you don’t have shell account, you must create a shell account before start through dream host panel, or you can enable SSH access to your current user.
Go to the User -> Manage Users
Click on the “edit” link of the user which you want to give SSH access.
On the Edit user screen, there is an option of user account type. Select “Shell account”. Click on the Save Changes button. That’s it. Your user is ready with SSH access.
Create a sub-domain, or you can install it on the root domain. In my case I want to install on sub domain (your-sub-domain.your-domain.com) suppose you want to install redmine on you-sub-domain.
Make sure your SSH account must have right on this folder.
Make sure the domain supports “Ruby on Rails Passenger (mod_rails)?”
Specify your web directory: /home/username/ your-sub-domain.your-domain.com /public (add public folder if it does not add by default.)
Also create new database though MYSQL database for redmine. Keep database hostname, user name and password handy.
Now you need a SSH client. For windows PuTTY is an option.
Following are the steps to access SSH through PuTTy
- Download and install the “Windows-style installer” from the PuTTY Download Page. [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html].
- Open PuTTY, under the category tree select Session, on the right side enter the host name [full path of your domain] and click on the open.
- Command prompt type of screen will open and asking for “login as”. Give you SSH user name and press enter. Then it will asking for the password.
That’s it you are now accessing your server through SSH account.
Now go to the http://www.redmine.org/wiki/redmine/Download see which stable version available to download through SVN in my case it was svn://rubyforge.org/var/svn/redmine/branches/0.9-stable
SSH into your dreamhost account run following command
cd your-sub-domain.your-domain.com
Now we need to import the latest redmine code on to the server through svn
svn export --force svn://rubyforge.org/var/svn/redmine/branches/0.9-stable
for permission run following command
chmod -v -R 755 ./
go to the config directory
cd config
change the database.yml.example to database.yml
cp database.yml.example database.yml
now we have to put database details into database.yml
vi database.yml
It will open the vi editor. Press “I” to come into the “Insert” mode. Change following details
production:
adapter: mysql
database: yourdatabasename
username: yourusername
password: yourpassword
host: mysql.yourdomain.com
After adding your details press “Esc” to exit from insert mode. Press Shift +q to come into the command mode. Now enter in command for save and exit the database.yml.
Go into your-sub-domain.your-domain.com/public
cd ~/ your-sub-domain.your-domain.com /public
cp dispatch.rb.example dispatch.rb
cp dispatch.fcgi.example dispatch.fcgi
cp dispatch.cgi.example dispatch.cgi
vi .htaccess (replace with following text)
Options +FollowSymLinks +ExecCGI
RewriteEngine On
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
ErrorDocument 500 "H2Application errorH2 Rails application failed to start properly"
replace the H2 with the proper HTML tag when you place it in the .htaccess
cd ~/ your-sub-domain.your-domain.com
* rake generate_session_store
This will generate a file (config/initializers/session_store.rb) with a random secret used to secure session data.
from application root type
* rake db:migrate RAILS_ENV="production"
also type the following to load config defaults
* rake redmine:load_default_data RAILS_ENV="production"
* choose "en" for english
browse to http~/ your-sub-domain.your-domain.com
Happy bug tracking!!!