elasticsearch安装启动

 在elastic官网下载elasticsearch到云主机后解压,执行bin/elasticsearch,首先遇到jdk版本不匹配,需要使用自带的Jdk,不能用root执行的问题,然后启动起来后,后台curl http://xxx:9200/发现有如下执行结果

{
  "name" : "xxx",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "VMlGfplJQV270SJuOzCezQ",
  "version" : {
    "number" : "7.2.0",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "508c38a",
    "build_date" : "2019-06-20T15:54:18.811730Z",
    "build_snapshot" : false,
    "lucene_version" : "8.0.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

但是就是不能在本地windows上访问,首先怀疑是端口没有开放,接着开放端口也不行,于是把防火墙关了,还是不行,后面看日志,发现9200端口绑定的地址是127.0.0.1,才恍然大悟。

修改netwok.host为本地eth0网卡地址后,发现后面还是有跑错,开放seed_hosts,测试终于OK了。

network.host: 171.29.0.5  #192.168.0.1
#
# Set a custom port for HTTP:
#
http.port: 9123
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
discovery.seed_hosts: ["127.0.0.1", "171.29.0.5"]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值