代码改变世界

ElasticSearch安装部署

  youxin  阅读(2042)  评论(0编辑  收藏  举报

官网:http://www.elasticsearch.org

ElasticSearch is an open-source and distributed search engine which is very much scalable and supports a good amount of enterprise Search use cases. It's built on top of Lucene (just like Apache Solr4). It supports realtime time indexing and full text search.

 

下载压缩包,Run bin/elasticsearch on Unix,

or bin/elasticsearch.bat on Windows

 

复制代码
root@iZ23onhpqvwZ:~/download/elasticsearch-1.4.0/bin# ./elasticsearch
[2014-11-13 10:30:09,969][WARN ][bootstrap                ] jvm uses the client vm, make sure to run `java` with the server vm for best performance by adding `-server` to the command line
[2014-11-13 10:30:10,074][INFO ][node                     ] [Thin Man] version[1.4.0], pid[6192], build[bc94bd8/2014-11-05T14:26:12Z]
[2014-11-13 10:30:10,074][INFO ][node                     ] [Thin Man] initializing ...
[2014-11-13 10:30:10,080][INFO ][plugins                  ] [Thin Man] loaded [], sites []
Java HotSpot(TM) Client VM warning: You have loaded library /root/download/elasticsearch-1.4.0/lib/sigar/libsigar-x86-linux.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
[2014-11-13 10:30:12,997][INFO ][node                     ] [Thin Man] initialized
[2014-11-13 10:30:12,997][INFO ][node                     ] [Thin Man] starting ...
[2014-11-13 10:30:13,096][INFO ][transport                ] [Thin Man] bound_address {inet[/0.0.0.0:9300]}, publish_address {inet[/10.168.75.170:9300]}
[2014-11-13 10:30:13,129][INFO ][discovery                ] [Thin Man] elasticsearch/r5aQ91yDTOSr3I1FI8_Piw
[2014-11-13 10:30:16,908][INFO ][cluster.service          ] [Thin Man] new_master [Thin Man][r5aQ91yDTOSr3I1FI8_Piw][iZ23onhpqvwZ][inet[/10.168.75.170:9300]], reason: zen-disco-join (elected_as_master)
[2014-11-13 10:30:16,946][INFO ][http                     ] [Thin Man] bound_address {inet[/0.0.0.0:9200]}, publish_address {inet[/10.168.75.170:9200]}
[2014-11-13 10:30:16,946][INFO ][node                     ] [Thin Man] started
[2014-11-13 10:30:16,961][INFO ][gateway                  ] [Thin Man] recovered [0] indices into cluster_state
复制代码

我的没有这个信息显示:

1
[INFO ][node                     ] [Lorna Dane] started<br><br>

如果想后台运行,则执行

1
./elasticsearch -d

想确认程序是否运行,则运行

1
2
3
lsof -i:9200
lsof -i:9300
一个是节点对外服务端口,一个是节点间交互端口(如果有集群的话)。<br><br><br>

Run curl -X GET http://localhost:9200/

-X 指定协议,get ,post,delete等。 \

输出类似

{
  "name" : "Scarlet Spider",
  "cluster_name" : "elasticsearch",
  "version" : {
    "number" : "2.2.0",
    "build_hash" : "8ff36d139e16f8720f2947ef62c8167a888992fe",
    "build_timestamp" : "2016-01-27T13:32:39Z",
    "build_snapshot" : false,
    "lucene_version" : "5.4.1"
  },
  "tagline" : "You Know, for Search"
}

http://my.oschina.net/qiangzigege/blog/220224

 

参考:

http://www.oschina.net/translate/elasticsearch-getting-started?cmp  

Getting Started with ElasticSearch

elasticsearch中文文档:

http://blog.csdn.net/cnweike/article/details/33736429/

 

编辑推荐:
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
历史上的今天:
2013-11-13 python模块学习之random
2013-11-13 《how to design programs》12章函数复合
2011-11-13 John Resig: JavaScript's Chuck Norris
2011-11-13 WPF 创建多行TextBox
2011-11-13 Visual Studio 2010: C# Hello World Tutorial
2011-11-13 如何恢复word默认设置
2011-11-13 如何更改VS2010的[默认开发语言]默认环境设置
点击右上角即可分享
微信分享提示