By new version run concurrently switching the Redmine, version up without risk of data loss.
The first was carried out the SVN updates and trying to ease, but not rise up to 3.2 of the plan, and re-version up.
3.1.1 → 3.1.5 → 3.2.2
The Responsive design, can be comfortably ticket management in smart phones.
- Background information
- Update of the database
- Apache settings at the time of concurrent operation
- Version up completion
- trouble shooting
Version up is running on the basis of the information of Redmine official site. It is also based on the information in the official site of the original installation.
For such parts not relevant in their own environment is omitted, please through your eyes.
Server: CentOS Linux release 7.2.1511 (Core) (VM)
*Because you are not fully able to check the environment-dependent element, etc., on top of the fully confirmed, please implementation. The responsibility of the failure can not assume.
I have described just in case, but to build a parallel environment on taking the backup, is it is not nearly that data lost.
Download and move to the server redmine-3.2.2.tar.gz.
Download it here
To back up the database.
mysqldump -p db_redmine> 20160524-redmine.sql
To back up the attached files, and the like. For the time being to save a copy.
cd / var / lib / redmine cp -r files / root /
To expand the Redmine the downloaded. I had put the compressed file in the /root.
As a result, the directory of the current version of the redmine and redmine-3.2.2 to coexist. Therefore, overwriting the current environment does not occur, it does not occur with data loss.
Move to ../lib tar xvzf /root/redmine-3.2.2.tar.gz
To copy the database configuration file config/database.yml into the new config directory
cp redmine/config/database.yml redmine-3.2.2/config/database.yml
To copy the files directory. Attachments, and the like.
cp -r redmine/files redmine-3.2.2/
Also copy plug-ins as needed.
gem install and key generation
cd redmine-3.2.2/ bundle install --without development test bundle exec rake generate_secret_token
Update of the database
bundle exec rake db:migrate RAILS_ENV=production
If you are put in a plug-in to run here.
bundle exec rake redmine:plugins:migrate RAILS_ENV=production
To clear the cache and the session file.
bundle exec rake tmp:cache:clear tmp:sessions:clear
Apache settings at the time of concurrent operation
Switch the Apache of Redmine DocumentRoot to the new version.
vi /etc/httpd/conf/httpd.conf <VirtualHost *:80> ServerName redmine.com # DocumentRoot /var/lib/redmine/public DocumentRoot /var/lib/redmine-3.2.2/public </VirtualHost>
In carrying out the switching to the version up in a parallel operation Redmine it is also required here of setting.
If you forget to change the past, you can not access the CSS file, design layout is not displayed.
vi /etc/httpd/conf.d/redmine.conf #<Directory "/var/lib/redmine/public"> <Directory "/var/lib/redmine-3.2.2/public"> Require all granted </Directory> service httpd restart
If you forget the editing of /etc/httpd/conf.d/redmine.conf, it does not appear the next as design layout.
Version up completion
Safely version up has been completed.
Environment: Redmine version 3.2.2.stable Ruby version 2.2.2-p95 (2015-04-13) [x86_64-linux] Rails version 188.8.131.52 Environment production Database adapter Mysql2 SCM: Subversion 1.7.14 Git 184.108.40.206 Filesystem Redmine plugins: no plugin installed
In the SVN upgrade 3.1.1-> 3.1.5 minor version up
The execution of the upgrade - Step 3 1. Download the release version 2. SVN check out the upgrade
Once you try to upgrade to select here, but there was an easy, only not rise up to 3.1.5, Responsive design of 3.2 did not work.