使用./post.sh提交数据需要curl
sudo apt-get install curl
查看索引大小
du -h /var/solr
给solr加访问权限控制
sudo vi /etc/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的安全机制
编辑sudo vi /etc/default/tomcat6
注释掉最后一句TOMCAT6_SECURITY=no
reference:
http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Remote_Address_Filter
reference:http://ajavaask.5d6d.com/viewthread.php?tid=20
reference:http://www.unidata.ucar.edu/projects/THREDDS/tech/reference/TomcatSecurity.html