知识点
相关文章
更多最近更新
更多Apache Solr 访问权限控制
2019-03-27 01:10|来源: 网路
在Tomcat6增加 Solr的访问权限方法如下:
编辑tomcat6/Catalina/localhost/solr.xml
<Context docBase="/var/solr/solr.war" debug="0" privileged="true" allowLinking="true" crossContext="true">
<Environment name="solr/home" type="java.lang.String" value="/var/solr" override="true"/>
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="192.168.1.100,localhost,192.168.1.103,127.0.0.1"/>
<Valve className="org.apache.catalina.valves.RemoteAddrValve" deny="192.168.1.105"/>
</Context>
可参考Tomcat配置文档:http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Remote_Address_Filter
要使上面的配置生效,还需要重新开启tomcat的安全机制
编辑sudo vi /etc/default/tomcat6
注释掉最后一句TOMCAT6_SECURITY=no
要了解更多的安全机制,可查阅Solr Wiki:http://wiki.apache.org/solr/SolrSecurity
转自:http://www.cnblogs.com/ibook360/archive/2011/11/07/2239247
相关问答
更多-
Using BasicAuth with SolrJ In SolrJ, the basic authentication credentials need to be set for each request as in this example: SolrRequest req ;//create a new request object req.setBasicAuthCredentials(userName, password); solrClient.request(req); Query exa ...
-
更改solr目录权限 R – Read W – Write C – Change (write) F – Full control takeown /f
change solr Directory permission R – Read W – Write C – Change (write) F – Full control takeown /f -
部署Apache Solr(Deploying Apache Solr)[2022-03-01]
Solr需要在Java EE应用程序服务器中运行。 您可以使用Jetty或Tomcat 。 Nginx将通过AJP或simliar充当代理,将所有RESTless请求转发给Solr。 我没有使用我的ajp与nginx,但我已经读过这个 。 基本上,您将同时运行所有Java EE应用程序服务器,Rails服务器,nginx,passenger和ajp代理。 您还可以设置代理通行证,这里有一个教程 。 探索不同的选项,看看哪一个是你的赌注。 Solr needs to run in a Java EE appl ... -
我在哪里下载solr? (SO独立) 你可以从这里得到solr 5.5.0。 我如何从Windows控制台启动solr? $ solr-5.5.0/bin/solr.cmd start 我如何创建一个集合(从Windows控制台)? $ solr-5.5.0/bin/solr create -c gettingstarted “起步”是你收藏的名字。 我如何从Java创建连接? (SO独立) 这部分有点棘手,因为它已经改变了不同的solr版本。 现在,你可以这样做: String urlStr ...
-
在SOLR中创建分片(creating shard in SOLR)[2021-12-29]
您正在使用错误的API。 UpdateRequest用于对索引数据执行操作(添加/删除文档等),而不用于管理集合的设置方式,例如创建分片,您需要使用此 You are using the wrong api. The UpdateRequest is for performing actions on the index data (adding/deleting docs etc), not for managing how the collection is set up, for creating a ... -
Apache Solr:如何从另一台服务器访问和索引文件(Apache Solr : How to access and index files from another server)[2022-08-01]
我终于找到了solr-user邮件列表的答案。 只需将baseDir更改为其他服务器上存在的文件夹(SMB路径可直接使用): baseDir="\\CLDServer2\RemoteK2Depot" I finally found the answer from the solr-user mailing list. Just change the baseDir to the folder present on another server (SMB paths works directly): bas ... -
在这里找到它: http : //alvinalexander.com/java/jdbc-connection-string-mysql-postgresql-sqlserver (参见页面底部) 在我必须使用的连接字符串中变成了@而不是@ ://现在它可以工作:) Found it here: http://alvinalexander.com/java/jdbc-connection-string-mysql-postgresql-sqlserver (see bottom of page) Turn ...
-
Azure上的Apache Solr(Apache Solr on Azure)[2023-06-05]
他们今天刚刚宣布您现在可以将群集自定义应用于正在运行的群集 。 请参阅Solr群集自定义页面。 仍不建议手动在正在运行的集群上安装内容(而不是使用集群自定义脚本)。 首先,当需要关闭一个节点进行维护时,新节点将在没有安装自定义软件的情况下重新启动。 其次,群集自定义脚本与Azure通信,支持在打开支持案例时对群集所做的更改。 They just announced today that you can now apply cluster customizations to a running cluster ... -
在任何insert/select/update/delete请求之前总是PING solr服务器 $solr = new Apache_Solr_Service($hostname, $portname,$core); if(!$solr->ping()) { echo "server not responding"; exit; } $solr->search($basicQuery, $start_limit,$end_limit,$params); always PIN ...
-
当您以Solr用户身份运行时,必须让solr用户访问您要编写配置的目录。 如果这是/opt/solr ,则可以通过发出chown命令递归地更改目录的所有者和所有包含的文件: chown -R solr.solr /opt/solr 这假设您的系统上还有一个名为solr的组。 如果您没有solr组,请使用另一个合适的组,或将最后一个.solr保留在命令之外。 When you're running as the Solr user, you'll have to give the solr user acc ...