Redmine is a powerful and flexible project management web apps written on ruby on rails framework. I’ve been using trac for years and want to try this redmine for further functionality and exploring possibility. Been lucky to install redmine on my klixs server on the first try, and here is the steps I want to share :
Installation
Redmine won’t run on ruby 1.9.x so I’m using ruby 1.8.7 and RubyGems 1.3.5 from klixs 2010 packages.
1. Install ruby 1.8.7 and RubyGems from klixs-repository
2. rails and rake gem :
[root@localhost redcomm]# gem install rails -v=2.3.5 Successfully installed activesupport-2.3.5 Successfully installed activerecord-2.3.5 Successfully installed actionpack-2.3.5 Successfully installed actionmailer-2.3.5 Successfully installed activeresource-2.3.5 Successfully installed rails-2.3.5 6 gems installed Installing ri documentation for activesupport-2.3.5... Installing ri documentation for activerecord-2.3.5... Installing ri documentation for actionpack-2.3.5... Installing ri documentation for actionmailer-2.3.5... Installing ri documentation for activeresource-2.3.5... Installing ri documentation for rails-2.3.5... Installing RDoc documentation for activesupport-2.3.5... Installing RDoc documentation for activerecord-2.3.5... Installing RDoc documentation for actionpack-2.3.5... Installing RDoc documentation for actionmailer-2.3.5... Installing RDoc documentation for activeresource-2.3.5... Installing RDoc documentation for rails-2.3.5...
[root@localhost redcomm]# gem install rack -v=1.0.1 Successfully installed rack-1.0.1 1 gem installed Installing ri documentation for rack-1.0.1... Installing RDoc documentation for rack-1.0.1...
3. Download and extract the archive or checkout Redmine, and extract to some folder.
4. Create an empty database (I’m using mysql) and accompanying user named redmine
for example.
create database redmine character set utf8; grant all privilege on redminedb.* to user@localhost identified by '<password>'; flush privileges;
5. Copy config/database.yml.example
to config/database.yml
and edit this file in order to configure your database settings for “production” environment.
Example for a MySQL database :
production: adapter: mysql database: redmine host: localhost username: redmine password: my_password
6. Generate a session store secret. According to redmine wiki, this step is required on the trunk version of Redmine at r2493 or above and the released 0.8.7 version or above.
rake generate_session_store
7. Create the database structure, by running the following command under the application root directory :
RAILS_ENV=production rake db:migrate
it will follow by a bunch of log output :
[root@localhost redcomm]# RAILS_ENV=production rake db:migrate (in /var/www/html/redcomm) == Setup: migrating ========================================================== -- create_table("attachments", {:force=>true}) -> 0.0151s -- create_table("auth_sources", {:force=>true}) -> 0.0269s -- create_table("custom_fields", {:force=>true}) -> 0.0049s -- create_table("custom_fields_projects", {:force=>true, :id=>false}) -> 0.0071s -- create_table("custom_fields_trackers", {:force=>true, :id=>false}) -> 0.0080s -- create_table("custom_values", {:force=>true}) -> 0.0075s -- create_table("documents", {:force=>true}) -> 0.0272s -- add_index("documents", ["project_id"], {:name=>"documents_project_id"}) -> 0.0062s -- create_table("enumerations", {:force=>true}) -> 0.0059s .... == ChangeChangesPathLengthLimit: migrating =================================== -- change_column(:changes, :path, :text, {:null=>true, :default=>nil}) -> 0.0083s -- change_column(:changes, :path, :text, {:null=>false}) -> 0.0086s -- change_column(:changes, :from_path, :text) -> 0.0152s == ChangeChangesPathLengthLimit: migrated (0.0329s) ========================== == EnableCalendarAndGanttModulesWhereAppropriate: migrating ================== == EnableCalendarAndGanttModulesWhereAppropriate: migrated (0.0041s) =========
just ignore it and only pay attention at the end of it, as long as there are no error word, it’s ok 🙂 It will create tables and an administrator account. Just in case you get this error :
Rake aborted! no such file to load -- net/https
then you probably doesn’t have openssl library on the system, install openssl package from repository.
8. Insert default configuration data in database, by running the following command :
[root@krsprogdomain redcomm]# RAILS_ENV=production rake redmine:load_default_data (in /var/www/html/redcomm) Select language: bg, bs, ca, cs, da, de, el, en, en-GB, es, eu, fi, fr, gl, he, hr, hu, id, it, ja, ko, lt, lv, mk, mn, nl, no, pl, pt, pt-BR, ro, ru, sk, sl, sr, sr-YU, sv, th, tr, uk, vi, zh, zh-TW [en] en ==================================== Default configuration data loaded.
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. I’m using default english language.
9. Setting up permissions
The user who runs Redmine must have write permission on the following subdirectories: files
, log
, tmp
(create the last one if not present).
Assuming you run Redmine with a user
user :
chown -R user:user files log tmp public/plugin_assets/ chmod -R 755 files log tmp public/plugin_assets
10. Test the installation by running WEBrick web server :
ruby script/server webrick -e production
[root@localhost redcomm]# ruby script/server webrick -e production => Booting WEBrick => Rails 2.3.5 application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server [2010-11-23 13:42:36] INFO WEBrick 1.3.1 [2010-11-23 13:42:36] INFO ruby 1.8.7 (2009-06-12) [i586-linux] [2010-11-23 13:42:41] INFO WEBrick::HTTPServer#start: pid=28679 port=3000 Processing WelcomeController#index (for 10.10.13.33 at 2010-11-23 13:43:06) [GET] Parameters: {"action"=>"index", "controller"=>"welcome"} Rendering template within layouts/base Rendering welcome/index Completed in 136ms (View: 42, DB: 34) | 200 OK [http://10.10.13.7/]
Once WEBrick has started, point your browser to http://localhost:3000/. You should now see the application welcome page.
Note: Webrick is not suitable for normal use, please only use webrick for testing that the installation up to this point is functional. It is not recommended to use webrick for anything other than development. Use one of the many other guides in this wiki to setup redmine to use either passenger (aka mod_rails) or mongrel to serve up your redmine.
11. Use default administrator account to log in:
- login: admin
- password: admin
You can go to Admin & Settings
to modify application settings.
Note :
As you may see from note at step 10 about using webrick that can only be use for testing the installation purposes, not for normal use ! The webrick http server is only fast on localhost and if you trying to acces from local network it was terribly slow, can’t be used ! You may consider using apache, nginx or mongrel for that purpose.
Have fun with your project ! 🙂