Here is how it setup a Minimal Redmine Server from Debian 8 Jessie Beta2:
- First Insall Ruby ( version 2.1 perfect for Redmine version 2.4, 2.5 and 2.6 )
- Download Latest Redmine Stable 2.6.0 at this time
- Install Redmine follow Redmine's official Installation document
- my brief installation recorders
- Setup Redmine init script, run WEBrick service
- Update systemd init service:
# apt-get install ruby ruby-dev make gcc libsqlite3-dev
# mkdir -p /var/www
# cd /var/www
# wget http://www.redmine.org/releases/redmine-2.6.0.tar.gz
# tar xzvf redmine-2.6.0.tar.gz
http://www.redmine.org/projects/redmine/wiki/RedmineInstall
Define SQLite Database in config/database.yml
# SQLite3 configuration example
production:
adapter: sqlite3
database: db/redmine.sqlite3
install Bundler first
# gem install bundler
# bundle install --without development test rmagick
Session store secret generation
# rake generate_secret_token
Database schema objects creation
# RAILS_ENV=production rake db:migrate
Database default data set
# RAILS_ENV=production rake redmine:load_default_data
Test the installation
# ruby script/rails server webrick -e production
Reference: https://gist.github.com/FeroVolar/7911366
http://www.redmine.org/boards/1/topics/9334?r=14295
My /etc/init.d/redmine file:
#!/bin/sh
### BEGIN INIT INFO
# Provides: redmine
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redmine webrick
# Description: redmine webrick server autostart-script
### END INIT INFO
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DESC="redmine webrick daemon"
NAME=redmine
PIDFILE=/var/run/redmine.pid
SCRIPTNAME=/etc/init.d/"$NAME"
. /lib/lsb/init-functions
# Modify it to your configuration
DIR=/var/www/redmine-2.6.0/
# Start Redmine in daemon mode.
do_start(){
cd $DIR
ruby script/rails server webrick -d -e production -p 80 > /var/log/redmine.log
}
# Stop Redmine daemon
do_stop(){
RUBYPID=`ps aux | grep "ruby script/rails server webrick" | grep -v grep | awk '{print $2}'`
if [ "x$RUBYPID" != "x" ]; then
kill -2 $RUBYPID
fi
}
# Check if Redmine is running
do_status(){
RUBYPID=`ps aux | grep "ruby script/rails server webrick" | grep -v grep | awk '{print $2}'`
if [ "x$RUBYPID" = "x" ]; then
echo "* Redmine is not running"
else
echo "* Redmine is running"
fi
}
case "$1" in
start)
do_start
;;
stop)
do_stop
;;
status)
do_status
;;
restart|force-reload)
do_stop
do_start
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload|status}"
exit 1
esac
# update-rc.d redmine defaults
# systemctl daemon-reload
# service redmine start
# service redmine stop
Please notice: Redmine with SQLite3 is not for multi-user production system. Webrick server is not for high traffic site as well.
But hey, I got redmine running on a 64 MB VM in 5 mintues!
Hi, I tried your method above trying to get redmine running on Jessie, but it fails with the message:
ReplyDeletescript/rails no longer exists, please use bin/rails instead
I tried substituting /usr/bin/rails which resulted in a usage message from rails. Have you any update on using your script with Jessie and the latest version of redmine?
Many thanks
Hi There,
ReplyDeleteOn Jessie everything seems so new, I need refresh my script.
Let me know if you have any luck.