Under Linux install solr

Obtain the installation package
link: https://pan.baidu.com/s/1yA2jtZumDuajGdFPcXiIew
extraction code: ajdw
create a directory solr under linux usr / local, these files into several folders at solr
Here Insert Picture Description
1. Install tomcat
unzip tomcat
solr into the folder, unzip tocat, and renamed tomcat

cd /usr/local/solr
tar -zxvf apache-tomcat-8.5.32.tar.gz 
mv apache-tomcat-8.5.32 tomcat

Installation rngd service - very slow start to solve the tomcat

yum install rngd-tools
systemctl start rngd

2. Install solr
decompression solr, unzip the folder into the solr

tar -zxvf solr-4.10.3.tar

Copy solr.war to the webapp under tomcat

cd /usr/local/solr/solr-4.10.3/example/webapps/
cp solr.war /usr/local/solr/tomcat/webapps/

Start tomcat, then closed, then remove the war package, the purpose is to generate solr tomcat folder

cd /usr/local/solr/tomcat/bin/
./startup.sh
./shutdown.sh

Then delete the solr war package

cd /usr/local/solr/tomcat/webapps/
rm -rf solr.war

All packets in the jar solr-4.10.3 / example / lib / ext / catalog copy / usr / local / solr / tomcat / webapps / solr / WEB-INF / lib directory

cd /usr/local/solr/solr-4.10.3/example/lib/ext
cp *  /usr/local/solr/tomcat/webapps/solr/WEB-INF/lib

The files in solr solr-4.10.3 / example / directory folders copied to / usr under / local / solr / directories and renamed solrhome, solrhome which corresponds to the collection database for storing database files

cd /usr/local/solr/solr-4.10.3/example/
cp -r solr /usr/local/solr/
cd /usr/local/solr
mv solr solrhome

Configuration location tomcat / webapps / solr / WEB-INF / web.xml home

cd /usr/local/solr/tomcat/webapps/solr/WEB-INF/
vim web.xml

The path is set to: / usr / local / solr / solrhome

Here Insert Picture Description
Start tomcat

/usr/local/solr/tomcat/bin/startup.sh

Enter the address to see the installation results
Here Insert Picture Description

Published 47 original articles · won praise 6 · views 2186

Guess you like

Origin blog.csdn.net/weixin_44467251/article/details/103309714