Installing multi-core Apache SOLR and Tomcat6 for Drupal 7 with Tika on Ubuntu 12.04 (Precise Pangolin)

First, open up your command line interface, and perform your system updates:

Download updates:

sudo apt-get update

Install updates:

sudo apt-get upgrade

Next, install the suite of Tomcat6 server packages since you can use aptitude to do this. The packages are:

  • tomcat6 - Servlet and JSP engine
  • tomcat6-admin - Admin web applications
  • tomcat6-common - Common files
  • tomcat6-user - Tools to create user instances
  • tomcat6-docs - Documentation
  • tomcat6-examples - Example web applications

At your command line, type:

sudo apt-get install tomcat6 tomcat6-admin tomcat6-common tomcat6-user tomcat6-docs tomcat6-examples

Start Tomcat6:

sudo /etc/init.d/tomcat6 start

Security concerns on public servers:

Tomcat6 runs on port 8080 by default. For the purposes of this tutorial, it is assumed that your Drupal site is on the same server (e.g., localhost), or at least on the same local network, so you don't have to forward this ports from the internet. This will not allow you to make calls to the Apache SOLR server from external sites, but it is considered more secure, especially since Apache SOLR does not have built-in security features (hence the necessity for an access control sub-module for Apache SOLR in Drupal). If you want to access your Apache SOLR server from external sites, then use IP Tables in Ubuntu to restrict access to the server (on port 8080) to certain IP addresses only - the IP addresses of the servers of the external sites.

Download and unpack Apache SOLR to your home directory:

wget http://mirrors.ibiblio.org/apache/lucene/solr/3.6.0/apache-solr-3.6.0.tg...

tar -xvzf apache-solr-3.6.0.tgz

Connect Tomcat6 and Apache SOLR:

To learn where Tomcat6 lives on your system run:

whereis tomcat6

Which should show: /etc/tomcat6 /usr/share/tomcat6

If you switch to the /usr/share/tomcat6 directory, you should see a sub-directory called "webapps"

Copy the apache-solr-3.6.0.war file from the unpacked Apache SOLR folder in your home directory to solr.war in the webapps directory in /usr/share/tomcat6:

sudo cp apache-solr-3.6.0/dist/apache-solr-3.6.0.war /usr/share/tomcat6/webapps/solr.war

Next, copy the example Apache SOLR application directory and all files within (in the unpacked folder) to a new solr folder in /usr/share/tomcat6:

sudo cp -R apache-solr-3.6.0/example/solr/ /usr/share/tomcat6/solr/

Create the Tomcat6-SOLR config file in /etc/tomcat6/Catalina/localhost/solr.xml by:

sudo nano /etc/tomcat6/Catalina/localhost/solr.xml

And fill the file with the following lines (<Context>...</Context>):

<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>

Add one or more users to Tomcat6 to be able to manage Tomcat6 and to check on the SOLR config pages. Edit the Tomcat6 tomcat-users.xml file:

sudo nano /etc/tomcat6/tomcat-users.xml

Within the <tomcat-users> tag, add lines for the admin and manage roles, and then add one line for each user, with your information:

<tomcat-users>
<role rolename="admin"/>
<role rolename="manager"/>
<user username="tc6-admin" password="agoodpassword" roles="admin,manager"/>
</tomcat-users>

Disable Tomcat6 security so that SOLR is able to access /usr/share/tomcat6/solr:

sudo nano /etc/default/tomcat6

Be aware of the security implications, especially on shared and publically accessible servers. Find the section/line and make sure that it is set to no:

TOMCAT6_SECURITY=no

Connect Drupal 7 with Apache SOLR:

Download (Drush or FTP) the latest version of Apache SOLR module for Drupal 7 from http://drupal.org/project/apachesolr into /sites/all/modules of your Drupal installation.

The Drupal 7 version of Apache SOLR does not require you to separately download the SolrPhpClient library, as it is now included in the module!

Switch to the example SOLR application copied to Tomcat6:

cd /usr/share/tomcat6/solr/conf

And move the default configuration files to backups:

schema.xml:

sudo mv schema.xml schema.orig.xml

