How to set up Solr on Ubuntu 10.04 (or whatever)

How to set up Solr on Ubuntu 10.04 (or whatever) | Tags: solr search Apache Solr is a fast, open-source search solution. People are doing some very cool things with Solr. I personally have only begun to scratch the surface of what is possible with Solr, but have seen amazing returns with a relatively small investment (thanks entirely to Daniel Lindsley's excellent search framework, django-haystack). There are instructions for getting up and running with Solr + Jetty -- the purpose of this blog entry is to walk through setting up multi-core Solr with Apache Tomcat. Let's go First step, install the server: sudo apt-get install tomcat6 Next you'll want to get Solr and extract it to a temporary directory mkdir -p ~/tmp/solr/ cd ~/tmp/solr/ wget http://apache.multihomed.net/lucene/solr/1.4.0/apache-solr-1.4.0.tgz tar xzf apache-solr-1.4.0.tgz All the solr cores and indexes will go in /var/solr: sudo mkdir -p /var/solr Copy the Solr webapp and the example multicore configuration files: sudo cp apache-solr-1.4.0/dist/apache-solr-1.4.0.war /var/solr/solr.war sudo cp -R apache-solr-1.4.0/example/multicore/* /var/solr/ sudo chown -R tomcat6 /var/solr/ OK, now just need to point Catalina at Solr: echo -e ' 'crossContext="true">\n 'override="true" />\n' | sudo tee -a /etc/tomcat6/Catalina/localhost/solr.xml echo 'TOMCAT6_SECURITY=no' | sudo tee -a /etc/default/tomcat6 I edited the init script (/etc/init.d/tomcat6) to set solr.home, pointing it at /var/solr. I made this change near the top of the file other environment vars are set up: JAVA_OPTS="$JAVA_OPTS -Dsolr.home=/var/solr" Restart Tomcat6 and luxuriate in your newfound power: sudo /etc/init.d/tomcat6 restart Navigate to http://localhost:8080/solr/ - you should get something like this: Where to now? The solrconfig.xml files provided for each core are pretty barebones, so you'll want to replace those with something more like the solrconfig.xml at ~/tmp/solr/apache-solr-1.4.0/example/solr/conf/solrconfig.xml I personally copy all the stuff from the example conf directory into any new cores I create and use that as a starting place.

posted on 2010-07-23 19:11  lexus 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/lexus/archive/2010/07/23/1783994.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值