solr -- 安装及配置

1:先去官网下个JDK(没有的话),配置JAVA_HOME环境变量指向JDK

2:去官网下个solr  

      http://archive.apache.org/dist/lucene/solr     //注意zip 是windwos的。tgz是linux的。  //注意很多东西在README里面看到,多看官方文档,野路子也可以看

3:在bin目录下面有solr.cmd ,这个solr有一些命令选项和参数,如下

-f            Start Solr in foreground; default starts Solr in the background
                  and sends stdout / stderr to solr-PORT-console.log

  -c or -cloud  Start Solr in SolrCloud mode; if -z not supplied, an embedded Zookeeper
                  instance is started on Solr port+1000, such as 9983 if Solr is bound to 8983

  -h host       Specify the hostname for this Solr instance

  -p port       Specify the port to start the Solr HTTP listener on; default is 8983

  -d dir        Specify the Solr server directory; defaults to server

  -z zkHost     Zookeeper connection string; only used when running in SolrCloud mode using -c
                  To launch an embedded Zookeeper instance, don't pass this parameter.

  -m memory     Sets the min (-Xms) and max (-Xmx) heap size for the JVM, such as: -m 4g
                  results in: -Xms4g -Xmx4g; by default, this script sets the heap size to 512m

  -s dir        Sets the solr.solr.home system property; Solr will create core directories under
                  this directory. This allows you to run multiple Solr instances on the same host
                  while reusing the same server directory set using the -d parameter. If set, the
                  specified directory should contain a solr.xml file, unless solr.xml exists in Zookeeper.
                  This parameter is ignored when running examples (-e), as the solr.solr.home depends
                  on which example is run. The default value is server/solr.

  -e example    Name of the example to run; available examples:
      cloud:          SolrCloud example
      techproducts:   Comprehensive example illustrating many of Solr's core capabilities
      dih:            Data Import Handler
      schemaless:     Schema-less example

  -a opts       Additional parameters to pass to the JVM when starting Solr, such as to setup
                Java debug options. For example, to enable a Java debugger to attach to the Solr JVM
                you could pass: -a "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=18983"
                In most cases, you should wrap the additional parameters in double quotes.

  -noprompt     Don't prompt for input; accept all defaults when running examples that accept user input

  -v and -q     Verbose (-v) or quiet (-q) logging. Sets default log level to DEBUG or WARN instead of INFO

  -V            Verbose messages from this script

简单的启动:solr.cmd start就可以启动了。



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值