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:


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

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:

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

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:


Connect Drupal 7 with Apache SOLR:

Download (Drush or FTP) the latest version of Apache SOLR module for Drupal 7 from 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:


sudo mv schema.xml schema.orig.xml


sudo mv solrconfig.xml solrconfig.orig.xml


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:


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


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


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

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


Download the latest version of the runnable jar from (1.1 at the time of writing):


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:


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:



Drupal version: 


Add new comment | arxic Drupal

An intriguing discussion is worth comment. I do believe that
you need to publish more on this issue, it may not be a taboo subject but typically people do not discuss
such issues. To the next! Best wishes!!

Add new comment | arxic Drupal

Great blog! Is your theme custom made or did you
download it from somewhere? A theme like yours with a few
simple tweeks would really make my blog shine. Please let me know where you got your theme.

Add new comment | arxic Drupal

Hi there just wanted to give you a quick
heads up and let you know a few of the pictures aren't loading properly.
I'm not sure why but I think its a linking issue.
I've tried it in two different browsers and both
show the same results.,111527

Add new comment | arxic Drupal

An outstanding share! I have just forwarded this onto a co-worker who has
been doing a little homework on this. And he actually bought
me lunch because I found it for him... lol. So allow me to reword
this.... Thanks for the meal!! But yeah, thanks for spending some time to
talk about this issue here on your nba jerseys from China

Add new comment | arxic Drupal

Hi there! I realize this is kind of off-topic but I needed to
ask. Does managing a well-established blog like yours require a large amount of work?
I'm brand new to blogging but I do write in my diary everyday.
I'd like to start a blog so I can share my experience and views
online. Please let me know if you have any kind of ideas or tips for new aspiring blog owners.

Add new comment | arxic Drupal

Thanks for one's marvelous posting! I really enjoyed reading it,
you might be a great author. I will be sure to bookmark your blog and will often come
back at some point. I want to encourage you to ultimately continue your great job,
have a nice evening!

Add new comment | arxic Drupal

naturally like your web site but you have to test the spelling on several of your posts.
Many of them are rife with spelling problems and I find it very bothersome to inform the reality on the other
hand I will certainly come again again.

Add new comment | arxic Drupal

I know this if off topic but I'm looking into starting my own blog and was curious what
all is needed to get setup? I'm assuming having a blog like yours
would cost a pretty penny? I'm not very internet savvy so I'm not 100% certain. Any recommendations or advice would be greatly appreciated.
Appreciate it

Add new comment | arxic Drupal

Hi there! This is my 1st comment here so I just wanted to give a quick shout
out and tell you I genuinely enjoy reading through your blog posts.
Can you recommend any other blogs/websites/forums that cover the same subjects?
Thank you so much!

Add new comment | arxic Drupal

Hey there great website! Does running a blog like this require a large amount of work?
I've very little expertise in coding but I was hoping to start my own blog soon. Anyways,
should you have any suggestions or tips for new blog owners please
share. I understand this is off subject however I just needed to ask.
Kudos!wholesale hockey jerseys from China

Add new comment | arxic Drupal

Hi there! This blog post couldn't be written any better!
Looking through this article reminds me of my previous roommate!

He always kept talking about this. I most certainly will forward this article
to him. Fairly certain he'll have a great read. Thank you for sharing!

Add new comment | arxic Drupal

I was curious if you ever considered changing the page layout of your blog?
Its very well written; I love what youve got to say.
But maybe you could a little more in the way of content
so people could connect with it better. Youve got an awful lot of text for only having one or two pictures.

Maybe you could space it out better?

Add new comment | arxic Drupal

We absolutely love your blog and find a lot of your post's to be exactly what I'm looking for.
Do you offer guest writers to write content for yourself?
I wouldn't mind producing a post or elaborating on a number of the subjects
you write in relation to here. Again, awesome weblog!

Add new comment | arxic Drupal

Excellent pieces. Keep posting such kind of info on your
page. Im really impressed by your blog.
Hello there, You've performed a fantastic job. I will definitely digg it and personally recommend to
my friends. I'm confident they will be benefited from this web site.

Add new comment | arxic Drupal

I am really enjoying the theme/design of your website. Do you
ever run into any internet browser compatibility problems?
A couple of my blog audience have complained about my website not operating correctly in Explorer but looks great in Safari.
Do you have any tips to help fix this problem?

Add new comment | arxic Drupal

Good post however I was wanting to know if you could write a litte more on this subject?
I'd be very grateful if you could elaborate a little bit further.


I'm very inspired with this

