linux 上搭建 solr 单机版(Install solr in linux)

Install solr in linux

一the environment

Solr developed by java . the jdk and tomcat are adequate in the Linux system .if you are not install the jdk and tomcat .you should do it .

二 Idea

Install the solr we should knowledge about combining tomcat and solr . we run the solr in the tomcat .

三 upload the package

We should upload the solr packge to Linux system in the packge that is directory of usr .
在这里插入图片描述

四 unzip the solr package

Command: tar -zxvf solr-4.10.3.tgz.tgz -C /usr/local
在这里插入图片描述

五make directory solr in the local

Command : mkdir solr
在这里插入图片描述

六 install the tomcat and

6.1 unzip
Command: tar -zxvf apache-tomcat-7.0.57.tar.gz -C /usr/local/solr
在这里插入图片描述
6.2 modify name
Command : mv apache-tomcat-7.0.57/ tomcat
在这里插入图片描述
6.3 copy solr-4.10.3.war
solr-4.10.3.war position : /usr/local/solr-4.10.3/dist
在这里插入图片描述
Command: cp solr-4.10.3.war /usr/local/solr/tomcat/webapps/
在这里插入图片描述
6.4 unzip and delete
start tomcat to unzip the solr-4.10.3.war and shutdown the tomcat .delete the solr-4.10.3.war
6.4.1start the tomcat :
在这里插入图片描述
6.4.2Close the tomcat :
在这里插入图片描述
6.4.3 delete the solr-4.10.3.war
在这里插入图片描述
6.4.4 modify the name
Command; mv solr-4.10.3/ solr
在这里插入图片描述

七 add jar package to solr library

Jar position : /usr/local/solr-4.10.3/example/lib/ext
在这里插入图片描述
Command cp * /usr/local/solr/tomcat/webapps/solr/WEB-INF/lib

八 create the solrhome

8.1 make directory
Command 1: cd /usr/local/solr
Command 2 : mkdir solrhome
在这里插入图片描述
8.2 copy the solr to solrhome
Note :don’t copy the directory solr to solrhome.
The solr position : /usr/local/solr-4.10.3/example/solr
Command: cp -r * /usr/local/solr/solrhome/
在这里插入图片描述

九 revise the configuration

Modify the solrhome path
Web.xml position : /usr/local/solr/tomcat/webapps/solr/WEB-INF
在这里插入图片描述

十.start the tomcat and close the firewall

Access path : http://192.168.25.128:8080/solr/

十一 Thanks

Thanks you for reading my paper . having some advice ,you can comment in the end.
------------------------------------------------------------------------------------- The Author:
------------------------------------------------------------------------------------------------------ Allis

猜你喜欢

转载自blog.csdn.net/youku1327/article/details/82818186