solrconfig.xml:

sudo mv solrconfig.xml solrconfig.orig.xml

protwords.txt:

sudo mv protwords.txt protwords.orig.txt

Next, copy the Drupal specific configuration files from the module's solr-conf folder into the copied example SOLR application:

schema.xml:

sudo cp /var/www/drupal7/sites/all/modules/apachesolr/solr-conf/schema-solr3x.xml /usr/share/tomcat6/solr/conf/schema.xml

solrconfig.xml:

sudo cp /var/www/drupal7/sites/all/modules/apachesolr/solr-conf/solrconfig-solr3x.xml /usr/share/tomcat6/solr/conf/solrconfig.xml

protwords.txt:

sudo cp /var/www/drupal7/sites/all/modules/apachesolr/solr-conf/protwords.txt /usr/share/tomcat6/solr/conf/protwords.txt

Then, setup Apache SOLR multi-core functionality so you can connect multiple Drupal sites. Start by copying the Apache SOLR multi-core example configuration file:

sudo cp ~/apache-solr-3.6.0/example/multicore/solr.xml /usr/share/tomcat6/solr/solr.xml

You will need to create a directory in /usr/share/tomcat6/solr for each site (core) that you want to index with SOLR. Keep your naming conventions sensible, since you want to be able to easily distinguish between cores when you are connecting the the SOLR core in your Drupal sites. For each site, in /usr/share/tomcat6/solr:

sudo mkdir /usr/share/tomcat6/solr/site1namecore

Then, copy the /usr/share/tomcat6/conf directory into each directory you create:

sudo cp -R /usr/share/tomcat6/solr/conf/ /usr/share/tomcat6/solr/site1namecore/conf/

Make the new directory that you create for each site/core you create belong to the tomcat6 user:

sudo chown -R tomcat6:tomcat6 /usr/share/tomcat6/solr/site1namecore

Leave the /usr/share/tomcat6/solr/conf directory so you can use it to create future cores in the future.

Edit the solr.xml file in /usr/share/tomcat6/solr to add your site (core) names and directories for multi-core setup. There should be one line for each site/core, and the instanceDir for each should correspond to the directory that you created in the above step for each site/core:

sudo nano /usr/share/tomcat6/solr/solr.xml

And replace the default lines with the information for your sites/cores:

<cores adminPath="/admin/cores">
    <core name="site1namecore" instanceDir="site1namecore" />
    <core name="site2namecore" instanceDir="site2namecore" />
  </cores>
</solr>

Get Apache Tika for text data extraction from attached files, via the Apache SOLR attachments module. Switch to your home directory:

cd

Download the latest version of the runnable jar from http://tika.apache.org/download.html (1.1 at the time of writing):

wget http://www.alliedquotes.com/mirrors/apache/tika/tika-app-1.1.jar[/prettify]

Then move it into /usr/share/tomcat6/lib:

sudo mv tika-app-1.1.jar /usr/share/tomcat6/lib

Restart Tomcat6 by:

sudo service tomcat6 restart

In your Drupal site, after enabling the Apache SOLR framework and search modules, go to the SOLR settings page (admin/config/search/apachesolr/settings/solr/edit). For the SOLR server URL, change the port to 8080, and add the core name at the end of the URL:

http://localhost:8080/solr/site1namecore

And save the settings.

After enabling Apache SOLR Attachments, on the settings page (admin/config/search/apachesolr/attachments), enter the Tika directory path and file name:

/usr/share/tomcat6/lib/

tika-app-1.1.jar

Drupal version: 

Comments

curry 5 shoes

I have to get across my passion for your kindness for folks that require assistance with this important field. Your personal dedication to getting the message all-around came to be surprisingly informative and have continually made those just like me to realize their endeavors. Your new important information indicates a whole lot to me and extremely more to my fellow workers. Thank you; from all of us.

air jordan

