gpt4 book ai didi

linux - ubuntu 上的 Elastic Enterprise/App search 安装问题

转载 作者:行者123 更新时间:2023-12-02 22:26:55 25 4
gpt4 key购买 nike

我正在运行一个在虚拟机中运行 ubuntu 的 vagrant box(使用 Laravel Homestead box)

我正在尝试安装 Elastic App-search 产品。

第一个要求是安装 Elasticsearch,我已经做过多次了。我做了以下步骤: https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
sudo apt-get update && sudo apt-get install elasticsearch

我正在使用 systemd 配置:

sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service

我正在运行 curl localhost:9200,一切正常。

接下来我尝试安装 elastic app search。 https://www.elastic.co/guide/en/app-search/current/installation.html#installation-self-managed .其中没有针对 debian 系统的说明。但它确实有一个 .deb 安装文件。我下载了文件并将其放在我的项目路径中。

我在文件上运行了 dpkg -i,它似乎已经安装好了。当我运行命令检查文件位置时,它显示如下:

 dpkg -L enterprise-search
/.
/etc
/etc/init.d
/etc/init.d/enterprise-search
/var
/var/log
/var/log/enterprise-search
/usr
/usr/share
/usr/share/enterprise-search
/usr/share/enterprise-search/README.md
/usr/share/enterprise-search/bin
/usr/share/enterprise-search/bin/vendor
/usr/share/enterprise-search/bin/vendor/filebeat
/usr/share/enterprise-search/bin/vendor/filebeat/filebeat-linux-x86_64
/usr/share/enterprise-search/bin/enterprise-search
/usr/share/enterprise-search/filebeat
/usr/share/enterprise-search/filebeat/ecs-template.json
/usr/share/enterprise-search/filebeat/filebeat-ecs.yml
/usr/share/enterprise-search/lib
/usr/share/enterprise-search/lib/require_java_version.sh
/usr/share/enterprise-search/lib/enterprise-search.war
/usr/share/enterprise-search/jetty
/usr/share/enterprise-search/jetty/webserver-ssl.xml
/usr/share/enterprise-search/jetty/webserver-ssl-with-redirect.xml
/usr/share/enterprise-search/jetty/webserver.xml
/usr/share/enterprise-search/LICENSE
/usr/share/enterprise-search/config
/usr/share/enterprise-search/config/env.sh
/usr/share/enterprise-search/config/enterprise-search.yml
/usr/share/enterprise-search/NOTICE.txt
/usr/share/doc
/usr/share/doc/enterprise-search
/usr/share/doc/enterprise-search/changelog.gz
/usr/lib
/usr/lib/systemd
/usr/lib/systemd/system
/usr/lib/systemd/system/enterprise-search.service

我不确定这是不是正确的位置?我希望它和我的 elasticsearch 安装在同一个地方,但实际上我不确定。我完成了安装过程的所有后续步骤并运行:./usr/share/enterprise-search/bin/elasticsearch

但这给了我错误:

Could not find java in PATH

我对此感到非常困惑,因为主要的 elasticsearch 安装工作并且还需要 java?我还希望它也能在 systemd 自动启用的情况下运行,并且我希望它在企业搜索启动/停止时可用。不确定如何处理。

最佳答案

看起来它是 Debian 软件包,所以它可以安装在 ubuntu 上,但有些地方可能有所不同。我会说你可以:

  1. 为此只需切换到使用 debian VM(在这里你可以获得一个 vagrant:https://app.vagrantup.com/debian/boxes/stretch64)
  2. 调试。据我所知,该包在运行之前先运行 elasticsearch-env 。 Java 是这样查找的:
 if [ ! -z "$JAVA_HOME" ]; then
JAVA="$JAVA_HOME/bin/java"
JAVA_TYPE="JAVA_HOME"
else
if [ "$(uname -s)" = "Darwin" ]; then
# macOS has a different structure
JAVA="$ES_HOME/jdk.app/Contents/Home/bin/java"
else
JAVA="$ES_HOME/jdk/bin/java"
fi
JAVA_TYPE="bundled jdk"
fi

if [ ! -x "$JAVA" ]; then
echo "could not find java in $JAVA_TYPE at $JAVA" >&2
exit 1
fi

所以我建议在启动脚本中设置 JAVA_HOME(或在运行二进制文件之前),看看是否有帮助。

关于linux - ubuntu 上的 Elastic Enterprise/App search 安装问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62849972/

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