solr - centos 安装 solr

一、安装环境

1. centos (7.2.1511)

[root@test-2021 opt]# lsb_release -a
LSB Version:	:core-4.1-amd64:core-4.1-noarch
Distributor ID:	CentOS
Description:	CentOS Linux release 7.2.1511 (Core) 
Release:	7.2.1511
Codename:	Core

2. jdk (jdk-8u271-linux-x64.rpm)

[root@test-2021 opt]# java -version
java version "1.8.0_271"
Java(TM) SE Runtime Environment (build 1.8.0_271-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.271-b09, mixed mode)

3. solr安装包 (solr-7.7.2.tgz)

solr下载地址:https://archive.apache.org/dist/lucene/solr/

二、安装 & 运行 solr

1. 解压 & 安装

[root@huarenwenyu-2021 opt]# cd /opt
/opt
[root@huarenwenyu-2021 opt]# tar -zxvf solr-7.7.2.tgz
drwxr-xr-x 9 root root      4096 Feb 26 15:22 solr-7.7.2
-rw-r--r-- 1 root root 171374430 Feb 26 14:52 solr-7.7.2.tgz

2. 启动solr

[root@huarenwenyu-2021 opt]# cd solr-7.7.2/bin/
[root@test-2021 bin]# ./solr start -p 8983 -force
NOTE: Please install lsof as this script needs it to determine if Solr is listening on port 8983.

Started Solr server on port 8983 (pid=13745). Happy searching!

[root@test-2021 opt]# ps aux | grep solr
root     13745  0.6 20.3 2630200 206452 pts/1  Sl   15:29   0:09 java -server -Xms512m -Xmx512m -XX:NewRatio=3 -XX:SurvivorRatio=4 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=8 -XX:+UseConcMarkSweepGC -XX:ConcGCThreads=4 -XX:ParallelGCThreads=4 -XX:+CMSScavengeBeforeRemark -XX:PretenureSizeThreshold=64m -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=50 -XX:CMSMaxAbortablePrecleanTime=6000 -XX:+CMSParallelRemarkEnabled -XX:+ParallelRefProcEnabled -XX:-OmitStackTraceInFastThrow -verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime -Xloggc:/opt/solr-7.7.2/server/logs/solr_gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=9 -XX:GCLogFileSize=20M -Dsolr.log.dir=/opt/solr-7.7.2/server/logs -Djetty.port=8983 -DSTOP.PORT=7983 -DSTOP.KEY=solrrocks -Duser.timezone=UTC -Djetty.home=/opt/solr-7.7.2/server -Dsolr.solr.home=/opt/solr-7.7.2/server/solr -Dsolr.data.home= -Dsolr.install.dir=/opt/solr-7.7.2 -Dsolr.default.confdir=/opt/solr-7.7.2/server/solr/configsets/_default/conf -Xss256k -Dsolr.jetty.https.port=8983 -Dsolr.log.muteconsole -XX:OnOutOfMemoryError=/opt/solr-7.7.2/bin/oom_solr.sh 8983 /opt/solr-7.7.2/server/logs -jar start.jar --module=http
root     15044  0.0  0.0 112708   988 pts/1    R+   15:53   0:00 grep --color=auto solr

3. 访问solr网页 (http://ip:8983/solr)

猜你喜欢

转载自blog.csdn.net/A_bad_horse/article/details/114136249