I wish to show my thanks to this writer for bailing me out of this type of problem. Right after looking through the the net and meeting tips which are not powerful, I was thinking my entire life was well over. Existing without the solutions to the difficulties you've resolved all through your entire posting is a crucial case, and the ones which might have badly damaged my entire career if I hadn't encountered your blog. Your good expertise and kindness in dealing with all the details was useful. I don't know what I would have done if I had not encountered such a thing like this. I'm able to at this moment relish my future. Thanks for your time very much for this professional and amazing guide. I won't hesitate to endorse your web site to any person who should receive direction on this matter.

bape

I would like to convey my love for your kind-heartedness supporting men who really need help with this field. Your real dedication to passing the solution all through appeared to be wonderfully invaluable and have enabled girls just like me to reach their dreams. This useful hints and tips indicates much to me and even more to my colleagues. Warm regards; from everyone of us.

jordan shoes

Thanks a lot for giving everyone an extremely terrific chance to read articles and blog posts from this blog. It's usually so pleasant plus full of a lot of fun for me personally and my office mates to search your web site nearly 3 times weekly to read the fresh tips you have. And indeed, we are certainly motivated with your unbelievable principles you serve. Certain 1 facts in this posting are ultimately the most suitable we've ever had.

kyrie 7 shoes

I enjoy you because of your entire labor on this website. Gloria take interest in carrying out investigation and it's easy to see why. All of us notice all of the lively form you convey sensible information by means of the website and therefore attract contribution from other ones on the area of interest plus my princess is always learning so much. Take pleasure in the rest of the new year. You are carrying out a fantastic job.

off white

I simply needed to thank you so much once again. I do not know the things I would've sorted out in the absence of those smart ideas shared by you directly on this question. It has been a horrifying dilemma in my circumstances, nevertheless discovering your professional avenue you treated it made me to leap with fulfillment. I'm just happy for your advice and as well , believe you realize what a great job you have been getting into educating the rest through your webblog. I am sure you have never got to know all of us.

pg 1

I wish to get across my love for your kindness giving support to those people that actually need assistance with the theme. Your personal dedication to passing the message throughout came to be rather beneficial and has frequently permitted men and women much like me to achieve their aims. Your own warm and helpful suggestions implies much a person like me and even more to my mates. Thank you; from each one of us.

off white

I wish to express thanks to this writer for bailing me out of this instance. Because of checking through the search engines and meeting basics that were not beneficial, I believed my life was gone. Existing devoid of the approaches to the difficulties you've sorted out all through your main article content is a serious case, as well as the kind that could have badly affected my entire career if I had not discovered your website. Your main know-how and kindness in handling all the pieces was important. I am not sure what I would've done if I hadn't discovered such a subject like this. I can at this point look forward to my future. Thanks for your time so much for this impressive and results-oriented help. I won't hesitate to propose your web site to any individual who ought to have guide about this subject matter.

kobe shoes

Needed to send you a bit of word just to thank you the moment again for the pleasing methods you've discussed in this case. It is certainly open-handed with people like you to supply openly precisely what many people could possibly have offered for sale for an e book to make some money for themselves, most importantly given that you could have tried it in the event you desired. The inspiring ideas as well worked to be a fantastic way to comprehend some people have the identical dream just like my own to learn whole lot more related to this problem. Certainly there are a lot more pleasant sessions in the future for those who scan through your blog.

supreme clothing

I in addition to my guys were following the nice advice on your website and then the sudden I had a horrible suspicion I never thanked the site owner for those strategies. My young men are actually consequently stimulated to read through all of them and already have absolutely been loving these things. Appreciate your genuinely really thoughtful as well as for finding this sort of important subject areas most people are really wanting to learn about. Our own honest regret for not saying thanks to you earlier.

curry shoes

I needed to post you that little observation just to give many thanks again on the nice information you have shared on this website. It has been wonderfully open-handed of people like you in giving unreservedly all that most people could possibly have made available for an ebook to earn some cash for their own end, especially considering that you could possibly have tried it if you considered necessary. Those ideas additionally acted to provide a great way to fully grasp many people have the same dreams just like mine to realize more and more related to this issue. I'm certain there are numerous more enjoyable occasions ahead for those who look over your blog.

birkin bag

