Apache Solr Installation on linux : Complete Setup
Installing Tomcat 6 in Ubuntu 10.04 and Libmysql-java:
$ 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
Download apache-solr-1.4.1.tgz from http://lucene.apache.org/solr/ and extract it:
$ cd
$ sudo cp apache-solr-1.4.1/dist/apache-solr-1.4.1.war /usr/share/tomcat6/webapps/solr.war
$ sudo cp -R apache-solr-1.4.1/example/solr/ /usr/share/tomcat6/solr/
note : we copy solr folder into /usr/share/tomcat6 and it will pointed as solr home in next step.
Create new Solr configuration in Tomcat6:
$ sudo vim /etc/tomcat6/Catalina/localhost/solr.xml
Paste this into file :
$ sudo cp apache-solr-1.4.1/example/multicore/solr.xml /usr/share/tomcat6/solr/solr.xml
$ sudo cp -R apache-solr-1.4.1/example/multicore/core0 /usr/share/tomcat6/solr/
$ sudo cp -R apache-solr-1.4.1/example/multicore/core1 /usr/share/tomcat6/solr/
$ sudo mkdir /usr/share/tomcat6/solr/core0/data
$ sudo mkdir /usr/share/tomcat6/solr/core1/data
$ sudo chown -R tomcat6:tomcat6 /usr/share/tomcat6/solr/core0/data/
$ sudo chown -R tomcat6:tomcat6 /usr/share/tomcat6/solr/core1/data/
Finally, restart your Tomcat and check it out!
$ sudo service tomcat6 restart
Go to http://localhost:8080/solr/
Comments
Post a Comment