Here is what I learn from other resource (see bottom of post)
After deciding to move my host to HostGator.com, I was very excited that HG support for Ruby on Rails and Python. Because I really want to improve the management of my company, I decided to install Redmine on my host. Here is what I have done. If you want to follow my path, it’s ok but I don’t guarantee anything. I just want to write this to make me remember if I forget someday.
Redmine is one of the most powerful of open source code project management software (I said open source code, not just open source). So many recomendation come from forums I join in. I have tried so many project management software that is based on PHP (before I host in HostGator), but none of them can satisfy me. So many reasons, such as no integration with Version Control, bad user interface, too complicated to use, and so on.
Before you continue to read, make sure you have already enabled the SSH acces. You can do it by entering your account in https://gbclient.hostgator.com/ and then View Hosting Package. On your ready-to-redmined domain, click Enable SSH Access.
Redmine use database, one of supported DBMS is MySql, that I use here. So, prepare your database (I did it via cPanel) and user for your redmine. I hope you already know how to do it.
First of all, open a terminal window to your HostGator-account using SSH (with PuTTY for example) to perform the following commands:
- Edit bash_profile
- If the following environment variable does not exist, add it:
- Log off, and then log in again to make it active.
- If the following folder does not exist, create ~/rails_apps/:
- Check your Ruby and Rails version according to Redmine Install Wiki
- Go to rails directory
- Checkout trunk of redmine and enter the directory
- Create database configuration by copying from the example
- Edit database config file
- You will open text editor of that file. Edit it according to your setting in production block.
- Save using Ctrl + O and exit using Ctrl + X. Continue with following command:
- Because you install redmine not in http area, you need to create a soft link to redmine public folder. For example, you have folder team in public_html, or just subdomain team that use the folder.
- Open environment file
- Make sure the following line is included in the file.
- Continue with the following command
- Now you can point your web browser to redmine, for example:
- Log on as admin with password admin (default from redmine). Create new Administrator user, and disable the admin account (recommended).
- Install necessary gems, to make sure Redmine and its plugin can find it. Check your gem pathgem environment
- Same with step 1, edit your bash_profile and add these lines
- Same with step 11, add these following lines to the beginning of the ~/rails_apps/redmine/config/environment.rb file.
- Install plugins you want to install to Install the plugins you want into ~/rails_apps/redmine/vendor/plugins.
- Finish, you may use your redmine.
ruby -v rails -v
svn co http://redmine.rubyforge.org/svn/trunk redmine cd ~/rails_apps/redmine/
cp config/database.yml.example config/database.yml
production: adapter: mysql database: your_redmine host: localhost username: your_redmine password: your_redmine encoding: utf8
rake config/initializers/session_store.rb rake db:migrate rake redmine:load_default_data
ln -s /home/your-account/rails_apps/redmine/public /home/your-account/public_html/team
ENV['RAILS_ENV'] = 'production' ENV['RAILS_RELATIVE_URL_ROOT'] = "/redmine" # Not necessary if you plan to access your redmine via subdomain.
cd ~/rails_apps/redmine/tmp/ rails -d mysql --with-dispatchers tmpredmine cp -i tmpredmine/public/dispatch.* ~/rails_apps/redmine/public/ rm -rf tmpredmine
http://team.yourdomain.com (depending on your configuration)
export GEM_HOME=$HOME/ruby/gems export GEM_PATH=$GEM_HOME:/usr/lib/ruby/gems/1.8 export GEM_CACHE=$GEM_HOME/cache export PATH=$PATH:$GEM_HOME/bin
$:.push("/home/your-account/ruby/gems") ENV['GEM_PATH'] = '/home/your_account/ruby/gems:/usr/lib/ruby/gems/1.8'
I try to not download from subversion, and download the release package then upload manually, but I get an error while accessing my redmine. Maybe this link can help with it (I think it was because of folder and file permission),
After this, I plan to install Mercurial SCM, because HostGator also provide python. I will write the tutorial later. But I already succeed with it.