How to install the privacyIDEA authentication system on Ubuntu

privacyIDEA is a modular authentication system that can manage authentication on your network. It’s powerful, it’s flexible, and it can be set up for free on an existing Ubuntu server.
Unlike a lot of authentication systems, privacyIDEA isn’t that hard to install and set up; in fact, you can have your next authentication system up and running in minutes. I’ll use the Ubuntu 16.04 platform to show how to set it up, which might seem like a problem because there isn’t a privacyIDEA release for anything later than 14.04—fortunately, there’s a very easy workaround.
You need a Ubuntu server that’s up and running, and that server will need to have a full LAMP stack. You can install privacyIDEA with NGINX, but I’m going to stick with what I know best: Apache.