I precisely had to appreciate you all over again. I do not know what I would have handled in the absence of the actual hints shown by you over my field. Previously it was the frightful setting in my circumstances, nevertheless viewing this skilled avenue you handled the issue forced me to leap with joy. Now i'm happy for the work and then have high hopes you recognize what an amazing job that you're carrying out educating some other people using your blog post. Most probably you haven't encountered all of us.

golden goose sneakers

A lot of thanks for all of the work on this blog. My mum delights in engaging in investigations and it's really simple to grasp why. My spouse and i hear all concerning the compelling tactic you make both interesting and useful tactics on the web site and even improve participation from other individuals about this point plus our daughter has been being taught so much. Take advantage of the remaining portion of the new year. Your carrying out a really good job.

yeezy

I actually wanted to compose a brief comment in order to appreciate you for those stunning tips you are sharing on this website. My considerable internet investigation has at the end been compensated with reputable know-how to go over with my neighbours. I 'd declare that many of us visitors are definitely lucky to exist in a wonderful site with many awesome individuals with useful guidelines. I feel really happy to have used the webpage and look forward to many more exciting moments reading here. Thanks once again for all the details.

kyrie 6

I must show some thanks to this writer just for bailing me out of such a problem. Right after surfing through the world-wide-web and obtaining solutions which were not helpful, I believed my life was gone. Living minus the answers to the problems you've fixed by way of your good review is a serious case, as well as ones which may have in a wrong way damaged my entire career if I had not discovered your website. Your personal know-how and kindness in handling a lot of stuff was important. I don't know what I would have done if I had not encountered such a solution like this. I'm able to at this point look forward to my future. Thanks very much for this high quality and amazing help. I won't think twice to propose the blog to anyone who should receive tips about this issue.

curry shoes

I'm also commenting to make you know what a extraordinary discovery my cousin's girl undergone checking your webblog. She realized some things, with the inclusion of what it is like to possess a marvelous giving mood to get the mediocre ones easily know a variety of tricky topics. You truly did more than our own expectations. Thanks for presenting those invaluable, dependable, educational not to mention unique tips about the topic to Gloria.

kyrie 7 shoes

I am writing to make you understand of the fabulous experience my cousin's princess found studying your web site. She even learned a lot of issues, most notably what it is like to possess an incredible giving mood to make other folks very easily fully understand a variety of extremely tough subject matter. You really surpassed our own expected results. Thanks for displaying such interesting, safe, explanatory and in addition easy guidance on the topic to Mary.

jordan shoes

My husband and i ended up being now satisfied Chris managed to conclude his investigation through your ideas he was given from your very own web page. It's not at all simplistic to simply be giving away hints which usually some people have been making money from. And now we see we have the writer to give thanks to for that. These explanations you've made, the easy blog menu, the friendships your site give support to promote - it is mostly overwhelming, and it's really helping our son and the family feel that this situation is satisfying, which is certainly extremely mandatory. Many thanks for the whole thing!

off white hoodie

I wanted to write down a simple comment so as to say thanks to you for some of the amazing tips and tricks you are placing on this website. My time-consuming internet lookup has at the end of the day been recognized with awesome tips to share with my colleagues. I would admit that many of us readers are very much lucky to exist in a superb community with many lovely individuals with great opinions. I feel rather privileged to have come across your site and look forward to many more amazing moments reading here. Thank you once again for all the details.

paul george

I have to point out my love for your generosity giving support to people that have the need for help with in this idea. Your real commitment to passing the solution all-around turned out to be exceedingly useful and have all the time allowed somebody much like me to get to their pursuits. Your amazing warm and friendly guideline can mean much a person like me and further more to my office workers. Regards; from all of us.

golden goose

I wanted to compose you this little note to thank you very much again over the splendid opinions you've discussed at this time. It has been really particularly open-handed with people like you to present easily just what a lot of folks could possibly have made available as an electronic book to help with making some cash for their own end, specifically now that you could have tried it if you ever decided. These tactics in addition served to become a fantastic way to know that other individuals have a similar dream similar to mine to learn somewhat more in terms of this condition. I am certain there are millions of more enjoyable moments ahead for individuals who take a look at your site.

moncler jacket

