Install Redmine on Debian

More than 1 year has passed since last update.


Preparation for third party services


  • MySQL

  • Nginx


Language / VM


RVM

curl -L https://get.rvm.io | bash -s stable

Then try to run rvm -v. If no result, run source /usr/local/rvm/scripts/rvm.

Might it work to append this to /etc/profile.


Ruby (2.3.1)


Taobao Mirror if needed

sed -i 's!cache.ruby-lang.org/pub/ruby!ruby.taobao.org/mirrors/ruby!' $rvm_path/config/db


rvm install 2.3.1

See ruby installation list rvm list.

See current ruby running version ruby -v.


Rails


Taobao Mirror if needed

gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org/


gem install rails -V


redmine package

For example to /opt/redmine. Change your working directory to it.


Modify the configuration files.

Follow Step 1 to 3 from official doc.


http://www.redmine.org/projects/redmine/wiki/redmineinstall


You may need this ...

# For mysql

apt-get install libmysqlclient-dev
# For imagemagick
apt-get install imagemagick libmagickwand-dev

Then Step 4 to 8.


Run

ruby /opt/redmine/redmine-3.4.2/bin/rails server webrick -e production -b 127.0.0.1 -p 3000 -d >> /var/log/redmine.log 2>&1


Nginx Listenser

Set up a VHOST configuration for nginx as

upstream local_ruby_3000_proxy {

server 127.0.0.1:3000;
}
server {
listen 80;
server_name newredmine.leqee.com;
#access_log logs/host.access.log main;

location / {
proxy_set_header Host $host:$server_port;
proxy_set_header X-FORWARDED-FOR $remote_addr;
proxy_set_header X-Real-IP $http_x_real_ip;
proxy_pass http://local_ruby_3000_proxy;
}
}

And restart.


Initialization

Step 9 and 10.