栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

How to configure Magento Enterpise to use Solr as the main search engine?

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

How to configure Magento Enterpise to use Solr as the main search engine?

Magento - Solr Installation & Configuration

  1. Make sure the Java JDK is installed:

    1. sudo add-apt-repository ppa:sun-java-community-team/sun-java6
    2. sudo apt-get update
    3. sudo apt-get install sun-java6-jre sun-java6-jdk
  2. Install & Configure Tomcat:

    • Installation:
      sudo apt-get install tomcat6 tomcat6-admin tomcat6-common tomcat6-user

    • Configuration:
      vi /etc/tomcat6/tomcat-users.xml

    • Add the following roles and user to the configuration.

          <role rolename="admin"/>


    • Restart the server: /etc/init.d/tomcat6 restart

If all goes well, goto http://hostname:8080

  1. Install Solr:

    • Check for the latest distro here.. http://apache.rediris.es/lucene/solr/
    • Download release http://apache.rediris.es/lucene/solr/3.3.0/apache-solr-3.3.0.zip
    • Install & Configure

    • unzip apache-solr-3.3.0.zip

    • mkdir /usr/share/tomcat6/webapps
    • cp apache-solr-3.3.0/dist/apache-solr-3.3.0.war /usr/share/tomcat6/webapps/solr.war
    • cp -r apache-solr-3.3.0/example/solr /usr/share/tomcat6/solr
    • vi /etc/tomcat6/Catalina/localhost/solr.xml

       <Context docbase="/usr/share/tomcat6/webapps/solr.war" debug="0" privileged="true" allowlinking="true" crossContext="true"><Environment name="solr/home" type="java.lang.String" value="/usr/share/tomcat6/solr" override="true" /></Context>
    • chown -r tomcat6.tomcat6 /var/lib/tomcat6

    • /etc/init.d/tomcat6 restart
    • You should see Solr access on your Tomcat admin/manager page (http://hostname:8080/manager/html)
  2. Configure Magento to use Solr:

    1. Replace the original Solr conf directory with the Magento conf files. The trick is just to copy the directory from Magento, and replace the one in Solr. That’s it!

    2. In Magento, the folder is located in: [magento-instance-root]/lib/Apache/Solr/conf.

    3. In Solr, the folder is located in [Solr-instance-root]/example/solr/conf.

    4. Configure Solr in Magento: In admin, goto System -> Configuration -> Catalog -> Catalog Search


Troubleshooting:

Make sure all configuration files belong to tomcat6:tomcat6
chown -r tomcat6.tomcat6 …

  • /var/lib/tomcat6/conf/Catalina/localhost
  • /usr/share/tomcat6/solr/conf


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/446972.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号