solr 官网:http://lucene.apache.org/solr
下载地址:http://archive.apache.org/dist/lucene/solr/5.5.5/solr-5.5.5.tgz
安装JDK
yum install java-1.8.0-openjdk -y
查看JDK版本
[root@localhost ~]# java -version openjdk version "1.8.0_171" OpenJDK Runtime Environment (build 1.8.0_171-b10) OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode)
安装Solr
wget http://archive.apache.org/dist/lucene/solr/5.5.5/solr-5.5.5.tgz tar -xzf solr-5.5.5.tgz mv solr-5.5.5/ /usr/local/ ln -s /usr/local/solr-5.5.5/bin/solr /usr/loacl/bin/solr
启动和关闭Solr
[root@localhost ~]# solr start Waiting up to 30 seconds to see Solr running on port 8983 [/] Started Solr server on port 8983 (pid=14240). Happy searching! [root@localhost ~]# solr stop Sending stop command to Solr running on port 8983 ... waiting 5 seconds to allow Jetty process 14240 to stop gracefully.
创建core
[root@localhost ~]# solr create -c test Copying configuration to new core instance directory: /usr/local/solr-5.5.5/server/solr/test Creating new core 'test' using command: http://localhost:8983/solr/admin/cores?action=CREATE&name=test&instanceDir=test { "responseHeader":{ "status":0, "QTime":380}, "core":"test"}
删除core
[root@nanjing ~]# solr delete -c test Deleting core 'test' using command: http://localhost:8983/solr/admin/cores?action=UNLOAD&core=test&deleteIndex=true&deleteDataDir=true&deleteInstanceDir=true {"responseHeader":{ "status":0, "QTime":6}}
本文链接:https://jeff.xin/post/102.html
--EOF--
发表于 2018-07-11 ,并被添加「 Solr 」标签 。
Comments
发表评论:
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。