Can only speak to Google ... if you are capable of installing AMP, on your choice of poison, then yes the 'method' is similar. Google provides what's called minimal OS with some special stuff for Google. One has to install Apache/MySQL/MariaDB/PHP + tweak + the Moodle (I'd do Moodle install/maintenance with git, BTW - other wise it's FTP which is yet another service one has to install, config (securely), then maintain. You'll probably have enough trouble just with Email. Why add to the headaches?
That's good though in that most distros, when they have chosen a PHP for ya, have chosen one that's not brand new ... PHP 7 is a .0. Feel sorry for those Windows folks who may have installed a PHP 7.0.3 as there isn't any easy way (no package manager) to update PHP to the highest/most secure version. And there are already some serious updates that need to be acquired.
Don't know about Ubuntu, like I said, but CentOS 7 requires the installation of epel and webtatic for CentOS 7 in order to acquire (and easly update) version 7 of PHP.
Then there is DNS ... firewalls, other stuff ... so pick your poison and learn the antidotes.
Your Moodle, BTW, doesn't have to be on Ubuntu certain version ... that was a requirement for BBB. There is a plugin for BBB in Moodle. That plugin you config to point to the location of your BBB server.
Again ... 2 cent opinion ...
'spirit of sharing', Ken