无法创建核心[new_core],原因是:centos 7上的apache solr 8.2.0中为空

无法创建核心[new_core],原因是:centos 7上的apache solr 8.2.0中为空,solr,centos7,Solr,Centos7,我在CentOS 7上安装了ApacheSolr以跟踪此链接 完成安装后,solr状态为 运行此命令后 sudo systemctl enable solr 显示以下消息 solr.service is not a native service, redirecting to /sbin/chkconfig. Executing /sbin/chkconfig solr on 我运行了创建testcollection的命令 sudo su - solr -c "/opt/solr/bin/

我在CentOS 7上安装了ApacheSolr以跟踪此链接

完成安装后,solr状态为

运行此命令后

sudo systemctl enable solr
显示以下消息

solr.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig solr on
我运行了创建testcollection的命令

sudo su - solr -c "/opt/solr/bin/solr create -c testcollection -n data_driven_schema_configs"
运行命令后,错误如下所示

ERROR: Error CREATEing SolrCore 'testcollection': Unable to create core [tpcollection3] Caused by: null
我能否获得成功创建集合或核心的任何建议。 问题是

1. Why cannot enable solr on centos 7?
2. Why cannot create collection or core?
  • /sbin/chkconfig solr on
    是一个返回到
    systemctl enable solr
    的命令,它实现了启动时启用solr的相同任务。也就是说,有一个可以帮助将Solr作为服务安装的工具:
    /opt/Solr/bin/install\u Solr\u service.sh

  • 确保您在Solr目录上设置了正确的权限并重新启动Solr,而且我认为您不需要
    sudo su
    部分:

    chown -R solr:solr /var/solr/
    ./solr restart
    ./solr create -c testcollection
    
  • /sbin/chkconfig solr on
    是一个返回到
    systemctl enable solr
    的命令,它实现了启动时启用solr的相同任务。也就是说,有一个可以帮助将Solr作为服务安装的工具:
    /opt/Solr/bin/install\u Solr\u service.sh

  • 确保您在Solr目录上设置了正确的权限并重新启动Solr,而且我认为您不需要
    sudo su
    部分:

    chown -R solr:solr /var/solr/
    ./solr restart
    ./solr create -c testcollection
    

  • 事实上,我决定走另一条路

    您可以提取所需的目录。我制作了一个目录/solr

    mkdir /solr
    
    从最新版本下载最新版本solr

    拔出

    tar -xvf solr-8.2.0.tgz 
    
    添加用户

    useradd solr
    
    准许

    chown -R solr:solr solr-8.2.0
    
    转到您创建的用户

    su - solr
    
    转到提取的solr bin文件

     cd solr-8.2.0/bin
    
    启动Solr,检查Solr状态并创建Solr核心或集合

    ./solr start  
    ./solr status
    ./solr create -c testcollection -n data_driven_schema_configs 
    
    您将看到您创建的集合或核心成功消息

    Created new core 'testcollection'
    

    事实上,我决定走另一条路

    您可以提取所需的目录。我制作了一个目录/solr

    mkdir /solr
    
    从最新版本下载最新版本solr

    拔出

    tar -xvf solr-8.2.0.tgz 
    
    添加用户

    useradd solr
    
    准许

    chown -R solr:solr solr-8.2.0
    
    转到您创建的用户

    su - solr
    
    转到提取的solr bin文件

     cd solr-8.2.0/bin
    
    启动Solr,检查Solr状态并创建Solr核心或集合

    ./solr start  
    ./solr status
    ./solr create -c testcollection -n data_driven_schema_configs 
    
    您将看到您创建的集合或核心成功消息

    Created new core 'testcollection'
    

    我在ubuntu 19.04中成功安装了solr并从mysql导入数据。在CentOS 7中,它不起作用。我按照你的回答做了。但它不起作用。你试过当根吗?重新启动时可能还需要设置服务器路径:
    /opt/solr/bin/solr restart-s/opt/solr/server/solr/
    。我在ubuntu 19.04中成功安装了solr并从mysql导入数据。在CentOS 7中,它不起作用。我按照你的回答做了。但它不起作用。你试过当根吗?重新启动时可能还需要设置服务器路径:
    /opt/solr/bin/solr restart-s/opt/solr/server/solr/