Redmine On Oracle
Redmine On Oracle
Requirements
Ruby on Rails: o Redmine 0.7.x requires Rails 2.0.2 o Redmine devel r1623 and above is compatible with Rails 2.1 A database: o Oracle XE Optional: SVN binaries (>= 1.3), for repository browsing (must be available in your PATH) RMagick (Gantt export to a png image) Note that Rails has some compatibility issues with ruby 1.8.7. The recommended ruby version is 1.8.6.
Once the Ruby programming platform is installed you can use RubyGems, a Ruby application that allows you to install Ruby frameworks very easily. To install the Rails application development framework, all you need to do is open a command-line prompt and type in a single command.
C:\> gem install rails --remote
Now that you have Ruby, RubyGems, and Rails installed you can install a specialized code library that will allow your Rails applications to talk to your Oracle database server. To download and install Oracle Rails library, go to
http://rubyforge.org/projects/ruby-oci8, download ruby-oci8-1.0.3-mswin32.rb to your C drive, and then using your command window, execute the following command.
C:\> ruby ruby-oci8-1.0.3-mswin32.rb
Assuming that everything went smoothly, you have now installed Ruby, Rails, and the Rails-Oracle connection library. You are now ready to create your first Ruby on Rails Web application. The only thing you will need is the Oracle adapter, thats not included on Rails 2.0 . Download it at: http://svn.rubyonrails.org/rails/adapters/oracle/lib/active_record/connection_adapters/ Copy the file oracle_adpter.rb to the folder: /lib/ruby/gems/1.8/gems/activerecord2.2.2/lib/active_record/connection_adapters
Installation of Redmine
1. Download and extract the archive or checkout Redmine. 2. Create an user on Oracle named bduser, for example, with DBA privilegies:
SQL> GRANT dba TO bduser IDENTIFIED BY bduser; SQL> ALTER USER bduser DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp; SQL> EXIT
3. Copy config/database.yml.example to config/database.yml and edit this file in order to configure your database settings for "production" environment.
production: adapter: oracle database: 127.0.0.1/1521:xe username: bduser password: bdpasswd
5. With these changes, you can delete the following ruby\apps\redmine\db\migrate\087_change_projects_description_to_text.rb 6. Alter the file above with the structure: \ruby\apps\redmine\db\migrate\091_change_changesets_revision_to_string.rb
class ChangeChangesetsRevisionToString < ActiveRecord::Migration def self.up change_column :changesets, :revision, :string end def self.down change_column :changesets, :revision, :integer end end
file:
7. The problem with UTF-8 on Oracle is can be resolved by adding a line on the beginning of config/environment.rb:
ENV['NLS_LANG']='american_america.AL32UTF8'
8. Create the database structure, by running the following command under the application root directory:
rake db:migrate RAILS_ENV="production"
It will create tables and an administrator account. 9. Insert configuration data in database, manually by specifying roles, permissions, types of tickets and so on. DONT LOAD DEFAULT DATA.
rake redmine:load_default_data RAILS_ENV="production"
Once WEBrick has started, point your browser to http://localhost:3000/. You should now see the application welcome page. 10. Use default administrator account to log in: login: admin password: admin You can go to Admin & Settings to modify application settings.
Backups
Redmine backups should include: data (stored in your redmine database) attachments (stored in the files directory of your Redmine install) Here is a simple shell script that can be used for daily backups (assuming you're using a mysql database):
# Database /usr/bin/mysqldump -u <username> -p <password> <redmine_database> | gzip > /path/to/backup/db/redmine_`date +%y_%m_%d`.gz # Attachments rsync -a /path/to/redmine/files /path/to/backup/files
Special Thanks to GUILHERME SCHNEIDER, who became with light where there were only shadows in this thread: http://www.redmine.org/boards/1/topics/show/1747#message-1763 NOTE: This works fine with my enviroment, but it needs more test to validate the structure of issues tracking.