使用docker部署elasticsearch

sql

Posted by TGich on June 8, 2017

• docker 启动 elasticsearch $ docker run –name elasticsearch -d -p 9200:9200 -e “httphost=0.0.0.0” -e “transport.host=127.0.0.1” elasticsearch • 通信

  1. Java API
  2. HTTP RESTful API json • 计算集群中文件的数量 ···shell curl -XGET ‘10.14.125.230:9200/_count?pretty’ -d ‘ { “query”: { “match_all”: {} } }’ ```

• 服务器 elasticsearch 配置文件 elasticsearch.yml network.host: 0.0.0.0

• 坑:

  1. http://www.cnblogs.com/sloveling/p/elasticsearch.html
  2. vi /etc/sysconfig/iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 9200 -jACCEPT /etc/init.d/iptables stop