01 CentOS7 install and start solr

solr is an enterprise search application server to lucence basis. This article will explain how to install solr in centos7 in.

1, constrained version

2, the premise of restraint

3, software download

Baidu network disk:
Link: https://pan.baidu.com/s/1CwJ1a9rnXXL4t0JTFBkpFw
extraction code: 91ml

4, steps

4.1 by putty connection CentOS7, decompression solr and tomcat

# 确保solr-4.10.3.tgz、apache-tomcat-8.5.38.zip是在当前目录下
ls
# 解压solr-4.10.3.tgz
tar -xvf solr-4.10.3.tgz
# 解压apache-tomcat-8.5.38.zip
unzip apache-tomcat-8.5.38.zip
# 赋予tomcat中bin目录下文件的可执行权限
chmod 777 /rootapache-tomcat-8.5.38/bin/*
启动tomcat。注意:启动tomcat之前要先配置好jdk环境变量。
/root/rootapache-tomcat-8.5.38/bin/startup.sh

4.2 solr.war to copy the webapps tomcat

cp /root/solr-4.10.3/example/webapps/solr.war /root/apache-tomcat-8.5.38/webapps/

Wait a moment, war package will be unpacked.

4.3 Copy jar package

cp /root/solr-4.10.3/example/lib/ext/* /root/apache-tomcat-8.5.38/webapps/solr/WEB-INF/lib/

4.4 modify the package solr war web.xml

Edit /root/apache-tomcat-8.5.38/webapps/solr/WEB-INF/web.xml
found

<!--
    <env-entry>
       <env-entry-name>solr/home</env-entry-name>
       <env-entry-value>/put/your/solr/home/here</env-entry-value>
       <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>    
 -->

To change it

    <env-entry>
       <env-entry-name>solr/home</env-entry-name>
       <env-entry-value>/root/solr-4.10.3/example/solr</env-entry-value>
       <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>

Restart tomcat, and turn off the firewall [Note that the actual production environment will not turn off the firewall, here is a test, so simple and crude].

4.5 Test

In the browser input http://192.168.100.192:8080/solr, we can see the solr management interface.
solr Management Interface
So far, we have completed the installation and start-solr in CentOS7 in.

Guess you like

Origin www.cnblogs.com/alichengxuyuan/p/12577228.html