Magento 1.9 docker 安装elasticsearch解决产品搜索问题

admin   ·   发表于 2022-11-9   ·   网站运维

参考文档:https://www.jb51.net/article/159046.htm

docker pull elasticsearch:7.17.3

#启动镜像

docker run --name elasticsearch -d -e ES_JAVA_OPTS="-Xms512m -Xmx512m" -e "discovery.type=single-node" -p 9200:9200 -p 9300:9300 elasticsearch:7.17.3

通过IP:9200 访问试试就可以了。

另起一个终端执行: curl http://localhost:9200   出现以下内容说明成功

9200端口有结果就行了 后台elasticsearch需要新建索引  然后后台缓存   这是手动导出,它会自动建立索引的


命令我加了个自动启动

docker run --name elasticsearch --restart always -e ES_JAVA_OPTS="-Xms512m -Xmx512m" -e "discovery.type=single-node" -p 9200:9200 -p 9300:9300 elasticsearch:7.17.3


PHP xsl扩展安装失败可以在php.ini 里面加上extension=xsl.so 重启php就可以了。


Docker安装elasticsearch:7.17.3

1、本地镜像-从库中拉取-输入镜像名字-elasticsearch:7.17.3

2、创建容器-数据端口9200 9300

更多设置 

标签

org.label-schema.build-date=2022-04-19T11:40:27.226665974Z

org.label-schema.license=Elastic-License-2.0

org.label-schema.name=Elasticsearch

org.label-schema.schema-version=1.0

org.label-schema.url=https://www.elastic.co/products/elasticsearch

org.label-schema.usage=https://www.elastic.co/guide/en/elasticsearch/reference/index.html

org.label-schema.vcs-ref=5ad023604c8d7416c9eb6c0eadb62b14e766caff

org.label-schema.vcs-url=https://github.com/elastic/elasticsearch

org.label-schema.vendor=Elastic

org.label-schema.version=7.17.3

org.opencontainers.image.created=2022-04-19T11:40:27.226665974Z

org.opencontainers.image.documentation=https://www.elastic.co/guide/en/elasticsearch/reference/index.html

org.opencontainers.image.licenses=Elastic-License-2.0

org.opencontainers.image.revision=5ad023604c8d7416c9eb6c0eadb62b14e766caff

org.opencontainers.image.source=https://github.com/elastic/elasticsearch

org.opencontainers.image.title=Elasticsearch

org.opencontainers.image.url=https://www.elastic.co/products/elasticsearch

org.opencontainers.image.vendor=Elastic

org.opencontainers.image.version=7.17.3



环境变量

ES_JAVA_OPTS=-Xms512m -Xmx512m

discovery.type=single-node

PATH=/usr/share/elasticsearch/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

ELASTIC_CONTAINER=true

0 Reply   |  Until 2022-11-9 | 1253 View
LoginCan Publish Content