Make sure you have installed supported SQL Server version, with reporting services in native mode.
- SQL Server 2016
- SQL Server 2014
Setup SharePoint Foundation 2013. This is optional. How to setup SharePoint Foundation 2013 is here.
Optional search feature can be configured as well. More information of the feature here.
Configure optional SharePoint for TFS, if the SharePoint foundation is setup earlier. Make sure alternate access mappings for SharePoint urls properly set.
Download Java runtime 8u102 from here and install.
This happens because JAVA_HOME is not properly set with JRE install. how to set JAVA_HOME is here. Setting JRE_HOME is not working for TFS, You have to set JAVA_HOME environment variable. Make sure to use the shortened path name.