Back up your app and database first!
Replace "your_app" with your Mastodon app name in the steps below.
Upgrade to Redis 7 with the following steps:
mkdir -p ~/opt/redis/src
cd ~/opt/redis/src
wget https://github.com/redis/redis/archive/refs/tags/7.4.7.tar.gz
tar zxf 7.4.7.tar.gz
cd redis-7.4.7
source scl_source enable devtoolset-11 ruby32 nodejs20
make
rm -f ~/bin/redis*
find $PWD/src -type f -executable -name "redis*" | xargs -I _ ln -s _ $HOME/bin/
Upgrade Mastodon to 4.5.0
cd ~/apps/your_app
source setenv
export TMPDIR=$PWD/tmp
cd mastodon
git fetch && git checkout v4.5.0
bundle install
yarn install --immutable
# If the previous command fails then repeat it until it finishes with "Done with warnings"
RAILS_ENV=production bundle exec rails assets:precompile
RAILS_ENV=production bundle exec rails db:migrate
../restart
Start a new shell session then upgrade to 4.5.3
cd ~/apps/your_app
source setenv
export TMPDIR=$PWD/tmp
cd mastodon
git fetch && git checkout v4.5.3
RAILS_ENV=production bundle exec rails assets:precompile
../restart