forked from mastodon/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 0
Update Mastodon from v2.5.2 to v2.6.1
kedama edited this page Nov 25, 2018
·
2 revisions
update Mastodon v2.5.2 to v2.6.1.
- update Ruby v2.5.1 to v2.5.3
- to use jemalloc
# emerge jemalloc
# apt install libjemalloc-dev
switch user to mastodon user.
$ su - <mastodon account>
~ $ cd .rbenv/plugins/ruby-build/
~/.rbenv/plugins/ruby-build $ git fetch
~/.rbenv/plugins/ruby-build $ git checkout v20181019
Note: checking out 'v20181019'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 74e2d7c... Merge pull request #1244 from devinrm/dm-bump-version-to-2018-10-19
check available ruby versions if needed:
~ $ rbenv install --list
Available versions:
:
:
2.5.0-rc1
2.5.0
2.5.1
2.5.2
2.5.3
2.6.0-dev
2.6.0-preview1
2.6.0-preview2
:
~ $ RUBY_CONFIGURE_OPTS=--with-jemalloc TMPDIR=/var/tmp rbenv install 2.5.3
-
RUBY_CONFIGURE_OPTS
: set to use jemalloc -
TMPDIR
: set alternative when /tmp is too small (if needed)
Downloading ruby-2.5.3.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.bz2
Installing ruby-2.5.3...
Installed ruby-2.5.3 to /home/mastodon/.rbenv/versions/2.5.3
switch to root.
~ $ su -
# systemctl stop mastodon-web
# systemctl stop mastodon-streaming
# systemctl stop mastodon-sidekiq
# sudo -u postgres pg_dumpall > /var/tmp/foresdon.jp.181103.dump
# gzip /var/tmp/foresdon.jp.181103.dump
switch user to mastodon user.
~ $ su - <mastodon account>
~ $ cd ~/live
~/live $ git fetch
~/live $ git checkout v2.6.1
make sure the ruby version points to 2.5.3
~/live $ ruby -v
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
then, install bundler
~/live $ gem install bundler
Fetching: bundler-1.17.1.gem (100%)
Successfully installed bundler-1.17.1
Parsing documentation for bundler-1.17.1
Installing ri documentation for bundler-1.17.1
Done installing documentation for bundler after 9 seconds
1 gem installed
~/live $ curl --compressed -o- -L https://yarnpkg.com/install.sh | bash
~/live $ bundle install
~/live $ yarn install
~/live $ RAILS_ENV=production bundle exec rails db:migrate
~/live $ RAILS_ENV=production bundle exec rails assets:precompile
switch user to root.
~ $ su -
then, start.
# systemctl stop mastodon-web
# systemctl stop mastodon-streaming
# systemctl stop mastodon-sidekiq