start solr with tomcat

Deploy under windows or linux server

first step

Create a solr run directory

For example: D:\solr-tomcat

Copy the solr folder in the solr-4.10.4\example directory of the downloaded solr-4.10.4 to the D:\solr-tomcat directory

second step

Create JNDI file

Create a file solr.xml in the conf\Catalina\localhost directory of tomcat

<Context path="/solr" docBase="D:\apache-tomcat-8.0.15\solr.war"> 

<Environment name="solr/home" type="java.lang.String" value="D:\solr-tomcat\solr" override="true"/> 

</Context>

third step

Deploy the solr.war package

Copy the solr-4.10.4.war package in the dist directory of solr-4.10.4 to the root directory of tomcat and change the name to solr.war

the fourth step

Configure the log. If it is not configured, an error will be reported at startup, and the solr platform cannot be accessed. Check the localhost.2015-01-01.log log.

Copy all the jar packages in the solr-4.10.4\example\lib\ext directory to the lib directory of tomcat.

the fifth step

Visit http://localhost:8080/solr/

 

 

 

 

 

 

 

 

 

 

 

 

 

only for linux

first step

Create a solr run directory

For example: create solr-tomcat in the /usr/local directory

Copy the solr folder in the solr-4.10.4\example directory in the downloaded solr-4.10.4 to the /usr/local/solr-tomcat directory

second step

Copy the solr-4.10.4.war package in the dist directory of solr-4.10.4 to the root directory of tomcat and change the name to solr.war

third step

export  JAVA_OPTS="/usr/local/solr-tomcat/solr"

the fourth step

Configure the log. If it is not configured, an error will be reported at startup, and the solr platform cannot be accessed. Check the localhost.2015-01-01.log log.

Copy all the jar packages in the solr-4.10.4\example\lib\ext directory to the lib directory of tomcat.

the fifth step

Visit http://localhost:8080/solr/

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326778698&siteId=291194637