apt install mysql-server libmysqlclient-dev git-core subversion imagemagick libmagickwand-dev libcurl4-openssl-dev
apt install build-essential mysql-server ruby ruby-dev libmysqlclient-dev imagemagick libmagickwand-dev
systemctl enable mysql.service
systemctl start mysql.service
create database redmine character set utf8;
grant all privileges on redmine.* to redmine@'localhost' identified by 'redmine';
flush privileges;
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable
source /etc/profile.d/rvm.sh
rvm requirements
rvm install 2.4.1
rvm use 2.4.1 --default
gem install passenger --no-ri --no-rdoc
passenger-install-nginx-module
curl https://raw.githubusercontent.com/makevoid/nginx-passenger-ubuntu/master/nginx/nginx.service > /lib/systemd/system/nginx.service
systemctl daemon-reload
systemctl enable nginx
vim /opt/nginx/conf/nginx.conf
server {
listen 80;
server_name [your_server_domain_name]
root /var/data/redmine/public;
passenger_enabled on;
client_max_body_size 10m;
}
systemctl start nginx
mkdir /var/data
cd /var/data
svn co http://svn.redmine.org/redmine/branches/3.4-stable redmine
cd /var/data/redmine
cp -pR /var/data/redmine/config/database.yml.example /var/data/redmine/config/database.yml
vim config/database.yml
cd /var/data/redmine
gem install bundler --no-ri --no-rdoc
bundle install
cd /var/data/redmine
mkdir public/plugin_assets
chown -R www-data:www-data files log tmp public/plugin_assets config.ru
chmod -R 755 files log tmp public/plugin_assets
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production bundle exec rake redmine:load_default_data
bundle exec rake generate_secret_token
systemctl restart nginx
touch /var/data/redmine/tmp/restart.txt
vim /var/data/redmine/config/configuration.yml