Install Apache Solr on Ubuntu – multicore

1.  Install Tomcat on ubuntu 

sudo apt-get update && apt-get upgrade

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

sudo apt-get install libmysql-java

2) Download apache-solr-1.4.1.tar.gz

cd /home/<user-name>/Desktop/

wget -c http://apache.tradebit.com/pub/lucene/solr/1.4.1/apache-solr-1.4.1.zip

unzip apache-solr-1.4.1.zip

sudo cp apache-solr-1.4.1/dist/apache-solr-1.4.1.war /var/lib/tomcat6/webapps/solr.war

sudo cp -R apache-solr-1.4.1/example/solr/ /var/lib/tomcat6/solr/

3) Establish new Solr configuration in Tomcat6

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

and paste the below given code

<Context docBase=”/var/lib/tomcat6/webapps/solr.war” debug=”0″ privileged=”true” allowLinking=”true” crossContext=”true”>
<Environment name=”solr/home” type=”java.lang.String” value=”/var/lib/tomcat6/solr” override=”true” />
</Context>

4. Create Folder data and Change Solrconfig.xml (For single core) .  create folder in solr in /var/lib/tomcat6/solr/

mkdir data

Change path data in solr/conf/solrconfig.xml

<dataDir>/var/lib/tomcat6/solr/data</dataDir>

5. Enable MultipleCore in Solr 1.4.1

sudo cp -dR apache-solr-1.4.1/example/multicore /var/lib/tomcat6/solr

sudo cp apache-solr-1.4.1/example/multicore/solr.xml /var/lib/tomcat6/solr/solr.xml
sudo cp -R apache-solr-1.4.1/example/multicore/core0 /var/lib/tomcat6/solr/
sudo cp -R apache-solr-1.4.1/example/multicore/core1 /var/lib/tomcat6/solr/
sudo mkdir /var/lib/tomcat6/solr/core0/data
sudo mkdir /var/lib/tomcat6/solr/core1/data
sudo chown -R tomcat6:tomcat6 /var/lib/tomcat6/solr/core0/data/
sudo chown -R tomcat6:tomcat6 /var/lib/tomcat6/solr/core1/data/

6. And at last restart Tomcat

sudo service tomcat6 restart

7. Load  http://localhost:8080/solr/ in your browser

Share

Install Apache Solr on Ubuntu

1.  Install Tomcat on ubuntu

sudo apt-get update && apt-get upgrade

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

sudo apt-get install libmysql-java

2) Download apache-solr-1.4.1.tar.gz

cd /home/<user-name>/Desktop/

wget -c http://apache.tradebit.com/pub/lucene/solr/1.4.1/apache-solr-1.4.1.zip

unzip apache-solr-1.4.1.zip

sudo cp apache-solr-1.4.1/dist/apache-solr-1.4.1.war /var/lib/tomcat6/webapps/solr.war

sudo cp -R apache-solr-1.4.1/example/solr/ /var/lib/tomcat6/solr/

3) Establish new Solr configuration in Tomcat6

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

and paste the below given code

<Context docBase=”/var/lib/tomcat6/webapps/solr.war” debug=”0″ privileged=”true” allowLinking=”true” crossContext=”true”>
<Environment name=”solr/home” type=”java.lang.String” value=”/var/lib/tomcat6/solr” override=”true” />
</Context>

4. Create Folder data and Change Solrconfig.xml (For single core) .  create folder in solr in /var/lib/tomcat6/solr/

mkdir data

Change path data in solr/conf/solrconfig.xml

<dataDir>/var/lib/tomcat6/solr/data</dataDir>

5. And at last restart Tomcat

sudo service tomcat6 restart

6) Load  http://localhost:8080/solr/ in your browser

Share

apache lucene features

1) Its open source
2) Can implement in any languages that are index compatible
3) Support  date ranged, ranked and fielded searching
4) Can sort it using any field
5) Need less primary memory
6) Has powerful, accurate, and efficient search algorithms
7) Support multiple-index searching with merged results
8 )  Cross-Platform Solution
9) Support simultaneous update and searching
Share

Beginners' Guide , PHP Programmer , Zend Certified Engineer , Magento Certified Developer