1、安装jdk1.8:
yum install java-1.8.0-openjdk* -y

2、下载Solr7.2.0:
wget http://archive.apache.org/dist/lucene/solr/7.2.0/solr-7.2.0.tgz

3、解压Solr:
tar -zxvf ./solr-7.2.0.tgz

4、启动Solr(监听9090端口):

cd ./solr-7.2.0/bin
./solr start -p 9090 -force

5、打开Web管理界面并创建Core:
http://localhost:9090/solr
0_1539681864680_WX20181016-172321@2x.png

点击『Add Core』后会出现如下错误:

Error CREATEing SolrCore 'new_core': Unable to create core [new_core] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/home/service/solr-7.2.0/server/solr/new_core'

解决方式:

cd ./solr-7.2.0
cp -r ./server/solr/configsets/sample_techproducts_configs/conf ./server/solr/new_core/

然后再次点击『Add Core』按钮即可添加成功:
0_1539682226326_WX20181016-173012@2x.png