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. To know more on hosting see here.
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. You can get a Fast WordPress Hosting.
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
ruby -v rails -v
- Go to rails directory
- Checkout trunk of redmine and enter the directory
svn co http://redmine.rubyforge.org/svn/trunk redmine cd ~/rails_apps/redmine/
- Create database configuration by copying from the example
cp config/database.yml.example config/database.yml
- Edit database config file
- You will open text editor of that file. Edit it according to your setting in production block.
production: adapter: mysql database: your_redmine host: localhost username: your_redmine password: your_redmine encoding: utf8
- Save using Ctrl + O and exit using Ctrl + X. Continue with following command:
rake config/initializers/session_store.rb rake db:migrate rake redmine:load_default_data
- 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.
ln -s /home/your-account/rails_apps/redmine/public /home/your-account/public_html/team
- Open environment file
- Make sure the following line is included in the file.
ENV['RAILS_ENV'] = 'production' ENV['RAILS_RELATIVE_URL_ROOT'] = "/redmine" # Not necessary if you plan to access your redmine via subdomain.
- Continue with the following command
cd ~/rails_apps/redmine/tmp/ rails -d mysql --with-dispatchers tmpredmine cp -i tmpredmine/public/dispatch.* ~/rails_apps/redmine/public/ rm -rf tmpredmine
- Now you can point your web browser to redmine, for example:
http://team.yourdomain.com (depending on your configuration)
- 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
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
- Same with step 11, add these following lines to the beginning of the ~/rails_apps/redmine/config/environment.rb file.
$:.push("/home/your-account/ruby/gems") ENV['GEM_PATH'] = '/home/your_account/ruby/gems:/usr/lib/ruby/gems/1.8'
- Install plugins you want to install to Install the plugins you want into ~/rails_apps/redmine/vendor/plugins.
- Finish, you may use your redmine.
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.