简体   繁体   English

在服务器上安装Solr:位置?

[英]Installing Solr on Server: Location?

Ok, I've been following this tutorial on getting Solr installed on a server and accessible through Drupal. 好的,我一直在遵循有关在服务器上安装Solr并通过Drupal进行访问的教程 My question is my placement of Solr in the correct spot? 我的问题是我将Solr放在正确的位置吗?

I know my Java works, testing with java -version I know my Tomcat works, tested with service tomcat6 start: Starting tomcat6 [ OK ] 我知道我的Java工作正常,使用java -version进行测试我知道我的Tomcat工作正常,并且service tomcat6 start: Starting tomcat6 [ OK ]进行了测试

Note: Although I can't access Tomcat via http:website.com:8080 (I left the port default) 注意:尽管我无法通过http:website.com:8080访问Tomcat(我保留了默认端口)

My current setup follows: 我当前的设置如下:

/usr/bin/java                           (Java installation - via yum)
/usr/share/tomcat6                      (Tomcat installation - via yum)

/opt/solr                               (Solr Instance Installation - manually)

/opt/share/tomcat6/solr/drupal-solr     (One Solr Core - manually)

/home/website1/public_html              (just a site - I'd like to use Solr here)
/home/website2/public_html              (just another site)
/home/website3/public_html              (just another site)

As stated, "Solr is capable of providing multiple search indexes , or cores , using just one instance of the Solr application. Each core is independently configured, and there is a single configuration file to define each of the cores." 如前所述,“ Solr能够仅使用Solr应用程序的一个实例来提供多个搜索索引核心 。每个核心都是独立配置的,并且有一个配置文件来定义每个核心。”

So say if my website1 needs access to one of my cores of Solr. 假设我的网站1是否需要访问Solr的核心之一。 Would this core need to be installed at... 该内核是否需要安装在...

/home/website1/                         (where my Solr Core should be?)
/home/website1/public_html              (my website files - drupal install)

...correct? ...正确? ...or can I leave my Solr and everything else installed in root above all my websites? ...或者我可以将我的Solr以及其他所有内容都安装在所有网站之上的根目录下吗?

You may debug Tomcat by 您可以通过以下方式调试Tomcat:

  1. Do a curl localhost:8080 if you see Tomcat response, then may be outbound traffic from port 8080 is blocked in security groups or IPTABLES of your webserver 如果您看到Tomcat响应,请执行curl localhost:8080 ,则可能是来自8080端口的出站流量在Web服务器的安全组或IPTABLES中被阻止
  2. If in step1, curl fails, then Tomcat is not running on 8080, it is on some other port. 如果在步骤1中curl失败,则说明Tomcat不在8080上运行,而是在其他端口上。 Please refer to this to find correct port: http://askubuntu.com/questions/143785/what-port-is-tomcat-6-running-on 请参考此文件以找到正确的端口: http://askubuntu.com/questions/143785/what-port-is-tomcat-6-running-on : http://askubuntu.com/questions/143785/what-port-is-tomcat-6-running-on

Yes, you can install Solr anywhere. 是的,您可以在任何地方安装Solr。 You have to let tomcat know where Solr is installed, which is the Step 5: Create the Solr context file in the documentation you have referred to. 您必须让tomcat知道Solr的安装位置,这是您所参考的文档中的“ 步骤5:创建Solr上下文文件 ”。

Suppose your Solr is at: 假设您的Solr位于:

/solr / Solr的

Suppose your multi-cores names are site1, site2, site3, then the multicore structure will look like: 假设您的多核名称为site1,site2,site3,那么多核结构将如下所示:

/solr / Solr的

/solr/site1 / Solr的/ site1的

/solr/site2 / Solr的/站点2

/solr/site3 / Solr的/ site3

Yes, each core will have its own conf directory, with its unique config files such as solrconfig.xml, schema.xml, synonyms.txt etc... 是的,每个内核都将拥有自己的conf目录以及其唯一的配置文件,例如solrconfig.xml,schema.xml,同义词.txt等。

Now if your tomcat is running on port 8080, and suppose your IP is 10.20.30.40, you will be able to access listing of all cores at: 10.20.30.40:8080/solr/ 现在,如果您的tomcat在端口8080上运行,并且假设您的IP为10.20.30.40,您将可以访问以下地址的所有内核列表:10.20.30.40:8080/solr/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM