本文共 1262 字,大约阅读时间需要 4 分钟。
搭建CentOS 7.3环境并安装JDK、FTP,简化文件上传操作
关闭防火墙
systemctl stop firewalld.service
安装完成后
firewallctl --permanent --add-service=http firewallctl --permanent --add-service=https firewallctl --permanent --add-port=8983/tcp firewallctl --permanent --add-port=8080/tcp firewallctl --reload
推荐使用清华镜像或阿里镜像下载最新版本的Solr(约140M):
cd /opt/ && wget https://mirrors.tuna.tsinghua.edu.cn/apache/lucene/solr/6.6.0/solr-6.6.0.tgztar -zxf solr-6.6.0.tgzcd solr-6.6.0
/opt/solr-6.6.0/bin/solr start -force
注意:
-force
参数用于允许非root账户启动服务。-,默认端口为8983,可修改为其他端口:/opt/solr-6.6.0/bin/solr start -p 8984
浏览器打开 http://[IP]:8983/solr/
,如 http://192.168.252.121:8983/solr/
。
/opt/solr-6.6.0/bin/solr status
响应示例:
Found 1 Solr nodes: Solr process 4177 running on port 8983
/opt/solr-6.6.0/bin/solr create -c ymq -force
创建完成后,访问 http://[IP]:8983/solr/admin/cores
查看新核心。
/opt/solr-6.6.0/bin/solr stop -p 8983
/opt/solr-6.6.0/bin/solr stop -all
-p
参数指定自定义端口。通过以上步骤,您可以在CentOS 7.3环境中顺利搭建并运用Solr服务。如有疑问,可参考Solr官方文档或相关技术论坛获取更多帮助。
转载地址:http://owkfk.baihongyu.com/