redmineã2ç³»ã§ããããå¤ãããªã¨æã£ã¦ããã¼ã¸ã§ã³ã¢ãããã¦ã¿ãã®ã§ã¡ã¢ã
ãã¨ãubuntu14.04ã ã¨rubyã1.9ç³»ã§å¾®å¦ãªã®ã§ããããã¢ãããã¼ãããã
ããã¯ã¢ãã
redmineã®ãã£ã¬ã¯ããªã¯å¿µã®ãããã¾ãã£ã¨ããã¯ã¢ãããã¦ããã
$ cp -rp /path/to/redmine /path/to/backup/
DBã®ãã³ã
$ mysqldump -u redmine -p | gzip -c > /path/to/backup/redmine.backup.gz
rubyã®ã¤ã³ã¹ãã¼ã«
$ wget https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.4.tar.gz $ tar zxvf ruby-2.3.4.tar.gz $ cd ruby-2.3.4 $ ./configure --disable-install-doc --prefix=/path/to/ruby2.3.4 $ make $ sudo make install
bundlerã®ã¤ã³ã¹ãã¼ã«
$ sudo /path/to/ruby2.3.4/bin/gem install bundler
redmineã®ã¤ã³ã¹ãã¼ã«
redmineããã¦ã³ãã¼ããã¦è§£å
$ rm -fr /path/to/redmine $ wget http://www.redmine.org/releases/redmine-3.3.3.tar.gz $ tar zxvf redmine-3.3.3.tar.gz $ sudo mv redmine-3.3.3 /path/to/redmine
æ§ç°å¢ããè¨å®ãã³ãã¼
$ sudo cp /path/to/backup/redmine/config/database.yml /path/to/redmine/config/ $ sudo cp /path/to/backup/redmine/config/configuration.yml /path/to/redmine/config/
ãã£ã¬ã¯ããªã®ææè ãredmineã«å¤æ´
$ chown -R redmine:redmine /path/to/redmine
ä¾åã¢ã¸ã¥ã¼ã«ã®ã¤ã³ã¹ãã¼ã«ã
ã¾ããã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã«thinãå©ç¨ãã¦ããã®ã§Gemfileã«thinã追å
gem 'thin'
ãã®å¾bundle install
$ cd /path/to/redmine $ sudo -H -u redmine /path/to/ruby2.3.4/bin/bundle install --path vendor/bundle --without development test rmagick
ã»ãã¥ãªãã£ãã¼ã¯ã³ã®ä½æ
$ sudo -H -u redmine /path/to/ruby2.3.4/bin/bundle exec rake generate_secret_token
DBã®æ´æ°
$ sudo -H -u redmine /path/to/ruby2.3.4/bin/bundle exec rake db:migrate RAILS_ENV=production
ã»ãã·ã§ã³ããã£ãã·ã¥ã®åé¤
$ sudo -H -u redmine /path/to/ruby2.3.4/bin/bundle exec rake tmp:cache:clear tmp:sessions:clear RAILS_ENV=production
thinã®è¨å®ãä½æã/path/to/redmine/config/thin.ymlã«ä¿åããã
chdir: /path/to/redmine environment: production address: 127.0.0.1 port: 3000 timeout: 30 log: log/thin.log pid: tmp/pids/thin.pid max_conns: 1024 max_persistent_conns: 512 require: [] wait: 30 daemonize: true prefix: /redmine user: redmine group: redmine
thinã®èµ·å
$ cd /path/to/redmine $ sudo -H -u redmine RAILS_RELATIVE_URL_ROOT=/redmine /path/to/ruby2.3.4/bin/bundle exec thin start -C /path/to/redmine/config/thin.yml
RAILS_RELATIVE_URL_ROOTã¯redmineããµãurl(/redmine)ã§ã¢ã¯ã»ã¹ãã¦ããã®ã§ãããã¦ããã
apacheå´ã¯3000ãã¼ãã«proxyãã¦ããã ã
<Location /redmine> ProxyPass http://localhost:3000/redmine ProxyPassReverse http://localhost:3000/redmine </Location>
ãã¨ã¯ãã¼ã¢ã³åããã¨ãæ®ã£ã¦ãããã©ã¨ããããããã¾ã§ã