Upgrade from Ubuntu Xenial VPS to Bionic

On this page:

Upgrade O.S.

Upgrade PostgreSQL

OLD_REL="9.6"
NEW_REL="10"
# Backup
su -c pg_dumpall postgres >~/pg_dumpall.sql
sed -i 's/xenial/bionic/g' /etc/apt/sources.list.d/postgresql.list
apt-get -y update
apt-get -y upgrade
apt-get install postgresql-$NEW_REL postgresql-client-$NEW_REL postgresql-server-dev-$NEW_REL postgresql-plperl-$NEW_REL
/etc/init.d/postgresql stop
cp -a /etc/postgresql/$OLD_REL/main/pg_hba.conf /root/pg_hba.conf
cd /tmp
sudo -H -u postgres /usr/lib/postgresql/$NEW_REL/bin/pg_upgrade \
   -b /usr/lib/postgresql/$OLD_REL/bin \
   -B /usr/lib/postgresql/10/bin \
   -d /var/lib/postgresql/$OLD_REL/main \
   -D /var/lib/postgresql/$NEW_REL/main \
   -o " -c config_file=/etc/postgresql/$OLD_REL/main/postgresql.conf" \
   -O " -c config_file=/etc/postgresql/$NEW_REL/main/postgresql.conf"
mv /etc/postgresql/$NEW_REL/main/pg_hba.conf /etc/postgresql/10/main/pg_hba.conf.ORIG
mv /root/pg_hba.conf /etc/postgresql/$NEW_REL/main/pg_hba.conf
sed -i~ 's/^#listen_addresses/listen_addresses = '"'\*'"'\n#ORIG listen_addresses/' /etc/postgresql/$NEW_REL/main/postgresql.conf
apt-get -y purge postgresql-$OLD_REL postgresql-client-$OLD_REL postgresql-server-dev-$OLD_REL
sed -i~ 's/5433/5432/' /etc/postgresql/$NEW_REL/main/postgresql.conf
/etc/init.d/postgresql start
# Remove the backup only if the upgrade is complete without errors
# rm ~/pg_dumpall.sql

Upgrade libraries

apt-get install libxml-simple-perl libstring-random-perl libfile-which-perl

rm -r /usr/local/lib/x86_64-linux-gnu/perl/5.22.* /usr/local/share/perl/5.22.*
cpanm CGI JSON JSON::XS DBD::Pg Mail::Sender App::cpanminus Apache2::AuthCookie SQL::Statement
cpanm HOP::Lexer SQL::Dialects::ANSI Sys::RunAlone MIME::Parser Archive::Tar::Wrapper Archive::Zip
cpanm Perl6::Form HTTP::BrowserDetect IPC::Run::SafeHandles Text::Balanced Captcha::reCAPTCHA
cpanm ODF::lpOD DTL::Fast Image::Info HTML::Mason Spreadsheet::WriteExcel File::MimeInfo
cpanm HTTP::Request::JSON
cpanm --force SQL::Interpolate

Install pdftk

cd /tmp
wget http://launchpadlibrarian.net/340410966/libgcj17_6.4.0-8ubuntu1_amd64.deb \
 http://launchpadlibrarian.net/337429932/libgcj-common_6.4-3ubuntu1_all.deb \
 https://launchpad.net/ubuntu/+source/pdftk/2.02-4build1/+build/10581759/+files/pdftk_2.02-4build1_amd64.deb \
 https://launchpad.net/ubuntu/+source/pdftk/2.02-4build1/+build/10581759/+files/pdftk-dbg_2.02-4build1_amd64.deb
sudo apt-get install ./libgcj17_6.4.0-8ubuntu1_amd64.deb \
    ./libgcj-common_6.4-3ubuntu1_all.deb \
    ./pdftk_2.02-4build1_amd64.deb \
    ./pdftk-dbg_2.02-4build1_amd64.deb
rm ./libgcj17_6.4.0-8ubuntu1_amd64.deb ./libgcj-common_6.4-3ubuntu1_all.deb ./pdftk_2.02-4build1_amd64.deb ./pdftk-dbg_2.02-4build1_amd64.deb

Upgrade Let's Encrypt

sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:certbot/certbot
sudo apt-get update
sudo apt-get install -y certbot
# remove old code
rm -r /opt/certbot
# periodic cert. upgrade with crontab
sed -i~ 's/\/opt\/certbot\/certbot-auto/certbot/' /etc/crontab

Disable unoconvd daemon

New MasonSQL default configuration use directly libreoffice instead of unoconvd.
systemctl stop unoconvd
rm $(find /etc/rc?.d -name '[A-Z]*unoconvd')

This topic: MasonSQL > WebHome > DeployUbuntuXenial2Bionic
Topic revision: 07 Sep 2023, GuidoBrugnara
This site is powered by FoswikiCopyright (©) Leader.IT - Italy P.I. IT01434390223 Privacy policy & use of cookies