cgspace-notes/content/posts/2019-12.md

59 lines
1.6 KiB
Markdown
Raw Normal View History

2019-12-01 10:29:49 +01:00
---
title: "December, 2019"
date: 2019-12-01T11:22:30+02:00
author: "Alan Orth"
categories: ["Notes"]
---
## 2019-12-01
- Upgrade CGSpace (linode18) to Ubuntu 18.04:
- Check any packages that have residual configs and purge them:
- <code># dpkg -l | grep -E '^rc' | awk '{print $2}' | xargs dpkg -P</code>
- Make sure all packages are up to date and the package manager is up to date, then reboot:
```
# apt update && apt full-upgrade
# apt-get autoremove && apt-get autoclean
# dpkg -C
# reboot
```
<!--more-->
- Take some backups:
```
# dpkg -l > 2019-12-01-linode18-dpkg.txt
# tar czf 2019-12-01-linode18-etc.tar.gz /etc
```
- Then check all third-party repositories in /etc/apt to see if everything using "xenial" has packages available for "bionic" and then update the sources:
- <code># sed -i 's/xenial/bionic/' /etc/apt/sources.list.d/*.list</code>
- Pause the Uptime Robot monitoring for CGSpace
- Make sure the update manager is installed and do the upgrade:
```
# apt install update-manager-core
# do-release-upgrade
```
- After the upgrade finishes, remove Java 11, force the installation of bionic nginx, and reboot the server:
```
# apt purge openjdk-11-jre-headless
# apt install 'nginx=1.16.1-1~bionic'
# reboot
```
- After the server comes back up, remove Python virtualenvs that were created with Python 3.5 and re-run certbot to make sure it's working:
```
# rm -rf /opt/eff.org/certbot/venv/bin/letsencrypt
# rm -rf /opt/ilri/dspace-statistics-api/venv
# /opt/certbot-auto
```
- Clear Ansible's fact cache and re-run the playbooks to update the system's firewalls, SSH config, etc
<!-- vim: set sw=2 ts=2: -->