I got it! Although this might all be easy to someone who's not a complete newby, I figure it's proper to write a tutorial now. Well, here goes.
Also, this contains
no Windows specific instructions. I did this on a Leopard (10.5.4) running Macbook and assume it'll work on a Linux machine too.
==============================
Resources:
A Small Orange Wiki:
Deploying an Existing Ruby AppRedmine
Install Guide (localhost)
Local Redmine installation with Trac data migration (video)
==============================
Do you have SSH access? You'll need it. If not, send in a support ticket asking for such.
Let's
grab Redmine -- it can be downloaded as zip or tarball here at
RubyForge. Or you can pull the latest trunk with subversion:
CODE
svn co http://redmine.rubyforge.org/svn/trunk redmine
svn co svn://rubyforge.org/var/svn/redmine/trunk redmine
Go into the
/config folder and make a duplicate of
database.yml.example and delete .example off the copy. Once I had done that, I ftp'd it to my root ASO directory.
Next, create an empty MySQL database for it. I did this through cPanel. I named mine a generic
redmine. Make sure you add a user.
You can do this in any text editor, but after tonight I like the GNU nano command-line editor. SSH into your account and navigate to
/config so you can edit the
database.yml file.
CODE
cd ~/redmine/config/
nano database.yml
Change the
production block accordingly to your database:
CODE
production:
adapter: mysql
database: <username>_<database name>
host: localhost
username: <username>_<user>
password: <user password>
Here, I follow steps 4 and 5 from the
Redmine install guide.
Create the database structure, by running the following command under the application root directory. It will create tables and an administrator account.CODE
cd ~/redmine/
rake db:migrate RAILS_ENV="production"
Insert default configuration data in database, by running the following command. This step is optional but highly recommended, as you can define your own configuration from scratch. It will load default roles, trackers, statuses, workflows and enumerations.CODE
rake redmine:load_default_data RAILS_ENV="production"
Let's make sure that worked. (Credit: ASO Wiki) Navigate to:
CODE
cd ~/redmine/config/
nano environment.rb
And remove the comment from the line so that:
CODE
ENV['RAILS_ENV'] ||= 'production'
Now, let's test it by running the WEBrick server. Try the following command:
CODE
ruby script/server -e production
Did it work? Try your site at port 3000. It should be up and running!
Now, if anyone else knows -- does anyone know how to do some redirection so that
example.com:3000 can be redirected to
code.example.com?