ELK学习之安装elasticsearch

安装教程:https://blog.csdn.net/u012270682/article/details/72934270.亲测已经通过。访问http://localhost:9100端口入下图所示:

用IE浏览器打开。google浏览器打开我的版本页面兼容性不好

官网下载: elasticsearch
node下载地址:https://nodejs.org/en/download/

1:双击node-v8.11.3-x64.msi 安装nodejs成功
2:配置NODE_HOME 和 PATH并验证 node -v 验证版本号
3:安装grunt打包工具,grunt是一个很方便的构建工具,可以进行打包压缩、测试、执行等等的工作,5.0里的head插件就是通过grunt启动的。因此需要安装grunt:
4: npm install -g grunt-cli
安装过程如下:
C:\Program Files\nodejs>npm install -g grunt-cli
C:\Users\liyy\AppData\Roaming\npm\grunt -> C:\Users\liyy\AppData\Roaming\npm\node_modules\grunt-cli\bin\grunt
+ grunt-cli@1.2.0
added 16 packages in 7.544s
表示安装成功
查看grunt的版本  grunt -version显示版本号目前最新的版本是grunt-cli v1.2.0
5:https://github.com/mobz/elasticsearch-head.git 下载elastic插件

6:解压,修改head/Gruntfile.js:

connect: {
    server: {
        options: {
            port: 9100,
            hostname: '*',
            base: '.',
            keepalive: true
        }
    }
}

head/_site/app.js

修改head的连接地址:

this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://localhost:9200";

把localhost修改成你es的服务器地址,如:

this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://10.10.10.10:9200";

修改一下es使用的参数。编辑config/elasticsearch.yml:

# 换个集群的名字,免得跟别人的集群混在一起
cluster.name: es-node

# 换个节点名字
node.name: node-01

# 修改一下ES的监听地址,这样别的机器也可以访问
network.host: 0.0.0.0或者是我主机的ip

# 默认的就好
http.port: 9200

# 增加新的参数,这样head插件可以访问es
http.cors.enabled: true
http.cors.allow-origin: "*"

npm install安装head插件。第一次会报错。如果报错就再执行一次命令就回成功

最后,在head源代码目录下启动nodejs:

grunt server

head插件就装好了。访问http://localhost:9100

 

总结一下环境:

java version "1.8.0_161"

node -v  v8.11.3

grunt -version grunt-cli v1.2.0   grunt v1.0.1

elasticsearch-6.3.2  

win10系统

(1):LInix安装elasticsearch5.0可能会遇到的错误:

1:不能以root用户启动elsa   创建用户:useradd eser  授权:chown -R eser.eser  elassearch目录  切换用户:su eser

(2): max virtual memory areas vm.max_map_count[35530] is too low,increase to at lease [262144]

执行:sysctl -w vm.max_map_count = 262144

(3)max file descriptors [65535]  for elasearch process is too low,..

修改/etc/security/limits.conf   

soft nofile 655360

hard nofile 655360

(4)如果启动成功过仍然无法访问9200端口,这需要关掉防火墙

systemctl  stop firewalld

netstat -anlpt 查看端口时候启动

ps aux|grep java

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值