Revamp installation scripts to make the more modular

This is to prepare for making scripts to install a database server.