I'm very inspired with this weblog. this indicates it literally does not have any dietary cost and consuming it virtually makes your body use up stored nutrients to method it. last time I visit write my essay this website also awesome Honey then again has many useful nutrients, enzymes, and antioxidants; uncooked honey is first-class as standard honey processing

Add new comment | arxic Drupal

I'm impressed, I have to admit. Seldom do I come across a blog that's both
equally educative and entertaining, and let me tell you, you have hit
the nail on the head. The problem is something
that not enough folks are speaking intelligently
about. I'm very happy that I found this in my search for something concerning this.

Add new comment | arxic Drupal

Hello just wanted to give you a brief heads up and let you know a
few of the pictures aren't loading correctly. I'm not sure why but I think its a linking issue.
I've tried it in two different browsers and
both show the same outcome.

Christian Yelich Jersey UK

" In this context, it is wise to make a short list of the popular clinics in your area. On the flip side, home remedy acne treatments are not medically tested, but they are natural, free and usually contain ingredients that are not harmful. Many of our meals and drinks contain too much sugar and other harmful elements, which can change the pigmentation of our teeth. Not only that, our Manchester repair shop also has a wide range of mobile phone accessories as well as refurbished handsets in the UK. The primary research covers extensive interviews and analysis of the opinions provided by the key opinion leaders based in Russia and other countries. Internet provides many IT solutions to the small business through which you can grow-up your start-up business.</p><p>Regal Amusement Group</p><p>One more place to order cheap movie tickets is through the Regal Movies internet site. Because the competition is extremely stiff for digital marketing services, you only want to hire the best and top-notch services for your company.</p><p>Almost all of the sneakers are made with with cushioned heels which assists relieve foot pains. Free as in you don have to pay for the traffic and traffic generation.</p><p>Nam Dinh is the hardest hit by the typhoon Mirinae. Whether you need a screen repair, water damage or a software upgrade, our expert repair team in Manchester will help you with it."

Larry Sanders Jersey UK

" This will improve the user satisfaction. An extra bonus is finding Clarks Women Shoes That Are Priced Reasonably so you&#8217;re able to really enjoy them without ever blowing your budget. </p><p />Hello, I&#8217;m Wesley Osborn a businessman in Toronto Canada for more information about Electronic Cigarette Brands just visit our website. Therefore, SEO gives your business exposure to people who are looking for a solution. The end use industry covers analysis and market size forecasts of sub-segments such as automotive, aerospace and defense, industrial, rail, and others.</p><p>Allow Ticket Booking for Bus, Train, Flight<br />Based on your business model, you can integrate the bus or train or flight booking in your application. You can use your imagination and come out with containers that will blow the mind of your family and friends.</p><p>No matter which acne treatment you use, be careful of possible irritation.</p><p>Secure and Multiple Payment Options<br />The mobile application will have the inbuilt payment method so your customers can get the confirmed ticket by paying through your application. </p><p>Unlike many of the other islands in the region, it&#8217;s an independent state and self-governing but that independence was hard won. Depuis des annes maintenant, il a t la cration de chefs-d&#8217;?uvre dans les bijoux et les montres. In addition to that, you will also get a fair idea of the quality of services from the clinics."

Will Clapp College Jersey

"<br />Allowing customer for the feedback of their product. The information contained herein is not intended to be used in place of, or in conjunction with, professional medical advice regarding the use of any commercial or home remedy acne treatment., Clarks are no a lot longer having actually their items made in Somerset, but instead outsourced development to the Far East. It is the process of providing effective content on the websites so that people may find it easily through many search engines like, Google, Yahoo, Internet Explorer, Bing and many more. An extra bonus is finding Clarks Women Shoes That Are Priced Reasonably so you&#8217;re able to really enjoy them without ever blowing your budget. These deals can be found to persons as well as corporations. Close to 99 % of AMC&#8217;s theatres are positioned within the Usa and Canada. Every marketing material that the company proposes should contain a design element to it so as to provide your business with something unique, creative as well as innovative. These are some of the vital factors that can help you make the best move and you can feel confident about the treatment that you will obtain from the clinic. You can add extra security checkpoints such as OTP confirmation to provide enhanced security to your clients.</p><p>Enhanced Customer Support by System Generated Personalized Suggestions<br />Every time your customers book a ticket using your application, he will leave a trail behind. </p><p>Garden ornaments can be costly."

Atlanta Falcons Jersey

