SlideShare a Scribd company logo
Apache Solr
Configuration
With Drupal 7.X
Installation steps for JDK & tomcat
Step1: aptitude install java7-jdk
Step 2: Download the latest tar.gz binary of Tomcat 7 from
http://tomcat.apache.org/download-70.cgi to /usr/local/src/ on the server.
Step 3: Unpack the Tomcat tar.gz file to /usr/local/tomcat
tar -C /usr/local -zxf /usr/local/src/apache-tomcat-7.*.tar.gz
mv /usr/local/apache-tomcat-7.* /usr/local/tomcat
{ Equivalent to create a directory at /usr/local/tomcat and put extracted content
in Tomcat folder }
Tomcat Installation
Step 3: Unpack the Tomcat tar.gz file to /usr/local/tomcat
tar -C /usr/local -zxf /usr/local/src/apache-tomcat-7.*.tar.gz
mv /usr/local/apache-tomcat-7.* /usr/local/tomcat
OR
Create a directory at /usr/local/tomcat and put extracted content in Tomcat folder
Step 4: By default Tomcat listens on port 8080. However, that is a commonly used
port for other services as well. To avoid conflict, change Tomcat to use port 8983
instead with this search/replace command.
sudo sed -i s/8080/8983/g /usr/local/tomcat/conf/server.xml
Step 5: Finally, restart your tomcat
sudo -u tomcat /usr/local/tomcat/bin/startup.sh
After proper installation you would be able to connect Tomcat And it would be
like this at http://localhost:8983/
Some Linux distributions also provide a Solr package in its repository, but it is typically an
old version. Just like with Tomcat, installing the latest package from the upstream project
is the method used here.
Step 1: Download Solr-4.3.1 from http://lucene.apache.org/solr/ to the server and unpack
the downloaded file.
tar -zxf solr-4.3.1.tgz
OR
Extract anywhere downloaded tar file.
Step 2: Copy the java libraries provided by Solr to the Tomcat library directory
cp solr-4.3.1/dist/solrj-lib/* /usr/local/tomcat/lib
OR
All inner content of cp solr-4.3.1/dist/solrj-lib should be copied to /usr/local/tomcat/lib
Solr Installation
Step 3: Copy the log4j configuration file provided by Solr to the Tomcat configuration
directory
cp solr-4.3.1/example/resources/log4j.properties /usr/local/tomcat/conf/
OR
copy solr-4.3.1/example/resources/log4j.properties to /usr/local/tomcat/conf/
Step 4: Copy the Solr webapp file to the Tomcat webbapp directory
cp solr-4.3.1/dist/solr-4.3.1.war /usr/local/tomcat/webapps/solr.war
OR
copy solr-4.3.1.war file to usr/local/tomcat/webapps/ & rename it to solr.war
Step 5: Create the Solr context file at /usr/local/tomcat/conf/Catalina/localhost/solr.xml with
the following contents.
<Context docBase="/usr/local/tomcat/webapps/solr.war" debug="0" crossContext="true">
<Environment name="solr/home" type="java.lang.String" value="/usr/local/tomcat/solr" override="true" />
</Context>
Solr is capable of providing multiple search indexes, or cores, using just one instance of
the Solr application. Each core is independently configured, and there is a single
configuration file to define each of the cores. The steps below show how to create a core
named drupal. These steps can be used to create as many cores as required, each with
a unique name.
Step 1: Create the base Solr directory, and create a copy of the example configuration
mkdir -p /usr/local/tomcat/solr
cp -r solr-4.3.1/example/solr/collection1/conf /usr/local/tomcat/solr/
OR
Create a folder at /usr/local/tomcat/ and name it solr
Then copy solr-4.3.1/example/solr/collection1/conf i.e. conf folder to /usr/local/tomcat/solr/
So that folder path would be /usr/local/tomcat/solr/conf
Solr Indexes
Step 2: Download the latest version of the apachesolr Drupal module from
https://drupal.org/project/apachesolr to the server and unpack the downloaded file.
tar -zxf apachesolr-*.tar.gz
OR
Extract it
Step 3: Copy the Solr configuration files from the Drupal module to the example Solr
configuration directory from above.
rsync -av apachesolr/solr-conf/solr-4.x/ /usr/local/tomcat/solr/conf/
OR
Copy all files from Drupal Module apachesolr/solr-conf/solr-4.x/ to /usr/local/tomcat/solr/conf/
This will ask to rewrite files please rewrite them
Step 4: Create the Solr core definition file at /usr/local/tomcat/solr/solr.xml with the following
contents to define the drupal core.
<?xml version="1.0" encoding="UTF-8" ?>
<solr persistent="false">
<cores adminPath="/admin/cores">
<core name="drupal" instanceDir="drupal" />
</cores>
</solr>
Step 5: Create the drupal Solr core directory as defined above, and copy the example Solr
configuration files to that location. These configuration files can be further modified as
needed for any specific requirements for this core.
mkdir /usr/local/tomcat/solr/drupal
cp -r /usr/local/tomcat/solr/conf /usr/local/tomcat/solr/drupal/
OR
Create a directory at /usr/local/tomcat/solr/ name with drupal
Then copy all /usr/local/tomcat/solr/conf to /usr/local/tomcat/solr/drupal/
Step 6: Stop Tomcat, make sure the permissions are correct, and start Tomcat back up
/usr/local/tomcat/bin/shutdown.sh
sudo /usr/local/tomcat/bin/startup.sh
The new Solr core admin interface is now available at http://localhost:8983/solr/#/drupal.
Thank You..
For Any Help or Query Please contact us at
info@newtechfusion.com
For more details visit us at –
www.newtechfusion.com
www.drupal-experts.com

More Related Content

PPT
PPT
Linux apache installation
PPTX
RPM (LINUX)
PDF
Refcard en-a4
PPTX
Linux Presentation
PPTX
PPTX
Working with large archives in AtoM in National Library of Wales
PPT
Lession1 Linux Preview
Linux apache installation
RPM (LINUX)
Refcard en-a4
Linux Presentation
Working with large archives in AtoM in National Library of Wales
Lession1 Linux Preview

What's hot (19)

PPTX
Software management in linux
PDF
Sub Version Intro
PPT
Lession2 Xinetd
PDF
linux-commandline-magic-Joomla-World-Conference-2014
PDF
Rhce syllabus | Red Hat Linux Training: IPSR Solutions
PPT
Power point on linux commands,appache,php,mysql,html,css,web 2.0
PPT
Linux presentation
PPT
1.2 boot the system v2
PPT
PPT
Linux Webserver Installation Command and GUI.ppt
PPT
Apache1.ppt
PDF
Step by-step process guide for alfresco migration from 5.x to 6.0
PPT
101 2.4 use debian package management
ODT
RHCE FINAL Questions and Answers
PPTX
How to add system calls to OS/161
DOCX
Isolating an applications using LXC – Linux Containers
PDF
L.A.M.P Installation Note --- CentOS 6.5
PPTX
SquirrelMail for webmail
DOC
Ubuntu安装SVN总结
Software management in linux
Sub Version Intro
Lession2 Xinetd
linux-commandline-magic-Joomla-World-Conference-2014
Rhce syllabus | Red Hat Linux Training: IPSR Solutions
Power point on linux commands,appache,php,mysql,html,css,web 2.0
Linux presentation
1.2 boot the system v2
Linux Webserver Installation Command and GUI.ppt
Apache1.ppt
Step by-step process guide for alfresco migration from 5.x to 6.0
101 2.4 use debian package management
RHCE FINAL Questions and Answers
How to add system calls to OS/161
Isolating an applications using LXC – Linux Containers
L.A.M.P Installation Note --- CentOS 6.5
SquirrelMail for webmail
Ubuntu安装SVN总结
Ad

Similar to Apache solr configuration with drupal 7 (20)

PPTX
Drupal7 and Apache Solr
PPTX
DRUPAL Search API Solr
ODP
Solr a.b-ab
PDF
Introduction Apache Solr & PHP
PDF
Apache Solr! Enterprise Search Solutions at your Fingertips!
PPTX
Apachesolr presentation
PPTX
Drupal 7 and SolR
PPTX
Apache Solr + ajax solr
PPTX
Making your Drupal fly with Apache SOLR
PDF
Apache solr liferay
KEY
Switching search to SOLR
KEY
Intro to Apache Solr for Drupal
PDF
EF09-Installing-Alfresco-components-1-by-1.pdf
PDF
PLAT-4 Understanding the SOLR Integration
PPTX
Introduction Apache solr 4.4
PDF
Intro to Apache Solr
PDF
PPT
Apache Solr search for Drupal. Ievgen Kartakov.
PDF
Rebuilding Solr 6 Examples - Layer by Layer: Presented by Alexandre Rafalovit...
PPTX
Coffee at DBG- Solr introduction
Drupal7 and Apache Solr
DRUPAL Search API Solr
Solr a.b-ab
Introduction Apache Solr & PHP
Apache Solr! Enterprise Search Solutions at your Fingertips!
Apachesolr presentation
Drupal 7 and SolR
Apache Solr + ajax solr
Making your Drupal fly with Apache SOLR
Apache solr liferay
Switching search to SOLR
Intro to Apache Solr for Drupal
EF09-Installing-Alfresco-components-1-by-1.pdf
PLAT-4 Understanding the SOLR Integration
Introduction Apache solr 4.4
Intro to Apache Solr
Apache Solr search for Drupal. Ievgen Kartakov.
Rebuilding Solr 6 Examples - Layer by Layer: Presented by Alexandre Rafalovit...
Coffee at DBG- Solr introduction
Ad

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Big Data Technologies - Introduction.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Approach and Philosophy of On baking technology
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Machine Learning_overview_presentation.pptx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
Cloud computing and distributed systems.
Reach Out and Touch Someone: Haptics and Empathic Computing
Chapter 3 Spatial Domain Image Processing.pdf
Machine learning based COVID-19 study performance prediction
Big Data Technologies - Introduction.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
The AUB Centre for AI in Media Proposal.docx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Approach and Philosophy of On baking technology
Per capita expenditure prediction using model stacking based on satellite ima...
20250228 LYD VKU AI Blended-Learning.pptx
A comparative analysis of optical character recognition models for extracting...
MIND Revenue Release Quarter 2 2025 Press Release
Building Integrated photovoltaic BIPV_UPV.pdf
Unlocking AI with Model Context Protocol (MCP)
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Digital-Transformation-Roadmap-for-Companies.pptx
Network Security Unit 5.pdf for BCA BBA.
Machine Learning_overview_presentation.pptx
Assigned Numbers - 2025 - Bluetooth® Document

Apache solr configuration with drupal 7

  • 2. Installation steps for JDK & tomcat Step1: aptitude install java7-jdk Step 2: Download the latest tar.gz binary of Tomcat 7 from http://tomcat.apache.org/download-70.cgi to /usr/local/src/ on the server. Step 3: Unpack the Tomcat tar.gz file to /usr/local/tomcat tar -C /usr/local -zxf /usr/local/src/apache-tomcat-7.*.tar.gz mv /usr/local/apache-tomcat-7.* /usr/local/tomcat { Equivalent to create a directory at /usr/local/tomcat and put extracted content in Tomcat folder } Tomcat Installation
  • 3. Step 3: Unpack the Tomcat tar.gz file to /usr/local/tomcat tar -C /usr/local -zxf /usr/local/src/apache-tomcat-7.*.tar.gz mv /usr/local/apache-tomcat-7.* /usr/local/tomcat OR Create a directory at /usr/local/tomcat and put extracted content in Tomcat folder Step 4: By default Tomcat listens on port 8080. However, that is a commonly used port for other services as well. To avoid conflict, change Tomcat to use port 8983 instead with this search/replace command. sudo sed -i s/8080/8983/g /usr/local/tomcat/conf/server.xml Step 5: Finally, restart your tomcat sudo -u tomcat /usr/local/tomcat/bin/startup.sh
  • 4. After proper installation you would be able to connect Tomcat And it would be like this at http://localhost:8983/
  • 5. Some Linux distributions also provide a Solr package in its repository, but it is typically an old version. Just like with Tomcat, installing the latest package from the upstream project is the method used here. Step 1: Download Solr-4.3.1 from http://lucene.apache.org/solr/ to the server and unpack the downloaded file. tar -zxf solr-4.3.1.tgz OR Extract anywhere downloaded tar file. Step 2: Copy the java libraries provided by Solr to the Tomcat library directory cp solr-4.3.1/dist/solrj-lib/* /usr/local/tomcat/lib OR All inner content of cp solr-4.3.1/dist/solrj-lib should be copied to /usr/local/tomcat/lib Solr Installation
  • 6. Step 3: Copy the log4j configuration file provided by Solr to the Tomcat configuration directory cp solr-4.3.1/example/resources/log4j.properties /usr/local/tomcat/conf/ OR copy solr-4.3.1/example/resources/log4j.properties to /usr/local/tomcat/conf/ Step 4: Copy the Solr webapp file to the Tomcat webbapp directory cp solr-4.3.1/dist/solr-4.3.1.war /usr/local/tomcat/webapps/solr.war OR copy solr-4.3.1.war file to usr/local/tomcat/webapps/ & rename it to solr.war Step 5: Create the Solr context file at /usr/local/tomcat/conf/Catalina/localhost/solr.xml with the following contents. <Context docBase="/usr/local/tomcat/webapps/solr.war" debug="0" crossContext="true"> <Environment name="solr/home" type="java.lang.String" value="/usr/local/tomcat/solr" override="true" /> </Context>
  • 7. Solr is capable of providing multiple search indexes, or cores, using just one instance of the Solr application. Each core is independently configured, and there is a single configuration file to define each of the cores. The steps below show how to create a core named drupal. These steps can be used to create as many cores as required, each with a unique name. Step 1: Create the base Solr directory, and create a copy of the example configuration mkdir -p /usr/local/tomcat/solr cp -r solr-4.3.1/example/solr/collection1/conf /usr/local/tomcat/solr/ OR Create a folder at /usr/local/tomcat/ and name it solr Then copy solr-4.3.1/example/solr/collection1/conf i.e. conf folder to /usr/local/tomcat/solr/ So that folder path would be /usr/local/tomcat/solr/conf Solr Indexes
  • 8. Step 2: Download the latest version of the apachesolr Drupal module from https://drupal.org/project/apachesolr to the server and unpack the downloaded file. tar -zxf apachesolr-*.tar.gz OR Extract it Step 3: Copy the Solr configuration files from the Drupal module to the example Solr configuration directory from above. rsync -av apachesolr/solr-conf/solr-4.x/ /usr/local/tomcat/solr/conf/ OR Copy all files from Drupal Module apachesolr/solr-conf/solr-4.x/ to /usr/local/tomcat/solr/conf/ This will ask to rewrite files please rewrite them Step 4: Create the Solr core definition file at /usr/local/tomcat/solr/solr.xml with the following contents to define the drupal core.
  • 9. <?xml version="1.0" encoding="UTF-8" ?> <solr persistent="false"> <cores adminPath="/admin/cores"> <core name="drupal" instanceDir="drupal" /> </cores> </solr> Step 5: Create the drupal Solr core directory as defined above, and copy the example Solr configuration files to that location. These configuration files can be further modified as needed for any specific requirements for this core. mkdir /usr/local/tomcat/solr/drupal cp -r /usr/local/tomcat/solr/conf /usr/local/tomcat/solr/drupal/ OR Create a directory at /usr/local/tomcat/solr/ name with drupal Then copy all /usr/local/tomcat/solr/conf to /usr/local/tomcat/solr/drupal/
  • 10. Step 6: Stop Tomcat, make sure the permissions are correct, and start Tomcat back up /usr/local/tomcat/bin/shutdown.sh sudo /usr/local/tomcat/bin/startup.sh The new Solr core admin interface is now available at http://localhost:8983/solr/#/drupal.
  • 11. Thank You.. For Any Help or Query Please contact us at info@newtechfusion.com For more details visit us at – www.newtechfusion.com www.drupal-experts.com