sudo apt-get -y install openjdk-7-jdk
sudo mkdir /usr/java
sudo ln -s /usr/lib/jvm/java-7-openjdk-amd64 /usr/java/default
sudo apt-get install tomcat7
sudo apt-get install tomcat7-admin
sudo wget http://archive.apache.org/dist/lucene/solr/4.8.1/solr-4.8.1.tgz
sudo tar -xvf solr-4.8.1.tgz
sudo cp -R solr-4.8.1/example/ /opt/solr
sudo cp -R /opt/solr/lib/ext/* /usr/share/tomcat7/lib/
sudo cp /opt/solr/webapps/solr.war /var/lib/tomcat7/webapps/solr.war
sudo cp -R /opt/solr /var/lib/tomcat7
sudo chown -R tomcat7:tomcat7 /var/lib/tomcat7/solr
service tomcat7 restart
cd /var/lib/tomcat7/solr
sudo mkdir <my_collection>
cd <my_collection>
sudo mkdir data
sudo chown -R tomcat7:tomcat7 /var/lib/tomcat7/solr
cp <RAILS_ROOT>/solr/conf/schema.xml /var/lib/tomcat7/solr/<my_collection>
cp <RAILS_ROOT>/solr/conf/solrconfig.xml /var/lib/tomcat7/solr/<my_collection>
sudo chown -R tomcat7:tomcat7 /var/lib/tomcat7/solr
sudo service tomcat7 restart
THANK YOU VERY MUCH!!!
I would fix only:
for
I also needed to copy collection1 from solr/collection1 to root (/var/lib/tomcat7/solr)
cp -r solr/collection1/ .
And then I accessed ui localhost:8080/solr to add my core "Core Admin". In the end I also make it only available to localhost:
cd /var/lib/tomcat7/conf
And edit
server.xml
I added address to restrict access to only localhost.
PS: I did that for my version of solr (solr-4.10.3) + tomcat7