安装Elasticsearch

[root@test opt]# unzip elasticsearch-2.3.4.zip

[root@test opt]# ll elasticsearch-2.3.4

总用量 44

drwxr-xr-x. 2 root root  4096 6  30 2016 bin

drwxr-xr-x. 2 root root  4096 6  30 2016 config

drwxr-xr-x. 2 root root  4096 6  30 2016 lib

-rw-rw-r--. 1 root root 11358 6  30 2016 LICENSE.txt

drwxr-xr-x. 5 root root  4096 4  18 22:44 modules

-rw-rw-r--. 1 root root   150 6  30 2016 NOTICE.txt

-rw-rw-r--. 1 root root  8700 6  30 2016 README.textile

[root@test opt]#

 

创建Elasticsearch运行的普通账号

[root@test opt]# useradd elasticsearch

 

切换到elasticsearch普通账号

[root@test opt]# su - elasticsearch

[elasticsearch@test ~]$ cd /opt/

 

后台启动Elasticsearch

[elasticsearch@test opt]$ ./elasticsearch-2.3.4/bin/elasticsearch -d

 

简单测试Elasticsearch

[root@test ~]# curl http://127.0.0.1:9200

{

  "name" : "Interloper",

  "cluster_name" : "elasticsearch",

  "version" : {

    "number" : "2.3.4",

    "build_hash" : "e455fd0c13dceca8dbbdbb1665d068ae55dabe3f",

    "build_timestamp" : "2016-06-30T11:24:31Z",

    "build_snapshot" : false,

    "lucene_version" : "5.5.0"

  },

  "tagline" : "You Know, for Search"

}

[root@test ~]#

 

成功!