Search This Blog

Wednesday, November 18, 2015

Simple Redmine 3.1.2 Setup

Redmine 3.1.2 by Ruby 2.2.3, Rail 4.2.4 with SQLite3 on Debian 8 Jessie x86-64.


Redmine is a great OpenSource Project!
But to set it up is not that simple. I just want a simple Redmine running on SQLite, No Apache, no Nginx. And I want have the latest stable edition.




    1. First I create a Debian 8 Jessie VM, please let me know if you would like to have a Docker.

    2. Then install basic packages:




apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev


Check the SQLite version:
sqlite3 --version
3.8.7.1 2014-10-29 13:59:56 3b7b72c4685aa5cf5e675c2c47ebec10d9704221



    1. Install the latest Ruby stable 2.2.3 by rbenv:



git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL

git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash

rbenv install 2.2.3
rbenv global 2.2.3

Check Ruby version:
ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]



    1. Install the latest stable Rails 4.2.4:



echo "gem: --no-ri --no-rdoc" > ~/.gemrc
gem install bundler
gem install rails -v 4.2.4
# OR for the latest:
gem install rails


Check Rail version:
rails --version
Rails 4.2.4



    1. Install Redmine:



cd /var/www
wget http://www.redmine.org/releases/redmine-3.1.2.tar.gz
tar xzvf redmine-3.1.2.tar.gz
cd redmine-3.1.2/
cd config
cp database.yml.example database.yml

# Default setup is given for MySQL with ruby1.9.
# Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
# Line indentation must be 2 spaces (no tabs).

# SQLite3 configuration example
production:
adapter: sqlite3
database: db/redmine.sqlite3

gem install bundler



    1. First I try to install by:



bundle install --without development test

But it required rmagick package, which I don't want, so:
bundle install --without development test rmagick



    1. Generate basic configuration:



bundle exec rake generate_secret_token
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production bundle exec rake redmine:load_default_data



    1. I will not run it from by Apache or Nginx, so just test it by:



bundle exec rails server webrick -e production

Which will only give you access from local port 3000.

  1. To make it listen public access by port 80:


cd /var/www/redmine-3.1.2
root@gitredmine:/var/www/redmine-3.1.2# bundle exec rails server webrick -e production -b 192.168.1.219 -p 80

=> Booting WEBrick
=> Rails 4.2.4 application starting in production on http://192.168.1.219:80
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2015-11-18 16:47:10] INFO WEBrick 1.3.1
[2015-11-18 16:47:10] INFO ruby 2.2.3 (2015-08-18) [x86_64-linux]
[2015-11-18 16:47:10] INFO WEBrick::HTTPServer#start: pid=574 port=80

Please let me know if you like me port it to hub.docker.com.

No comments:

Post a Comment