Redmine1.3系のデータをバックアップ
$ mkdir -p /var/tmp/backup/redmine
$ cd /usr/share/redmine/
$ tar -zcvf /var/tmp/backup/redmine/redmine_20130723.tar.gz redmine/
$ /usr/bin/mysqldump -u root -p redmine_default | gzip > /var/tmp/backup/redmine/redmine_20130723.gz
$ sudo apt-get remove ruby1.9.1
新しいRedmine(2.3.4)をダウンロードする
$ cd ~/Downloads/
$ wget http://rubyforge.org/frs/download.php/77023/redmine-2.3.2.tar.gz
$ cd ~/Downloads/
$ tar zxvf redmine-2.3.2.tar.gz
$ sudo mv redmine-2.3.2 /usr/local/
$ cd /usr/local/
$ sudo ln -s /usr/local/redmine-2.3.2/ /usr/local/redmine
$ sudo cp redmine-2.3.2
$ sudo chown -R root.root *
$ sudo chmod -R 777 tmp/
データベースの設定
$ cd /usr/local/redmine/config/
$ cp database.yml.example database.yml
$ vim database.yml
新しいRedmine(2.3.4)をインストール
$ cd /usr/local/redmine/
$ sudo apt-get install libyaml-dev libncurses5-dev libgdbm-dev libssl-dev libyaml-dev libreadline-dev tk-dev zlib1g-dev libmysqld-dev libmagickwand-dev apache2-threaded-dev
$ sudo apt-get install apache2 mysql-server php5-mysql php5 php5-cgi libapache2-mod-php5 php5-common php-pear
$ sudo gem install bundler --no-rdoc --no-ri
$ bundle install --without development test
$ sudo rake generate_secret_token
$ rake db:migrate RAILS_ENV="production"
$ cd /usr/local/redmine/
$ rake tmp:cache:clear
$ rake tmp:sessions:clear
$ sudo gem install passenger --no-rdoc --no-ri
$ sudo apt-get install libcurl4-openssl-dev
$ sudo passenger-install-apache2-module
$ cd /etc/apache2/sites-available/
$ sudo cp default default.20130723
$ sudo vim default
$ cd /var/www/
$ sudo rm -rf redmine
$ sudo ln -s /usr/local/redmine/public/ redmine
$ sudo service apache2 restart