Install Redmine on Hostgator shared hosting
Pushing the limits of the shared hosting account at Hostgator again. This time I've decided to install Redmine in order to track the progress of my private projects.
The nice thing about Hostgator is that they offer, besides the standard PHP, the increasingly popular Python and Ruby on Rails. And this can prove quite handy if you want to do more with your hosting than the average Wordpress and Drupal installs.
Enable the SSH access
The first step is to enable the SSH access for your Hostgator account. If you don't know how to do it, you can read my previous article about this subject:
Enable SSH access on a Hostgator shared hosting account
Create a database
You need a database for your Redmine instance. You can easily create one using the cPanel interface for your Hostgator account. Note the details of the database, as you'll need them later.
Configure the environment
Edit .bash_profile and set the RAILS_ENV to the production environment.
vim ~/.bash_profile
Add the following line:
export RAILS_ENV=production
Install Redmine
Create a folder for the Redmine application:
mkdir ~/apps/
Download the latest stable Redmine code from Subversion:
cd ~/apps/ svn co http://redmine.rubyforge.org/svn/branches/1.3-stable redmine
Configure the database
Configure the database details. You can use a template file provided with the code:
cd ~/apps/redmine/ cp config/database.yml.example config/database.yml
Open the file and edit the details of the production section by entering the details of the database created in the beginning of the post.
Initialize the database:
rake config/initializers/session_store.rb rake db:migrate rake redmine:load_default_data
Specify the environment
Open the Redmine environment file:
vim ~/apps/redmine/config/environment.rb
And set the RAILS_ENV variable to production like this:
ENV['RAILS_ENV'] = 'production'
Enable all the dispatch scripts:
cd ~/apps/redmine/public/ cp dispatch.cgi.example dispatch.cgi cp dispatch.fcgi.example dispatch.fcgi cp dispatch.rb.example dispatch.rb
Copy the .htaccess file for CGI dispatch configuration:
cp htaccess.fcgi.example .htaccessMake the Redmine application available
The folder where we installed Redmine is not accessible to the apache web server. To remedy this, we can create a symbolic link in the /home/kenjiru/public_html folder to the redmine/public/ folder.
ln -s /home/kenjiru/apps/redmine/public /home/kenjiru/public_html/redmine
Now Redmine will be accessible as a folder in the main domain, like kenjiru.ro/redmine. You can also create a subdomain and point it to the redmine folder, for a result like this redmine.kenjiru.ro.

Add new comment