Solr8 installation tutorial ~ detailed version

Installation Environment

Solr version: 8.6.0
JDK version: 1.8.0_144
Server version: centos7.0

Preparation before installation

Open the solr official website to download the tgz installation package with the version number of 8.6.0, or you can directly click the solr download link to download.

start installation

Before solr5, solr must start with tomcat as a container, but after solr5, solr integrates the jetty server, which can be started directly through the script in the bin directory. The version after solr5 is released as an independent application, and the installation process is relatively simple. One thing to note is that this version of Solr must run in a server environment above jdk1.8.

1. Install jdk

The jdk installation is relatively simple, we skip here. (PS: My server has been installed~~)

2. Upload the solr8 installation package to the server

Here I put the solr installation package in the /usr/local directory
Insert picture description here

3. Unzip the solr8 installation package

Insert picture description here
After decompressing the file directory,
Insert picture description here
enter the /usr/local/solr-8.6.0/bin directory and
Insert picture description here
execute the ./solr start -p 8080 command, and solr will start successfully!

[Note] -p is followed by the port number, the default is 8983, we use 8080 here

4. Command to open firewall port

firewall-cmd --zone=public --add-port=8080/tcp --permanent    (--permanent永久生效,没有此参数重启后失效)

5. Visit solr website

Insert picture description here
At this point, the solr installation is complete!

Parameter configuration and restart command

Configure memory

To configure and run memory for solr, open the solr.in.sh file in the bin directory, find the SOLR_HEAP configuration item, uncomment and
Insert picture description here
modify the parameters according to the actual situation of the server, then save and restart solr.

Other configuration items are also in this file. The modification method is the same as above. After modifying the saved file, restart solr to take effect.

Restart solr

Execute the ./solr restart -p 8080 command to restart

For a more detailed understanding of solr, you can read the solr tutorial .

Guess you like

Origin blog.csdn.net/cyb_123/article/details/107675884