分享

ELK5.1.2完整安装教程

jackqiang2011 2017-1-25 13:55:30 发表于 其它 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 1 12725
Logstash5.1+elasticsearch5.1+kibana5.0安装教程
一.Logstash5.1安装(都在普通用户下安装)
1.jdk1.8+
2.配置config{input,filter,output}
二.Elasticsearch5.1安装
1.jdk1.8+
2.解压
tar -vzxf  ./elasticsearch-5.1.2.tar.gz -C ./***
3.配置elasticsearch.yum
# 换个集群的名字,免得跟别人的集群混在一起cluster.name: es-5.0-test
# 换个节点名字node.name: node-101
# 修改一下ES的监听地址,这样别的机器也可以访问network.host: 0.0.0.0
# 默认的就好http.port: 9200
# 增加新的参数,这样head插件可以访问eshttp.cors.enabled: truehttp.cors.allow-origin: "*"
4.配置        sudo vi /etc/sysctl.conf
        # 增加下面的内容 fs.file-max=65536
        vm.max_map_count=262144
5.设置资源参数
vi /etc/security/limits.conf
# 修改        
yourhost soft nofile 65536
yourhost hard nofile 131072
yourhost soft nproc 2048
yourhost hard nproc 4096
Yourhost为你的主机名
6.Sudo vi /etc/security/limits.d/90-nproc.conf
修改如下内容:

* soft nproc 1024
#修改为
* soft nproc 2048
7.vi /etc/sysctl.conf
添加下面配置:
vm.max_map_count=655360
并执行命令:
sysctl -p
然后,重新启动elasticsearch,即可启动成功。
8.安装部署head
        (1. 安装git
        yum -y install git
安装完成后,就可以直接下载代码了:
git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head
npm install
修改elasticsearch-head下Gruntfile.js文件,默认监听在127.0.0.1下9200端口
在connect{
        hostname:’0.0.0.0’
}
启动head服务
在elasticsearch-hea-master/grunt server
启动成功:
Running "connect:server" (connect) task
Waiting forever...
Started connect web server on http://localhost:9100
8.安装x-puck插件        
./bin/elasticsearch-plugin install x-pack
注意,安装之后,所有对ES的访问,增加了security机制,即需要用户名和密码,默认分别为: elastic 和changeme
取消验证:在kibana.yml和elasticsearch.yml中添加:
Xpack.security.enabled:false
验证:
curl -u elastic 'http://hadoop06:9200/?pretty'
Enter host password for user 'elastic':
输入密码出现下面信息,
{
  "name" : "hadoop06",
  "cluster_name" : "jiqiang",
  "cluster_uuid" : "8897xQilQaiRmTaqXVGlBw",
  "version" : {
    "number" : "5.1.2",
    "build_hash" : "c8c4c16",
    "build_date" : "2017-01-11T20:18:39.146Z",
    "build_snapshot" : false,
    "lucene_version" : "6.3.0"
  },
  "tagline" : "You Know, for Search"
}
注意,设置参数的时候:后面要有空格!
三.Kibana5.0安装
1.解压:
-zxvf  kibana-5.1.2-linux-x86_64.tar.gz -C ./***
2.配置./config/kibana.yum
server.host: "hadoop07"
server.name: "jiqiang"
elasticsearch.url: "http://hadoop06:9200"
elasticsearch.username: "elastic"
elasticsearch.password: "changeme"
3.
安装xpuck插件
./bin/kibana-plugin install x-pack
运行kabana
./bin/kabana
后台启动
nohup ./kibana &
如果让程序始终在后台执行,即使关闭当前的终端也执行(之前的&做不到),这时候需要nohup。
Kill:
fuser -n tcp 5601
kill -9  端口
浏览器登陆





已有(1)人评论

跳转到指定楼层
hrj294055233 发表于 2017-1-30 11:26:53
太棒了 学习一下
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条