Configure apachesolr in ubuntu and integrate the Drupal search api solr module

Source: Internet
Author: User
Tags mkdir solr drupal tomcat

Install tomcat:

The code is as follows: Copy code

Apt-get update
Apt-get install tomcat6 tomcat6-admin

Download and install apachesolr:

The code is as follows: Copy code

Wget http://mirrors.cnnic.cn/apache/lucene/solr/4.7.2/solr-4.7.2.tgz
Tar-vxf solr-4.7.2.tgz
Mkdir/opt/solr
Solr-4.4.0/example/solr/*/opt/solr/
Cp solr-4.4.0/example/webapps/solr. war/opt/solr/
Cp-r solr-4.4.0/example/lib/ext/*/var/lib/tomcat6/shared/

Edit the apachesolr configuration file:

The code is as follows: Copy code

Vi/opt/solr/collection1/conf/solrconfig. xml

The "dataDir" parameter uses the following values:

<DataDir >$ {solr. data. dir:/opt/solr/data} </dataDir>

Change folder permissions:

The code is as follows: Copy code

Mkdir/opt/solr/data
Chown tomcat6/opt/solr/data/
Chmod 777/opt/solor/data/

---- Apachesolr server configuration ends now ----------
Download and install Drupal's search api module and search api solr module. The process is not described in detail.
Copy the configuration file about apachesolr that comes with the search api solr module to the following path: (it is best to back up the file before copying)

The code is as follows: Copy code

Cp solr-conf/4.x/ */opt/solr/collection1/conf/

If you are prompted to overwrite the data, overwrite all data.
Restart the tomcat service:

The code is as follows: Copy code

Service tomcat6 restart

So far, the apachesolr server configuration is complete.
If you are not a ubuntu system, you can also find clues from the above configuration process.

Next time, let's take a short look at how to configure the search api solr module so that the website can use the apachesolr engine to search for your website content.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.