vagrant init hashicorp/precise64; vagrant up --provider virtualbox
vagrant up
vagrant ssh
apt-get update
apt-get install tomcat6 tomcat6-admin
If above steps doesn't work for tomcat installation, try below steps:
apt-get install python-software-properties sudo add-apt-repository ppa:ferramroberto/java
apt-get install python-software-properties
apt-get install sun-java6-jdk sun-java6-plugin tomcat6 ant openjdk-6-jdk
apt-get update
apt-get install sun-java6-jdk sun-java6-plugin tomcat6 ant openjdk-6-jdk
apt-get install tomcat6 tomcat6-admin
wget http://archive.apache.org/dist/lucene/solr/4.0.0/apache-solr-4.0.0.tgz
tar -vxf apache-solr-4.0.0.tgz
mkdir /opt/solr
cp -r apache-solr-4.0.0/example/solr/* /opt/solr/
cp apache-solr-4.0.0/example/webapps/solr.war /opt/solr/
cp -r apache-solr-4.0.0/example/lib/ext/* /var/lib/tomcat6/shared/
Edit the Apache SOLR config file:
vi /opt/solr/collection1/conf/solrconfig.xml
Change the line "dataDir" by the following:
<dataDir>${solr.data.dir:/opt/solr/data}</dataDir>
Create the directory for the data and adjust access rights:
mkdir /opt/solr/data
chown tomcat6 /opt/solr/data/
Setup new context in tomcat pointing to our Solr files:
vi /etc/tomcat6/Catalina/localhost/solr.xml
Fill in the file with the information below:
<?xml version="1.0" encoding="utf-8"?>
<Context docBase="/opt/solr/solr.war" debug="0" crossContext="true">
<Environment name="solr/home" type="java.lang.String" value="/opt/solr" override="true"/>
</Context>
Restart tomcat:
/etc/init.d/tomcat6 restart
Hit http://SERVER-IP-ADDRESS:8080/solr/ and you should be able to see default Apache solr page.
i have an error like this.
cp: cannot stat 'apache-solr-4.0.0/example/lib/ext/*': No such file or directory