" Correct posture strengthens the back and joints, aids in an increase of oxygen to the body, and betters both breathing and circulation. Places where people may be disclosed due to their work are in railroads, building construction, factory, shipyard industries, automotive among others. -or might be postponed Set of a current analyst claims iphone 5 continues to be postponed towards the September market, since the touchscreen and parts orders for that China producers have not yet recognized. The future Chinese consumer will be richer, older and online, according to a report by Morgan Stanley.</p><p>Although Sorbolene cream, just like other chemical preparations in the marketplace, may have side effects, it really is largely safe enough that dermotologists prescribe it for patients with eczema and babies with fragile skin.</p><p>""Things in China are changing so fast and the market and people seem ready to adopt new technology much faster than back home,"" she said. </p>" "<p>Carville supply CNC plastic machining services and specialise inside the heat remedy and precision machining of acrylic as well as other engineering grade plastics. Actually being capable of entice those people is something totally and completely different. </p><p>China-US Ping-Pang diplomacy commemorated at headquarters of UN</p><p>Aftermath of typhoon Doksuri in central Vietnam</p><p>Highlights of Longines Equestrian Showjumping Grand Prix in Tianjin</p><p>Variety of activities of popularization of science held across China</p><p>Special snacks displayed during 14th China-ASEAN Expo</p><p>Scenery of paddy fields in Baicheng, NE China's Jilin</p><p>China Focus: World's oldest panda dies aged 37</p><p>Scenery of terraced fields at Wuyishan in SE China's Fujian</p>" "<p>By Yu Fei, Li Mengxin and Liu Deng</p><p>HAIKOU, Oct.</p><p>The Carville production company was founded in 1928 and Carville started to make both machined and fabricated acrylic components and assemblies while in the 1930&#8217;s. The philosophy at Carville would be to create precision machined plastic components and plastic elements which might be proper towards the customer&#8217;s specs, are delivered promptly and are competitively priced. After numerous failures, little by little they learned how to grow various corals in different undersea environments."

Miguel Cabrera Jersey

"cn/css/87/20120920/style_sdfigure. By morning it sports consumed and left the hands soft and smooth. The point that the cream doesn&#8217;t have fragrances and has the scent of jelly is yet another turn-off for some </p><p><i>Mesothelioma lawyer is the basic help that makes the financial support strong for the plaintiff, who have suffered at the hands of their negligent employers.U. The gossips have spread like fire, but associates deny that have this frustration.</p><p>Robert Kaplan, president of Federal Reserve Bank of Dallas, also said on Thursday that he wanted to see more evidence to confirm that recent weakness of inflation is ""indeed transitory"". By morning it sports consumed and left the hands soft and smooth. Coffee can boost arterial pressure by tightening blood vessels and restricting blood flow into the body.</p><p>Globally coral provides a living for half a billion people, generating billions of dollars of revenue from tourism and fishing. In case you predict so that it is similar to a regular moisturizing cream, you are disappointed."

Colton Schmidt Jersey UK

" In the event you shop about, about to the videos doesn&#8217;t have to be costly. CM Stripling as opposed to. The label proceeds to be associated with leading excellent and subtle styling. George&#8217;s. They should be ready to cater to wide varieties of requirements and make you feel comfortable while waiting for your turn. <br />Therefore, through advanced software, small business can reach thousands of viewers through online marketing.</p><p>&#8212; To study aggressive developments such as increases, satisfaction, new product launches, and benefits in the Methionine industry. Any of the greatest superstars in WWE account, including Michaels, Mankind, Undertaker, H, Batista, and , tally had signature moments in the Radiophone. You could preserve time and money by purchasing your movie tickets by means of their site. Providing analysis, tracking reports, data systems and such other data-measuring analytics and elements are required to keep the entire digital marketing campaign on track. At our Manchester repair store, you can find latest equipment and tools for fixing all the hardware and software related problems. </p><p>There are many benefits to both commercial acne treatments and home remedies."

David Justice Jersey

"S.</p><p>Carville certainly are a business to business services provider.<br /><br />The best thing about MBT shoes is their versatility. As little as five pounds can make an enormous difference. Nonetheless, you should also consider the opportunity of hiring a mesothelioma lawyer and seek compensation for the damage to your health.S. Another and is particularly which the cream enables you to cleanse your skin layer in order that you do not have to use cruel, irritating soaps.</p><p>Give away a little something for nothing to a new client. We have a great team; I have settled and found a lot of friends here.</p><p>However, Kenya has pledged to select two teams for the two events.</p><p>About 61 percent of economists predicted the Fed would begin the process of balance sheet normalization in September, while 14. The water testing products you can purchase from their store are pH Fix 0-14 100/PK Tube and Turbidity Tube."


Add new comment