gpt4 book ai didi

solr - 使用身份验证在控制台中创建 Solr 核心

转载 作者:行者123 更新时间:2023-12-05 09:21:07 27 4
gpt4 key购买 nike

我有一个需要身份验证的 Solr 核心。假设我有一个用户,密码为password。当我现在尝试在控制台中创建一个 Solr 核心时

bin\solr create -c test

我收到 HTTP 错误 401。当然我需要指定我的用户。如何在控制台中添加我的用户名和密码?类似于 bin\solr create -c test -authentication user:password

最佳答案

将命令行脚本与 BasicAuth 结合使用将以下行添加到 (/opt/solr/bin) solr.in.sh 或 solr.in.cmd 文件。此示例告诉 bin/solr 命令行使用“基本”作为身份验证类型,并使用用户名“solr”和密码“SolrRocks”传递凭据:
SOLR_AUTH_TYPE="基本"
SOLR_AUTHENTICATION_OPTS="-Dbasicauth=solr:SolrRocks"
看: https://lucene.apache.org/solr/guide/6_6/basic-authentication-plugin.html#BasicAuthenticationPlugin-UsingBasicAuthwithSolrJ

关于solr - 使用身份验证在控制台中创建 Solr 核心,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34311253/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com