Get solr and save it locally, and untar it
mkdir ~/solr_install
cd ~/solr_install
wget http://apache.claz.org/lucene/solr/7.2.1/solr-7.2.1.tgz
tar xzf solr-7.2.1.tgz solr-7.2.1/bin/install_solr_service.sh --strip-components=2
run the installer – note the -u specifies that solr runs as the mdid user which hopefully has more advantages than disadvantages (for me it was not having to switch so many accounts)