My spouse and i ended up being very comfortable when John managed to conclude his analysis with the precious recommendations he made in your web site. It is now and again perplexing to just happen to be giving freely key points that many some other people have been trying to sell. Therefore we already know we need the writer to appreciate for that. Most of the illustrations you have made, the simple blog menu, the relationships your site help to promote - it is all astonishing, and it is assisting our son in addition to us reckon that the idea is awesome, which is unbelievably essential. Thanks for all the pieces!

supreme outlet

I enjoy you because of all of your efforts on this web site. My daughter really likes doing investigations and it's really easy to see why. We all hear all regarding the dynamic manner you produce informative tricks through the blog and therefore inspire response from visitors on the area of interest while my princess is in fact understanding a lot. Have fun with the remaining portion of the new year. You are performing a fabulous job.

kd 12 shoes

I intended to draft you that very small remark in order to give many thanks again for the breathtaking advice you've discussed on this page. This has been really open-handed of you to present publicly all that a few people could have advertised for an ebook to end up making some money for their own end, and in particular now that you might well have done it if you ever desired. Those good tips additionally worked to become a fantastic way to know that some people have the same dream similar to my own to learn much more when considering this issue. I am sure there are thousands of more pleasurable moments ahead for folks who read carefully your blog.

steph curry shoes

I as well as my buddies have already been reading the nice things from your web blog then the sudden I got an awful suspicion I had not expressed respect to the site owner for those techniques. All of the young boys appeared to be consequently passionate to read all of them and have pretty much been having fun with these things. I appreciate you for genuinely simply helpful as well as for picking some essential guides most people are really eager to learn about. Our honest regret for not expressing gratitude to you sooner.

moncler outlet

I would like to express my appreciation to you for rescuing me from this particular dilemma. As a result of looking throughout the world-wide-web and finding ways that were not productive, I was thinking my entire life was over. Being alive devoid of the solutions to the difficulties you have sorted out by way of your good article content is a serious case, as well as the kind that could have badly damaged my entire career if I hadn't come across your blog. Your good expertise and kindness in touching everything was invaluable. I'm not sure what I would've done if I had not come upon such a stuff like this. I am able to now look ahead to my future. Thanks for your time so much for the expert and results-oriented guide. I will not think twice to endorse the sites to anyone who wants and needs guidance about this subject matter.

air jordan

I must voice my admiration for your generosity supporting visitors who really need help on this one area. Your real dedication to getting the solution up and down appears to be particularly productive and have frequently permitted women much like me to arrive at their pursuits. Your new insightful guidelines implies so much to me and additionally to my office colleagues. Warm regards; from everyone of us.

golden goose outlet

I would like to voice my admiration for your kind-heartedness giving support to people who need help with this important topic. Your personal commitment to passing the solution all around became especially insightful and have in every case empowered many people just like me to get to their desired goals. Your own valuable useful information implies a lot to me and a whole lot more to my office workers. Best wishes; from each one of us.

off white jordan 1

I precisely wished to thank you very much again. I do not know the things that I might have tried without those smart ideas discussed by you directly on such industry. It became a distressing difficulty in my view, nevertheless finding out your expert manner you managed that forced me to cry over delight. Extremely grateful for this help and as well , hope that you are aware of a great job your are carrying out teaching the mediocre ones via your webblog. Probably you've never come across any of us.

Cover letter

An thesis that is persuasive comprises the main reason and also a notion. Case in point: as they're flexible, simple to produce, and taste very excellent peanutbutter and jelly sandwiches will be the ideal kind of sandwich.
https://familyday.ee/et/2021/05/06/do-colleges-send-rejection-letters-fi...
http://www.vsbarbarians.com.au/index.php/2021/05/19/3-short-stories-you-...
http://weltnerworldwide.com/10-laws-of-lab-report-writing-services/

Coursework

Margins: In accordance with this MLA, your composition ought to possess a perimeter at , also right . ... Name: Your composition needs to have a name. The name needs to be focused and may appear beneath the going advice on your webpage and over the very first point of one's own article.
https://hyperpeste.ir/how-long-should-it-take-to-write-a-15-page-paper/
https://satellitetopografia.com.br/2021/04/27/can-a-thesis-statement-be-...
http://www.etoile-gouss.fr/2021/05/17/interesting-facts-i-bet-you-never-...

