linux elasticsearch1.7.1 搭建

linux suse12 64位安装elasticsearch,version1.7.1


(所需文件已上传csdn,免积分下载...

    jdk下载路径:http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html)


方法一所需文件:

es文件 |elasticsearch-1.7.1.zip
jdk文件 |jdk-7u79-linux-x64.tar.gz
service文件 | elasticsearch-servicewrapper-master.zip
elasticsearch-head插件|elasticsearch-head-master.zip
--------------------------------------------------------------------------------------
方法二所需文件:
elasticsearch | elasticsearch-1.7.1.tar.gz
######################################################################################


一、安装jdk
①、# tar -zxvf jdk-7u79-linux-x64.tar.gz,得到 jdk1.7.0_79,放至/home目录下;
②、# vi /etc/profile (添加以下内容)
export JAVA_HOME=/home/jdk1.7.0_79
    export PATH=$JAVA_HOME/bin:$PATH
    export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
③、# . /etc/profile (. /之间有一个空格)
④、# java  (测试是否安装成功)
⑤、结束

二、安装elasticsearch
方法一:所有服务、插件已配置好
①、# tar -zxvf elasticsearch-1.7.1.tar.gz,得到elasticsearch-1.7.1,放至/home目录下;
②、# cd /home/elasticsearch-1.7.1/bin/service/
# ./elasticsearch start (启动elasticsearch服务)
③、浏览器(支持html5)地址输入:http://192.168.2.4:9200/_plugin/head/
方法二:手动安装
①、# unzip elasticsearch-1.7.1.zip,得到elasticsearch-1.7.1,放至/home目录下;
②、# unzip elasticsearch-servicewrapper-master.zip,得到elasticsearch-servicewrapper-master
# cp -r elasticsearch-servicewrapper-master/service/ /home/elasticsearch-1.7.1/bin/
③、# cd /home/elasticsearch-1.7.1/bin/service/
# ./elasticsearch start (启动elasticsearch服务)
④、浏览器(支持html5)地址输入:http://192.168.2.4:9200/,可得到返回json
⑤、(可选、建议安装)安装elasticsearch-head插件
# ./elasticsearch stop (关闭elasticsearch服务)
# cd /home/elasticsearch-1.7.1
# mkdir plugins
# cd plugins
# mkdir head
# unzip elasticsearch-head-master.zip,得到elasticsearch-head-master
# cd elasticsearch-head-master
# cp -r _site /home/elasticsearch-1.7.1/plugins/head/
# cd /home/elasticsearch-1.7.1/bin/service/
# ./elasticsearch start (启动elasticsearch服务)

⑥、浏览器(支持html5)地址输入:http://192.168.2.4:9200/_plugin/head/


持续更新中。。。(java API 对elasticsearch的使用)

你可能感兴趣的:(elasticsearch)