您的位置:首页 > 其它

安装elasticsearch-1.7.2和插件的操作步骤

2017-05-31 10:30 337 查看
1 查看系统信息

[root@elk-1 tools]# cat /etc/redhat-release 

CentOS release 6.8 (Final)

[root@elk-1 tools]# uname -a

Linux elk-1.7-100 2.6.32-642.15.1.el6.x86_64 #1 SMP Fri Feb 24 14:31:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

2 安装jdk

解压:tar xf jdk-8u121-linux-x64.tar.gz

把文件移到local目录:mv jdk1.8.0_121 /usr/local/

进入目录:cd /usr/local/jdk1.8.0_121

添加环境变量

vi /etc/profile

最后添加:

export JAVA_HOME=/usr/local/jdk1.8.0_121

export JAVA_BIN=$JAVA_HOME/bin

export PATH=$PATH:$JAVA_HOME/bin

export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH

使profile生效

source /etc/profile

检查jdk查看结果

[root@elk-1 tools]# java -version

java version "1.8.0_45"

Java(TM) SE Runtime Environment (build 1.8.0_45-b14)

Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

3 安装elasticsearch-1.7.2

 tar -xf elasticsearch-1.7.2.tar.gz 

mv elasticsearch-1.7.2 /application/

ln -s /application/elasticsearch-1.7.2/ /application/elasticsearch

#启动

/application/elasticsearch/bin/elasticsearch -d

检查启动

[root@elk-1 tools]# netstat -nlutp|grep -E "92|93"

tcp        0      0 :::9200                     :::*                        LISTEN      1759/java           

tcp        0      0 :::9300                     :::*                        LISTEN      1759/java

通过浏览器检查是否成功

恭喜你安装成功~~~~~~~~!

4 安装插件

head 插件

[root@elk-1 bin]# pwd

/application/elasticsearch/bin

[root@elk-1 bin]# ./plugin -install mobz/elasticsearch-head

-> Installing mobz/elasticsearch-head...

Trying https://github.com/mobz/elasticsearch-head/archive/master.zip...
Downloading ...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................DONE

Installed mobz/elasticsearch-head into /application/elasticsearch/plugins/head

测试结果:
http://10.0.0.100:9200/_plugin/head/
Bigdesk 插件

[root@elk-1 bin]# pwd

/application/elasticsearch/bin


/plugin -install lukas-vlcek/bigdesk/2.5.0

[root@elk-1 bin]# ./plugin -install lukas-vlcek/bigdesk/2.5.0

-> Installing lukas-vlcek/bigdesk/2.5.0...

Trying http://download.elasticsearch.org/lukas-vlcek/bigdesk/bigdesk-2.5.0.zip...
Trying http://search.maven.org/remotecontent?filepath=lukas-vlcek/bigdesk/2.5.0/bigdesk-2.5.0.zip...
Trying https://oss.sonatype.org/service/local/repositories/releases/content/lukas-vlcek/bigdesk/2.5.0/bigdesk-2.5.0.zip...
Trying https://github.com/lukas-vlcek/bigdesk/archive/2.5.0.zip...
Trying https://github.com/lukas-vlcek/bigdesk/archive/master.zip...
Downloading .............................................................................................................................................................................................................................................DONE

Installed lukas-vlcek/bigdesk/2.5.0 into /application/elasticsearch/plugins/bigdesk

Identified as a _site plugin, moving to _site structure ...

测试结果:
http://10.0.0.100:9200/_plugin/bigdesk/#nodes
Marvel 插件

[root@elk-1 bin]# pwd

/application/elasticsearch/bin

[root@elk-1 bin]# ./plugin -install elasticsearch/marvel/latest

-> Installing elasticsearch/marvel/latest...

Trying http://download.elasticsearch.org/elasticsearch/marvel/marvel-latest.zip...
Downloading ...............................................................................................................................................................................................................................................................................................................................................................................................................................................................DONE

Installed elasticsearch/marvel/latest into /application/elasticsearch/plugins/marvel

测试结果:

http://10.0.0.100:9200/_plugin/marvel




学习和参考
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: