Simple patch, which applies on top of
SOLR-9475. Exits if tar/unzip/service/java unavailable and asks user to install the missing tool first.
Complains but does not exit if lsof is missing.
If switch -n is given, service is not started after install, and we do not exit if java is not found. This allows for Solr to be installed before Java.
The java check is not more sophisticated than requiring "java" on path. We could start looking for it elsewhere, test the one in JAVA_HOME, validate that we have Java8 etc. I can be persuaded into skipping the java test since we do not need Java for the installer, and Solr will run as the "solr" user, not root. Still, lack of java in path for root user is a strong indication that it will probably not be present by default in the newly created solr user either, and service start will fail...