Ubuntu 16.04
Binaries are installed to /opt
and init.d scripts are installed with version suffix.
Ex.
sudo service php-fpm-7.2.15 start
sudo service mysqld-5.6.43 start
sudo bash {script} {version}
Install PHP 7.2.15
sudo bash install_php.sh 7.2.15
Remove PHP 7.2.15
sudo bash remove_php.sh 7.2.15
Install MySQL 5.7.25
sudo bash install_mysql.sh 5.7.25
Remove MySQL 5.7.25
sudo bash remove_mysql.sh 5.7.25