Installing redmine
sudo apt-get update
sudo apt-get install libmysqlclient-dev
sudo apt-get install mysql-server libmysqlclient-dev git-core subversion imagemagick libmagickwand-dev libcurl4-openssl-dev
##Clone redmine from github clone repo
git clone git://github.com/redmine/redmine.git redmine
##Install RVM, latest Ruby version
gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
curl -L https://get.rvm.io | bash -s stable
source /home/user/.rvm/scripts/rvm
##Update redmine/Gemfile
Add gem 'unicorn'
##Install gems
bundle install --without development test
##Create MySQL table
mysql -u root -p
CREATE DATABASE redmine CHARACTER SET utf8;
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'YOURPASSWORD';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
##Redmine configs
cp config/database.yml.example config/database.yml
bundle install --without development test
##Edit secrets.yml
touch config/secrets.yml
vi config/secrets.yml
rake secret
###Inside secrets.yml
production:
secret_token:
secret_key_base:
##Install DB data
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data
##Create dir srtucture
mkdir -p ~/shared/{config/redmine,log/redmine,pid/redmine,socket/redmine}
curl -o ~/shared/config/redmine/unicorn.rb https://raw.github.com/defunkt/unicorn/master/examples/unicorn.conf.rb
##Run
unicorn_rails -c /home/metry/shared/config/redmine/unicorn.rb -p 8500 -E production -D