Step 1: download banana from github
[root@cdh60b ~]# wget https://github.com/lucidworks/banana/archive/release.zip
Step 2: unzip the release file into "/opt/cloudera/parcels/CDH/lib/solr/server/solr-webapp/webapp/"
[root@cdh60b ~]# unzip release.zip
[root@cdh60b ~]# mv banana-release /opt/cloudera/parcels/CDH/lib/solr/server/solr-webapp/webapp/banana
[root@cdh60b webapp]# ls -l /opt/cloudera/parcels/CDH/lib/solr/server/solr-webapp/webapp/banana/
total 72
-rw-r--r-- 1 root root 665 Jun 4 2017 bower.json
-rw-r--r-- 1 root root 2669 Jun 4 2017 build.xml
-rw-r--r-- 1 root root 2464 Jun 4 2017 CONTRIBUTING.md
-rw-r--r-- 1 root root 262 Jun 4 2017 default.properties
-rw-r--r-- 1 root root 8478 Jun 4 2017 Gruntfile.js
-rw-r--r-- 1 root root 1531 Jun 4 2017 index.html
drwxr-xr-x 2 root root 31 Jun 4 2017 jetty-contexts
-rw-r--r-- 1 root root 610 Jun 4 2017 LICENSE.md
-rw-r--r-- 1 root root 2169 Jun 4 2017 mvn.template
-rw-r--r-- 1 root root 6990 Jun 4 2017 NOTICE.txt
-rw-r--r-- 1 root root 2176 Jun 4 2017 package.json
-rw-r--r-- 1 root root 3369 Jun 4 2017 pom.xml
-rw-r--r-- 1 root root 131 Jun 4 2017 QUICKSTART
-rw-r--r-- 1 root root 9969 Jun 4 2017 README.md
drwxr-xr-x 7 root root 134 Jun 4 2017 resources
drwxr-xr-x 8 root root 107 Jun 4 2017 src
drwxr-xr-x 4 root root 116 Jun 4 2017 test
Step 3, restart SOLR service using Cloudera manager.
http://cdh60b.dbaglobe.com:8983/solr/banana/src/index.html#/dashboard
If you want to save and load dashboards from Solr, then you need to create a collection called banana-int first. For Solr 6, here are the steps:
[donghua@cdh60b ~]$ cd /opt/cloudera/parcels/CDH/lib/solr/bin
[donghua@cdh60b bin]$ ls
init.d oom_solr.sh sentryMigrationTool solr.cmd solr.in.cmd zksynctool.sh
install_solr_service.sh post snapshotscli.sh solrctl.sh solr.in.sh
log4j.properties sentrycli.sh solr solrd zkcli.sh
[donghua@cdh60b bin]$ ./solr create -c banana-int
WARNING: Using _default configset. Data driven schema functionality is enabled by default, which is
NOT RECOMMENDED for production use.
To turn it off:
curl http://localhost:8983/solr/banana-int/config -d '{"set-user-property": {"update.autoCreateFields":"false"}}'
Connecting to ZooKeeper at cdh60b.dbaglobe.com:2181/solr ...
INFO - 2018-08-21 09:48:58.220; org.apache.solr.client.solrj.impl.ZkClientClusterStateProvider; Cluster at cdh60b.dbaglobe.com:2181/solr ready
Uploading /opt/cloudera/parcels/CDH/lib/solr/server/solr/configsets/_default/conf for config banana-int to ZooKeeper at cdh60b.dbaglobe.com:2181/solr
Creating new collection 'banana-int' using command:
http://localhost:8983/solr/admin/collections?action=CREATE&name=banana-int&numShards=1&replicationFactor=1&maxShardsPerNode=-1&collection.configName=banana-int
{
"responseHeader":{
"status":0,
"QTime":3084},
"success":{"cdh60b:8983_solr":{
"responseHeader":{
"status":0,
"QTime":1651},
"core":"banana-int_shard1_replica_n1"}}}
No comments:
Post a Comment