Report

When creating a few of those convincing essays you have to be prepared to spend power, time and devotion to think of a more excellent informative article. The following write-up points out much more. Within this informative article, their secrets are dished out by pros about what best to deal with topic of festivals. A informative article in a couple of easy actions on festivals!
http://indonesiaxolar.com/you-dont-have-to-be-a-big-corporation-to-start...
http://lexusauto.blox.ua/2021/04/no-more-mistakes-with-write-my-assignme...
http://www.florinetravert.fr/2021/04/27/how-do-you-write-an-essay-plan/

Resume

Opt-in for thesis assistance on line from doctorate degree authors and Master's level. Save weeks of composing that is dull, receive a great, good, or even outstanding grade. 10 novels to get an undergraduate majoring in Operation which Can Help You along the career path's listing
http://karaokeua.blox.ua/2021/05/five-rookie-buy-personal-statement-mist...
http://hetvogelnest.be/what-is-the-difference-between-an-introduction-an...
http://cjmk.edu.pk/avoid-the-top-10-mistakes-made-by-beginning-need-help...

Assignment

Chapter certainly one among the thesis functions like a funnel. It starts with a field linked for thesis' name, subsequently reverted also the questions/problems that are currently going to be resolved from the investigation and the factors. In debut you want to describe exactly just what the reader will browse about.
https://jcvitalis.com/5-best-ways-to-sell-how-to-write-a-persuasive-essay/
https://bflandscapes.co.uk/2021/04/20/top-10-cheap-paper-writing-service...
https://fifet.ir/what-stopped-the-civil-rights-movement/

Assignment

The size may fluctuate into 500 phrases out of 250300. Bear in your mind a guideline: regardless just how many words how is, also it needs to consume 3 paragraphs. Every paragraph of one's article that is brief may be 7 10 paragraphs longterm.
http://bostonfinancialresources.com/wp-content/_input_3_page.html
http://todddengler.com/2021/05/10-things-you-have-in-common-with-order-a...
http://www.safetydisaster.net/22-tips-to-start-building-a-write-thesis-f...

air jordan

I simply wanted to appreciate you once again. I'm not certain the things I would've accomplished without those advice revealed by you over such concern. This has been the alarming case for me personally, but coming across this specialized tactic you dealt with it made me to jump for contentment. I am thankful for this service as well as sincerely hope you know what a powerful job that you're undertaking teaching other individuals through your webblog. Probably you haven't got to know all of us.

yeezy shoes

I as well as my guys were looking at the good tips and tricks on your web site and then I got a horrible feeling I had not expressed respect to the website owner for those strategies. Most of the guys ended up for this reason excited to read them and already have in actuality been making the most of those things. Thank you for turning out to be very thoughtful as well as for making a choice on variety of great themes most people are really eager to be aware of. My very own honest apologies for not expressing gratitude to you earlier.

supreme

Thanks for your whole efforts on this blog. Gloria take interest in doing internet research and it is easy to understand why. A number of us know all about the powerful medium you produce advantageous tips on this web site and therefore welcome response from some other people on the matter then our own girl is without question studying a lot of things. Enjoy the remaining portion of the new year. You are carrying out a terrific job.

off white outlet

My husband and i felt now happy that Emmanuel could deal with his survey from your precious recommendations he came across from your very own web site. It is now and again perplexing to just choose to be handing out methods men and women could have been trying to sell. We really do know we have got you to give thanks to because of that. The explanations you've made, the easy website menu, the friendships your site help to promote - it's got everything extraordinary, and it is leading our son and us believe that this content is fun, and that is tremendously mandatory. Thanks for all!

curry shoes

Thank you so much for providing individuals with an extremely splendid possiblity to discover important secrets from this web site. It is always so cool plus full of a great time for me and my office fellow workers to search the blog at the least 3 times in one week to read the fresh tips you have. And definitely, I'm just always motivated with the impressive thoughts you give. Certain 1 areas in this post are really the finest we have all ever had.

Pages

Add new comment