centos ELK安装
本文来自我的github pages博客http://galengao.github.io/ 即www.gaohuirong.cn
ELK是进行日志收集分析用的,具体工作、原理、作用自行google。该文只是我简单的一个搭建笔记。
[参照]:http://my.oschina.net/itblog/blog/547250
JDK安装
$ tar zxvf jdk-7u76-linux-x64.tar.gz -C /usr/local
$ cd /usr/local
$ mv jdk1..0_21 jdk1.
vi ~/.bash_profile
JAVA_HOME=/usr/local/jdk1.
PATH=$PATH:$HOME/bin:/usr/local/mysql/bin:$JAVA_HOME/bin
安装ElasticSearch
wget https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.2.0/elasticsearch-2.2.0.tar.gz
tar -zxvf elasticsearch-2.2..tar.gz
cd elasticsearch-2.2.
安装Head插件(Optional):
./bin/plugin install mobz/elasticsearch-head
然后编辑ES的配置文件:
vi config/elasticsearch.yml cluster.name=es_cluster
node.name=node0
path.data=/tmp/elasticsearch/data
path.logs=/tmp/elasticsearch/logs
#当前hostname或IP,我这里是centos2
network.host=centos2
network.port=
其他的选项保持默认,然后启动ES:
./bin/elasticsearch
访问:
http://192.168.10.141:9200/
http://192.168.10.141:9200/_plugin/head/
安装Logstash
wget https://download.elastic.co/logstash/logstash/logstash-2.2.2.tar.gz
配置Logstash:
tar -zxvf logstash-2.2..tar.gz
cd logstash-2.2. mkdir config
vi config/log4j_to_es.conf
输入以下内容: # For detail structure of this file
# Set: https://www.elastic.co/guide/en/logstash/current/configuration-file-structure.html
input {
# For detail config for log4j as input,
# See: https://www.elastic.co/guide/en/logstash/current/plugins-inputs-log4j.html
log4j {
mode => "server"
host => "192.168.10.141"
port =>
}
}
filter {
#Only matched data are send to output.
}
output {
# For detail config for elasticsearch as output,
# See: https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html
elasticsearch {
action => "index"#The operation on ES
hosts => "192.168.10.141:9200" #ElasticSearch host, can be array.
index => "ec" #The index to write data to, can be any string.
}
}
因此使用agent来启动它(使用-f指定配置文件):
./bin/logstash agent -f config/log4j_to_es.conf
安装Kibana
wget https://download.elastic.co/kibana/kibana/kibana-4.4.1-linux-x64.tar.gz
配置Kibana:
tar -zxvf kibana-4.4.-linux-x64.tar.gz
cd kibana-4.4.-linux-x64
修改以下几项(由于是单机版的,因此host的值也可以使用localhost来代替,这里仅仅作为演示):
vi config/kibana.yml server.port:
server.host: “centos2”
elasticsearch.url: http://centos2:9200
kibana.index: “.kibana”
启动kibana:
./bin/kibana
后面用浏览器打开kibana,http://IP:5601 进行一步一步配置
centos ELK安装的更多相关文章
- ELK 安装Elasticsearch
章节 ELK 介绍 ELK 安装Elasticsearch ELK 安装Kibana ELK 安装Beat ELK 安装Logstash ELK栈要安装以下开源组件: Elasticsearch Ki ...
- NoSql1 在Linux(CentOS)上安装memcached及使用
前言: 今天是初五,生活基本要从过年的节奏中回归到正常的生活了,所以想想也该想想与工作有关的事情了.我之前在工作中会经常使用memcached和redis,但是自己一直没有时间系统的好好看 ...
- 在Ubuntu|CentOS上安装Shutter截图工具及快捷键设置
简介 Shutter前身叫GScrot,它是一款相当棒的截图软件. 通过Shutter,你可以截取包括选定区域.全屏幕.窗口.窗口内的控件甚至网页的图像.通过内置的强大插件机制,你可以在截图后,对图像 ...
- CentOS下安装hadoop
CentOS下安装hadoop 用户配置 添加用户 adduser hadoop passwd hadoop 权限配置 chmod u+w /etc/sudoers vi /etc/sudoers 在 ...
- CentOS下安装使用start-stop-daemon
CentOS下安装使用start-stop-daemon 在centos下下了个自启动的服务器脚本 执行的时候发现找不到start-stop-daemon命令 好吧 执行手动编译一下 加上这个命令 w ...
- CentOS 7 安装 Docker
CentOS 7 安装 Docker 这里介绍 ContOS 7 的安装 docker V1.2+,包括阿里云加速 docker 镜像下载的设置,这对提升使用 docker 体验至关重要.其他系统安装 ...
- centos在线安装svn
centos在线安装svn 用下列命令安装svn服务 yum install subversion 创建svn版本库目录 mkdir -p /var/svn/svnrepos 创建版本库 svnadm ...
- CentOS 7 安装 配置 MySQL
第一部分:CentOS 7安装MySQL 5.7 1.下载YUM库 shell > wget http://dev.mysql.com/get/mysql57-community-release ...
- 从零开始学 Java - CentOS 下安装 Nginx
早上下起了暴雨 闹钟还未响起就听到雨滴哗啦啦击打窗户的声音,被吵醒了.起床上班,在楼下的十字路口,暴雨大到完全看不清对面,两个穿着雨衣的交警站在路口中间指挥着过往的车辆,大家都慌慌张张.急急忙忙的打着 ...
随机推荐
- iOS ASIHTTPRequest详解
ASIHTTPRequest对CFNetwork API进行了封装,并且使用起来非常简单,用Objective-C编写,可以很好的应用在Mac OS X系统和iOS平台的应用程序中.ASIHTTPRe ...
- ios 积累
1.加号 是可以通过类名直接调用这个方法,而减号则要实例化逸个对象,然后通过实例化的对象来调用该方法!! 2.(返回类型) 方法名 :(参数类型)变量名 空格 参数二名 :(参数类型) 变量名 空格 ...
- CCF系列之有趣的数(201312-4)
题目链接: http://115.28.138.223:81/view.page?opid=4 试题名称: 有趣的数 时间限制: 1.0s 内存限制: 256.0MB 问题描述: 问题描述 我们把一个 ...
- word:Can't find the word document templant:WordToRqm.doc
问题:打开word文件时弹出提示 Cannot find the Word template:WordToRqm.dot 原因:安装了power designer. 解决:运行regedit.exe ...
- FORTH基础
body, table{font-family: 微软雅黑} table{border-collapse: collapse; border: solid gray; border-width: 2p ...
- SerialChart串口示波器的成功调试
2018-01-1601:29:06 深夜更新一波串口示波器! http://t.cn/RQMA3uq 心得体会 总之将数据输出设置为","分割的形式即可 重点注意事项!!!! m ...
- node.js进阶话题
< h3>notes_控制流 //forloopi.js var fs = require('fs'); var files = ['a.txt', 'b.txt', 'c.txt']; ...
- java8大基本数据类型
基本类型 字节数 位数 最大值 最小值 byte 1byte 8bit 2^7 - 1 -2^7 short 2byte 16bit 2^15 - 1 -2^15 int 4byte 32bit 2^ ...
- 百度网盘不限速下载软件 Pan Download
百度网盘不限速下载软件 Pan Download Pan Download下载软件是一款电脑端的快速下载器软件,您可以通过Pan Download直接下载百度网盘中的资源,此款软件下载速度快,下载压缩 ...
- Global对象
1.Global对象是不需要创建实例就可以直接调用方法或属性的对象.有点类是于java中的工具类 2.关于汉字的网络传递 网络访问的过程中在传递数据的时候,传递的本质都是0101,如果你要传送字符的话 ...