Skip to content

Instantly share code, notes, and snippets.

@qoobaa
Last active December 15, 2016 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qoobaa/aaa48ab403602bcdd8e72480a4843382 to your computer and use it in GitHub Desktop.
Save qoobaa/aaa48ab403602bcdd8e72480a4843382 to your computer and use it in GitHub Desktop.
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
# reduce the server load and free as much memory as we can
service unicorn stop
service nginx stop
service postgresql stop
# remove the old postgresql
apt-get -y remove postgresql-* nginx-*
apt-get -y update
apt-get -y upgrade
apt-get -y dist-upgrade
apt-get -y install update-manager-core
do-release-upgrade -f DistUpgradeViewNonInteractive
# install the new postgresql
apt-get -y install postgresql-9.5 nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment