covid-19.png
In response to the spread of COVID-19, we want to do our part to help you stay connected and productive using our products

Free for hospitals, healthcare-related, and nonprofit organizations

In response to the spread of COVID-19, we want to do our part to help you stay connected and productive using our products

Ubuntu 16.04でRedmineインストレーション

1. rvm(ruby version manager)をインストール

$ sudo su
# apt-get install mysql-server libmysqlclient-dev git-core subversion imagemagick libmagickwand-dev libcurl4-openssl-dev 
# gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
# curl -L https://get.rvm.io | bash -s stable --ruby=2.2.6

RVMをロードします。

# source /usr/local/rvm/scripts/rvm
# echo '[[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm"' >> ~/.bashrc

2. Phusion Passenger とNginxをインストール

# gem install passenger --no-ri --no-rdoc
# passenger-install-nginx-module

nginx設定

# systemctl stop nginx
# curl https://raw.githubusercontent.com/makevoid/nginx-passenger-ubuntu/master/nginx/nginx.service > /lib/systemd/system/nginx.service
# systemctl daemon-reload
# systemctl enable nginx
# nano /opt/nginx/conf/nginx.conf

サーバーセクションをポート80へ置き換えます

server {
  listen  80;
  server_name [your_server_domain_name] # redmine.com;
  root /var/data/redmine/public;
  passenger_enabled on;
  client_max_body_size      10m; # Max attachemnt size
}

nginxを再起動する

# systemctl stop nginx
# systemctl start nginx

3. Redmineをインストール

# mkdir /var/data
# cd /var/data/
# svn co http://svn.redmine.org/redmine/branches/3.2-stable redmine
# cd /var/data/redmine

データベース設定

# nano config/database.yml

以下のラインを追加します

production:
  adapter: mysql2
  database: redmine
  host: localhost
  username: redmine
  password: redmine
  encoding: utf8

development:
  adapter: mysql2
  database: redmine 
  host: localhost
  username: redmine
  password: redmine
  encoding: utf8

4. プラグインインストール

/plugins/ folderへプラグインをアンアーカイブする

# cd /var/data/redmine
# gem install bundler --no-ri --no-rdoc
# bundle install

5. Redmine設定

Redmineフォルダパーミッションを設定します

# 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

データベースを作成します。

# mysql -u root -p

MySQLへ以下のラインを実行します

CREATE DATABASE redmine character SET utf8;
CREATE user 'redmine'@'localhost' IDENTIFIED BY 'redmine';
GRANT ALL privileges ON redmine.* TO 'redmine'@'localhost';
exit

データベースを移行します

# cd /var/data/redmine
# bundle exec rake db:migrate
# bundle exec rake redmine:plugins

セッションストアを生成します

# bundle exec rake generate_secret_token 

ウェブサーバーを起動します

# service nginx start

Redmineを再起動します

# touch /var/data/redmine/tmp/restart.txt
Was this article helpful? Yes  No
68 from 134 found this helpful