FreeBSD 9.0 + Redmine + Ruby19

royvandam

New Member

Reaction score: 2
Messages: 5

It took me a while to figure out the required dependencies to get Redmine working on FreeBSD. Due to some unresolved bugs I did not manage to get the stable 1.3.1 version of Redmine running on FreeBSD with ruby18. Therefore I have now set up the development version of Redmine, which seems to run just fine.

Below is a description on how to install Redmine out of the svn trunk with MySQL as backend, up to the point that the installation can be tested using Webrick. After this step you are free to implement a more reliable hosting solution based for example on mongrel_cluster or mod_fastcgi.

Code:
# Install required dependancies
echo "RUBY_VERSION=1.9.3" >> /etc/make.conf
cd /usr/ports/lang/ruby19
make install clean
cd /usr/ports/devel/ruby-gems
make install clean
cd /usr/ports/converters/ruby-iconv
make install clean
cd /usr/ports/databases/ruby-mysql
make install clean
gem19 install rails --version=2.3.14

# Install Redmin Trunk
mkdir /usr/local/www/ 
cd /usr/local/www/
svn co http://redmine.rubyforge.org/svn/trunk redmine
cd redmine

# Copy default Redmine configuration
cp config/configuration.yml.example config/configuration.yml
cp config/database.yml.example config/database.yml

# Configure Redmine according your environment and needs
# More detail is provided in the configuration files themselves.
vi config/configuration.yml
vi config/database.yml

# Generate a session store secret.
rake generate_session_store

# Create and populate database
rake db:migrate RAILS_ENV=production
rake redmine:load_default_data RAILS_ENV=production

# Create Redmine group and user
pw groupadd -n redmine -g 3000
pw useradd -n redmine -u 3000 -g 3000 -d /usr/local/www/redmine -s /bin/sh -h -

# Configure permissions
mkdir tmp public/plugin_assets
sudo chown -R redmine:redmine files log tmp public/plugin_assets
sudo chmod -R 755 files log tmp public/plugin_assets

# Login as Redmine user
su - redmine

# Test the configuration using Webrick
# (Note: Webrick is not suitable for normal use)
ruby19 script/server webrick -e production
 
Top