One: Solr environment
1. Solr is developed in java and needs to install the jdk environment.
tar -zxvf jdk-7u80-linux-x64.tar.gz vim /etc/prifile
#JDK export JAVA_HOME=/usr/local/app/jdk1.7.0_80 export JRE_HOME=${JAVA_HOME}/jre export CLASSPATH=.:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar:${JRE_HOME}/lib export PATH=${JAVA_HOME}/bin:$PATH
source /etc/profile java -version
2. Unzip the Apache server.
Two: Install Solr
1. Unzip the solr installation package
tar -zxvf solr-4.10.3.tgz.tgz
2. Copy solr-4.10.3.war in the solr-4.10.3/dist directory to the tomcat/webapps directory.
cp solr-4.10.3.war /usr/local/app/apache-tomcat-7.0.47/webapps/
3. Start tomcat and decompress solr-4.10.3.war
./bin/start.sh
4. Copy the jar package required by solr into the project.
cd /usr/local/app/solr-4.10.3/example/lib/ext/ cp * /usr/local/app/apache-tomcat-7.0.47/webapps/solr-4.10.3/WEB-INF/lib/5. Configure SolrHome
cp -r /usr/local/app/solr-4.10.3/example/solr /usr/local/app/solrhome
6. Modify the path of solrhome
cd /usr/local/app/apache-tomcat-7.0.47/webapps/solr-4.10.3/WEB-INF/ vim web.xml
Three: open tomcat
1. Open tomcat
./bin/start.sh
2. Open port 8080
vim /etc/sysconfig/iptables
restart the network
service iptables restart
Check if the port is open
/sbin/iptables -L -n
Four: access the solr service under the window
http://virtual machine ip:8080/solr-4.10.3