1、JDK安装
对于Elasticsearch来说,至少需要JDK1.7上的版本,但我们建议使用Oracle JDK version 1.8.0_73,JDK的安装这里不再细讲,安装完成之后检查一下JDK的版本
java -version echo $JAVA_HOME
2、下载最新的Elasticsearch版本
curl -L -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.3.3/elasticsearch-2.3.3.tar.gz
扩展知识
curl参数说明
-O/--remote-name 把输出写到该文件中,保留远程文件的文件名
3、解压Elasticsearch
tar -zxvf elasticsearch-2.3.3.tar.gz
3、启动Elasticsearch
cd elasticsearch-2.3.3/bin
前台启动
./elasticsearch
后台启动
./elasticsearch -d
[oracle@sigmam1 bin]$ ./elasticsearch
[2016-06-14 09:29:10,701][WARN ][bootstrap ] unable to install syscall filter: seccomp unavailable: requires kernel 3.5+ with CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER compiled in
[2016-06-14 09:29:12,654][INFO ][node ] [Termagaira] version[2.3.3], pid[24900], build[218bdf1/2016-05-17T15:40:04Z]
[2016-06-14 09:29:12,655][INFO ][node ] [Termagaira] initializing ...
[2016-06-14 09:29:15,419][INFO ][plugins ] [Termagaira] modules [lang-groovy, reindex, lang-expression], plugins [marvel-agent, license], sites []
[2016-06-14 09:29:15,496][INFO ][env ] [Termagaira] using [1] data paths, mounts [[/ (/dev/sda3)]], net usable_space [5.6gb], net total_space [17.3gb], spins? [possibly], types [ext3]
[2016-06-14 09:29:15,497][INFO ][env ] [Termagaira] heap size [1015.6mb], compressed ordinary object pointers [true]
[2016-06-14 09:29:26,383][INFO ][node ] [Termagaira] initialized
[2016-06-14 09:29:26,384][INFO ][node ] [Termagaira] starting ...
[2016-06-14 09:29:26,734][INFO ][transport ] [Termagaira] publish_address {192.168.56.101:9300}, bound_addresses {192.168.56.101:9300}
[2016-06-14 09:29:26,756][INFO ][discovery ] [Termagaira] elasticsearch/kscoYcBBQgGTdad1-LZBlQ
[2016-06-14 09:29:30,102][INFO ][cluster.service ] [Termagaira] new_master {Termagaira}{kscoYcBBQgGTdad1-LZBlQ}{192.168.56.101}{192.168.56.101:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2016-06-14 09:29:30,248][INFO ][http ] [Termagaira] publish_address {192.168.56.101:9200}, bound_addresses {192.168.56.101:9200}
[2016-06-14 09:29:30,255][INFO ][node ] [Termagaira] started
Elasticsearch可以手动修改节点和集群的名字,也可以在命令行启动时指定,直接修改:
./elasticsearch --cluster.name my_cluster_name --node.name my_node_name
默认情况下,Elasticsearch对外提供的端口是9200,如果要修改默认端口可以修改config目录下的
Elasticsearch.yml配置文件
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。