Forked from wenzhixin/redmine-3.0.2-on-ubuntu-14.04
Last active
August 24, 2018 11:46
-
-
Save licvido/cbea6b20d5d7a368751fb63d88165c2f to your computer and use it in GitHub Desktop.
redmine 3.2.1 installer on ubuntu 14.04 (new installtion) with nginx, mysql and puma
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set cache proxy | |
sudo vi /etc/apt/apt.conf << EOT | |
Acquire::http::Proxy "http://192.168.88.10:3142"; | |
Acquire::HTTP::Proxy::192.168.88.10 "DIRECT"; | |
EOT | |
sudo apt-get update | |
sudo apt-get upgrade | |
# install ruby 2.2 | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:brightbox/ruby-ng | |
sudo apt-get update | |
sudo apt-get install ruby2.2 ruby2.2-dev | |
# install redmine dependences | |
sudo apt-get install curl git subversion imagemagick libmagickwand-dev mysql-server mysql-client libmysqlclient-dev build-essential libssl-dev | |
# download redmine | |
mkdir www | |
cd www | |
wget http://www.redmine.org/releases/redmine-3.2.1.zip | |
unzip redmine-3.2.1.zip | |
mv redmine-3.2.1 redmine | |
cd redmine | |
# create database | |
mysql -uroot -ppassword | |
CREATE DATABASE redmine CHARACTER SET utf8; | |
exit | |
# config | |
cp config/configuration.yml.example config/configuration.yml | |
cp config/database.yml.example config/database.yml | |
vi config/database.yml << EOT | |
production: | |
adapter: mysql2 | |
database: redmine | |
host: localhost | |
username: redmine | |
password: "password" | |
encoding: utf8 | |
EOT | |
# add puma | |
vi Gemfile << EOT | |
gem 'puma' | |
EOT | |
# gem, bundle | |
sudo gem install bundler | |
bundle install --without development test | |
# puma | |
mkdir tmp/pids | |
vi config/puma.rb << EOT | |
#!/usr/bin/env puma | |
environment 'production' | |
daemonize false | |
port 3030 | |
pidfile 'tmp/pids/puma.pid' | |
state_path 'tmp/pids/puma.state' | |
threads 0, 16 | |
bind 'unix://tmp/sockets/puma.sock' | |
activate_control_app 'unix://tmp/sockets/pumactl.sock' | |
EOT | |
sudo vi /etc/init/redmine.conf << EOT | |
description "redmine" | |
start on filesystem or runlevel [2345] | |
stop on runlevel [!2345] | |
setuid redmine | |
setgid redmine | |
respawn | |
script | |
exec /bin/bash << EOT | |
source /usr/local/rvm/scripts/rvm | |
rvm use 2.1.2 --default | |
cd /opt/redmine | |
bundle exec puma --config config/puma.rb | |
EOT | |
end script | |
EOT | |
sudo start redmine |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment