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就可以启动了。



猜你喜欢

转载自blog.csdn.net/dongmelon/article/details/78651384