ES Docs-1:Installation Elasticsearch-2.3.1
installation
Elasticsearch requires at least Java 7. Specifically as of this writing, it is recommended that you use the Oracle JDK version 1.8.0_73.
java -version
echo $JAVA_HOME
下载(Linux版本)
curl -L -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.3.1/elasticsearch-2.3.1.tar.gz
解压
tar -xvf elasticsearch-2.3.1.tar.gz
运行
cd elasticsearch-2.3.1/bin
./elasticsearch
若不能使用root运行,需要建立普通用户,并在用户目录(如/home/es/)下解压运行elasticSearch。
root@qiandu1-yuwencai:/opt/cluster/elasticsearch-2.3.1/bin# ./elasticsearch
Exception in thread "main" java.lang.RuntimeException: don't run elasticsearch as root.
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:93)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:144)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Refer to the log for complete error details.
root@qiandu1-yuwencai:~# adduser es
Adding user `es' ...
Adding new group `es' (1001) ...
Adding new user `es' (1001) with group `es' ...
Creating home directory `/home/es' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for es
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y
root@qiandu1-yuwencai:~# su es
es@qiandu1-yuwencai:/root$
运行结果
es@qiandu1-yuwencai:~/cluster/elasticsearch-2.3.1$ bin/elasticsearch
[2016-04-18 13:13:57,815][INFO ][node ] [Two-Gun Kid] version[2.3.1], pid[17929], build[bd98092/2016-04-04T12:25:05Z]
[2016-04-18 13:13:57,815][INFO ][node ] [Two-Gun Kid] initializing ...
[2016-04-18 13:13:58,497][INFO ][plugins ] [Two-Gun Kid] modules [reindex, lang-expression, lang-groovy], plugins [], sites []
[2016-04-18 13:13:58,522][INFO ][env ] [Two-Gun Kid] using [1] data paths, mounts [[/ (/dev/vda1)]], net usable_space [27gb], net total_space [39.2gb], spins? [possibly], types [ext4]
[2016-04-18 13:13:58,522][INFO ][env ] [Two-Gun Kid] heap size [990.7mb], compressed ordinary object pointers [true]
[2016-04-18 13:13:58,522][WARN ][env ] [Two-Gun Kid] max file descriptors [4096] for elasticsearch process likely too low, consider increasing to at least [65536]
[2016-04-18 13:14:01,473][INFO ][node ] [Two-Gun Kid] initialized
[2016-04-18 13:14:01,473][INFO ][node ] [Two-Gun Kid] starting ...
[2016-04-18 13:14:01,653][INFO ][transport ] [Two-Gun Kid] publish_address {127.0.0.1:9300}, bound_addresses {[::1]:9300}, {127.0.0.1:9300}
[2016-04-18 13:14:01,675][INFO ][discovery ] [Two-Gun Kid] elasticsearch/LVk2-D3hSgWWSZJx6PooDA
[2016-04-18 13:14:04,794][INFO ][cluster.service ] [Two-Gun Kid] new_master {Two-Gun Kid}{LVk2-D3hSgWWSZJx6PooDA}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2016-04-18 13:14:04,824][INFO ][http ] [Two-Gun Kid] publish_address {127.0.0.1:9200}, bound_addresses {[::1]:9200}, {127.0.0.1:9200}
[2016-04-18 13:14:04,824][INFO ][node ] [Two-Gun Kid] started
[2016-04-18 13:14:04,870][INFO ][gateway ] [Two-Gun Kid] recovered [0] indices into cluster_state
指定cluster和node名称:
./elasticsearch --cluster.name es_cluster --node.name es_node_1
[2016-04-18 13:46:51,572][INFO ][node ] [es_node_1] version[2.3.1], pid[18186], build[bd98092/2016-04-04T12:25:05Z]
[2016-04-18 13:46:51,573][INFO ][node ] [es_node_1] initializing ...
[2016-04-18 13:46:52,211][INFO ][plugins ] [es_node_1] modules [reindex, lang-expression, lang-groovy], plugins [], sites []
[2016-04-18 13:46:52,235][INFO ][env ] [es_node_1] using [1] data paths, mounts [[/ (/dev/vda1)]], net usable_space [27gb], net total_space [39.2gb], spins? [possibly], types [ext4]
[2016-04-18 13:46:52,236][INFO ][env ] [es_node_1] heap size [990.7mb], compressed ordinary object pointers [true]
[2016-04-18 13:46:52,236][WARN ][env ] [es_node_1] max file descriptors [4096] for elasticsearch process likely too low, consider increasing to at least [65536]
[2016-04-18 13:46:54,104][INFO ][node ] [es_node_1] initialized
[2016-04-18 13:46:54,104][INFO ][node ] [es_node_1] starting ...
[2016-04-18 13:46:54,209][INFO ][transport ] [es_node_1] publish_address {127.0.0.1:9300}, bound_addresses {[::1]:9300}, {127.0.0.1:9300}
[2016-04-18 13:46:54,215][INFO ][discovery ] [es_node_1] es_cluster/7PCeI9T4QfqJzA-B8eCYig
[2016-04-18 13:46:57,345][INFO ][cluster.service ] [es_node_1] new_master {es_node_1}{7PCeI9T4QfqJzA-B8eCYig}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2016-04-18 13:46:57,366][INFO ][http ] [es_node_1] publish_address {127.0.0.1:9200}, bound_addresses {[::1]:9200}, {127.0.0.1:9200}
[2016-04-18 13:46:57,366][INFO ][node ] [es_node_1] started
[2016-04-18 13:46:57,390][INFO ][gateway ] [es_node_1] recovered [0] indices into cluster_state
Also note the line marked http with information about the HTTP address (127.0.0.1) and port (9200) that our node is reachable from. By default, Elasticsearch uses port 9200 to provide access to its REST API. This port is configurable if necessary.
参考资料
【1】来源: https://www.elastic.co/guide/en/elasticsearch/reference/current/_installation.html
【2】
-----------茂帅------------
java的版本要求是jdk 1.7 update 55之后 。推荐使用jdk 1.8
在root用户下的Linux需要创建一个新的用户,因为es不允许在root用户下面启动。如下操作:
1. Groupadd 组名称
2. Useradd -d 用户目录 -g 组名称 -G 其他组(如:root) 用户名称
3. 切换到新建的用户 su 用户名
下载es
curl -L -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.3.1/elasticsearch-2.3.1.tar.gz
启动es
./elasticsearch
启动es之后,es回给当前的node随机的命名一个英文名。可以通过以下命令来修改这个名字
./elasticsearch --cluster.name my_cluster_name --node.name my_node_name
es的默认的对外端口是9200
ES Docs-1:Installation Elasticsearch-2.3.1的更多相关文章
- 轻量级OLAP(二):Hive + Elasticsearch
1. 引言 在做OLAP数据分析时,常常会遇到过滤分析需求,比如:除去只有性别.常驻地标签的用户,计算广告媒体上的覆盖UV.OLAP解决方案Kylin不支持复杂数据类型(array.struct.ma ...
- ES系列(一):编译准备与server启动过程解析
ES作为强大的和流行的搜索引擎服务组件,为我们提供了方便的和高性能的搜索服务.在实际应用中也是用得比较爽,但如果能够更深入一点.虽然网上有许多的文章已经完整说明,ES是如何如何做到高性能,如何做到高可 ...
- ES系列(五):获取单条数据get处理过程实现
前面讲的都是些比较大的东西,即框架层面的东西.今天咱们来个轻松点的,只讲一个点:如题,get单条记录的es查询实现. 1. get语义说明 get是用于搜索单条es的数据,是根据主键id查询数据方式. ...
- 全文检索:haystack+elasticsearch
优点: 1.查询速度快 2.支持中文分词准备工作:安装es软件 1.拷贝到ubuntu 2.docker load -i 文件路径 3.配置 修改ip地址 4.docker run -dti --ne ...
- SpringBoot 2.x (12):整合Elasticsearch
Elasticsearch:一个优秀的搜索引擎框架 搜索方面最基本的是SQL的like语句 进一步的有Lucene框架 后来有企业级的Solr框架 而Elasticsearch框架尤其适合于数据量特别 ...
- ElasticStack学习(九):深入ElasticSearch搜索之词项、全文本、结构化搜索及相关性算分
一.基于词项与全文的搜索 1.词项 Term(词项)是表达语意的最小单位,搜索和利用统计语言模型进行自然语言处理都需要处理Term. Term的使用说明: 1)Term Level Query:Ter ...
- springboot集成elk 一: springboot + Elasticsearch
1.ELK介绍 1> Elasticsearch是实时全文搜索和分析引擎, 提供搜集.分析.存储数据三大功能: 是一套开放REST和JAVA API等结构提供高效搜索功能,可扩展的分布式系统. ...
- ES系列(二):基于多播的集群发现实现原理解析
ES作用超强悍的搜索引擎,除了需要具有齐全的功能支持,超高的性能,还必须要有任意扩展的能力.一定程度上,它是一个大数据产品.而要做扩展性,集群自然少不了.然而单独的集群又是不够的,能够做的事情太少,所 ...
- ES系列(三):网络通信模块解析
ES是一个分布式搜索引擎,其除了用户提供必要的通信服务外,集群间也必须保持紧密的通信联系,才能在必要的时候给出正确的结果.其则必然涉及到各种繁多且要求高的通信场景,那么如何实现高性能的通信,则是其必须 ...
随机推荐
- 算法(Algorithms)第4版 练习 1.5.15
用归纳法推导: 1.height = 0时,成立,其level 0的节点个数为C(0,0)=1. height = 1时,成立,其level 0的节点个数为C(1,0)=1,其level 1的节点个数 ...
- C++写和读文件
1.写: /*C++写文件和读文件*/ #include <stdio.h> #include <stdlib.h> int main() { FILE * fp; fp = ...
- c版基于链表的插入排序(改进版)
1. [代码][C/C++]代码 /** * @todo c版基于链表的插入排序 * @author Koma **/#include<stdio.h>#include<st ...
- SpringMVC简单实例(看起来有用)
SpringMVC简单实例(看起来有用) 参考: SpringMVC 基础教程 简单入门实例 - CSDN博客http://blog.csdn.net/swingpyzf/article/detail ...
- 山东省第七届ACM省赛
ID Title Hint A Julyed 无 B Fibonacci 打表 C Proxy 最短路径 D Swiss-system tournament 归并排序 E The Binding of ...
- (转)Java字符串转日期或日期转字符串
文章中,用的API是SimpleDateFormat,它是属于java.text.SimpleDateFormat,所以请记得import进 来! 用法: SimpleDateFormat sdf = ...
- Logiscope学习网址
Logiscope测试机理 http://blog.csdn.net/cmy673986/article/details/9163247 http://www.cnitblog.com/qiuya ...
- appium-环境搭建(一)
adb命令 adb的全称为Android Debug Bridge,就是起到调试桥的作用.借助adb工具,我们可以管理设备或者手机模拟器的状态.还可以进行很多手机操作,如安装软件\系统升级\运行she ...
- hdu-5637 Transform(位运算+bfs)
题目链接: Transform Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Other ...
- luogu1901 发射站
单调栈 正着插一遍反着插一遍 记录每个点左边右边第一个比他高的... yyc太强辣 #include<iostream> #include<cstdlib> #include& ...