Setting Up Redmine for DataONE
==============================
1. Create a VM
2. Install dependencies
3. Install Redmine
4. Install Redmine Backlogs
5. Setup project(s)
Create a VM
-----------
Setup using Proxmox, created a new OpenVZ instance.
:ID: 101
:Template: ubuntu-10.04-minmal_10.04_a
:Disk Space: 120
:Memory: 2048
:Swap: 1024
:Cluster Node: host-unm-2
:Start at boot: Y
:CPUs: 2
:Host Name: redmine.dataone.org
:IP Address: 129.24.0.47
Start up the vm, and add a localadmin account for ssh access.
Via the console::
apt-get update
apt-get upgrade
apt-get install man wget libterm-readline-gnu-perl
adduser localadmin
usermod -a -G sudo localadmin
Install Dependencies
--------------------
The Ubuntu version of Redmine is out of date, so it's necessary to do a manual
installation. Start off with Ruby 1.8 (Redmine doesn't like 1.9), MySQL
server, and a few dependencies::
sudo apt-get install mysql-server
sudo apt-get install libmysqlclient-dev
sudo apt-get install ruby-full
Install gem::
wget http://rubyforge.org/frs/download.php/69365/rubygems-1.3.7.tgz
tar -xf rubygems*tgz
cd rubygems*
ruby setup.rb
gem -v
1.3.7
Install Redmine
---------------
Continuing with Redmine::
sudo gem install rails -v=2.3.5
sudo gem install rack -v=1.0.1
sudo gem install mysql
sudo apt-get install imagemagick libmagickcore-dev libmagickwand-dev
sudo gem install rmagick
Create the Redmine database::
mysql -u root -p
> create database redmine_default character set utf8;
> create user 'redmine'@'localhost' identified by '<< password >>';
> grant all privileges on redmine_default.* to 'redmine'@'localhost';
Install Redmine::
wget http://rubyforge.org/frs/download.php/72201/redmine-1.0.1.tar.gz
cd /usr/share
sudo tar zxf /home/localadmin/redmine-1.0.1.tar.gz
sudo ln -s /usr/share/redmine-1.0.1 /usr/share/redmine
cd redmine
sudo cp config/database.yml.example config/database.yml
sudo nano config/database.yml
<< edit settings for production >>
sudo rake generate_session_store
sudo RAILS_ENV=production rake db:migrate
sudo RAILS_ENV=production rake redmine:load_default_data
sudo chown -R www-data:www-data files log tmp public/plugin_assets
sudo chmod -R 755 files log tmp public/plugin_assets
sudo ln -s /usr/share/redmine/public /var/www/redmine
Setup Apache::
sudo apt-get install apache2 libapache2-mod-passenger
Edit ``/etc/apache2/mods-available/passenger.conf``::
PassengerDefaultUser www-data
PassengerRoot /usr
PassengerRuby /usr/bin/ruby
Edit ``/etc/apache2/sites-available/default``::
ServerAdmin redmine.dataone@gmail.com
ServerName redmine.dataone.org
DocumentRoot /var/www/redmine
Options FollowSymLinks
AllowOverride None
RailsBaseURI /
PassengerAppRoot /usr/share/redmine
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Restart apache, and try logging in to http://129.24.0.47 using the default credentials of admin, admin.
Install Redmine Backlogs
------------------------
Install some gems for Redmine Backlogs::
sudo gem install activesupport
sudo gem install holidays
sudo gem install icalendar
sudo gem install prawn
sudo gem install aasm
Now install the backlog plugin::
cd
wget wget http://github.com/relaxdiego/redmine_backlogs/tarball/v0.3.0
cd /usr/share/redmine/vendor/plugins
tar zxf /home/localadmin/v0.3.0
mv relaxdiego-redmine_backlogs* redmine_backlogs
cd /usr/share/redmine
sudo RAILS_ENV=production rake generate_session_store
sudo RAILS_ENV=production rake config/initializers/session_store.rb
sudo RAILS_ENV=production rake db:migrate
sudo RAILS_ENV=production rake db:migrate:upgrade_plugin_migrations
sudo RAILS_ENV=production rake tmp:cache:clear
sudo RAILS_ENV=production rake tmp:sessions:clear
sudo RAILS_ENV=production rake redmine:backlogs:install
sudo /etc/init.d/apache2 restart
Should be set for UI editing.
Notes and Log
-------------
2010-10-01 - Update, install git, installing http://github.com/edavis10/redmine_extra_ldap.
::
cd /usr/share/redmine/vendor/plugins
git clone http://github.com/edavis10/redmine_extra_ldap.git
cd /usr/share/redmine
rake db:migrate_plugins RAILS_ENV=production