1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | 步骤一:安装Java环境 下载Java最新程序 http://javadl.oracle.com/webapps/download/AutoDL?BundleId=207220 查看java version[root@localhost ~]# java -version java version "1.7.0_99" OpenJDK Runtime Environment (rhel-2.6.5.0.el6_7-x86_64 u99-b00) OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode) [root@localhost ~]# 步骤二:配置本机环境变量 export JAVA_HOME=/usr/java/jre1.8.0_77 export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar 步骤三:下载Elasticsearch程序 https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.2.1/elasticsearch-2.2.1.tar.gz 步骤四:解压程序 [root@localhost opt]#tar xf elasticsearch-2.2.1.tar.gz 步骤五:运行程序 [elk@localhost bin]$ ./elasticsearch –d 步骤六:检查运行 [elk@localhost bin]$ curl -XGxt http://localhost:9200/ { "name" : "Iron Man", "cluster_name" : "elasticsearch", "version" : { "number" : "2.2.1", "build_hash" : "d045fc29d1932bce18b2e65ab8b297fbf6cd41a1", "build_timestamp" : "2016-03-09T09:38:54Z", "build_snapshot" : false, "lucene_version" : "5.4.1" }, "tagline" : "You Know, for Search" } |