本文来自我的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安装的更多相关文章

  1. ELK 安装Elasticsearch

    章节 ELK 介绍 ELK 安装Elasticsearch ELK 安装Kibana ELK 安装Beat ELK 安装Logstash ELK栈要安装以下开源组件: Elasticsearch Ki ...

  2. NoSql1 在Linux(CentOS)上安装memcached及使用

    前言:       今天是初五,生活基本要从过年的节奏中回归到正常的生活了,所以想想也该想想与工作有关的事情了.我之前在工作中会经常使用memcached和redis,但是自己一直没有时间系统的好好看 ...

  3. 在Ubuntu|CentOS上安装Shutter截图工具及快捷键设置

    简介 Shutter前身叫GScrot,它是一款相当棒的截图软件. 通过Shutter,你可以截取包括选定区域.全屏幕.窗口.窗口内的控件甚至网页的图像.通过内置的强大插件机制,你可以在截图后,对图像 ...

  4. CentOS下安装hadoop

    CentOS下安装hadoop 用户配置 添加用户 adduser hadoop passwd hadoop 权限配置 chmod u+w /etc/sudoers vi /etc/sudoers 在 ...

  5. CentOS下安装使用start-stop-daemon

    CentOS下安装使用start-stop-daemon 在centos下下了个自启动的服务器脚本 执行的时候发现找不到start-stop-daemon命令 好吧 执行手动编译一下 加上这个命令 w ...

  6. CentOS 7 安装 Docker

    CentOS 7 安装 Docker 这里介绍 ContOS 7 的安装 docker V1.2+,包括阿里云加速 docker 镜像下载的设置,这对提升使用 docker 体验至关重要.其他系统安装 ...

  7. centos在线安装svn

    centos在线安装svn 用下列命令安装svn服务 yum install subversion 创建svn版本库目录 mkdir -p /var/svn/svnrepos 创建版本库 svnadm ...

  8. CentOS 7 安装 配置 MySQL

    第一部分:CentOS 7安装MySQL 5.7 1.下载YUM库 shell > wget http://dev.mysql.com/get/mysql57-community-release ...

  9. 从零开始学 Java - CentOS 下安装 Nginx

    早上下起了暴雨 闹钟还未响起就听到雨滴哗啦啦击打窗户的声音,被吵醒了.起床上班,在楼下的十字路口,暴雨大到完全看不清对面,两个穿着雨衣的交警站在路口中间指挥着过往的车辆,大家都慌慌张张.急急忙忙的打着 ...

随机推荐

  1. dedecms 下载时弹出提示登录框或直接下载

    http://jingyan.baidu.com/article/9f63fb918656c2c8400f0ebc.html DEDECMS 默认下载 是直接给出了一个  本地下载的   下载链接 本 ...

  2. 解决service层无法注入

    练手时发现个问题,路径404,各种检查发现,多加了一层<context:component-scan base-package="com.yanan.controller"/ ...

  3. Linux指令--ifconfig

    许多windows非常熟悉ipconfig命令行工具,它被用来获取网络接口配置信息并对此进行修改.Linux系统拥有一个类似的工具,也就是ifconfig(interfaces config).通常需 ...

  4. Linux指令--head,tail

    原文出处:http://www.cnblogs.com/peida/archive/2012/11/06/2756278.html head 与 tail 就像它的名字一样的浅显易懂,它是用来显示开头 ...

  5. 【转】shell学习笔记(七)——流程控制之while

    while do done, until do done (不定回圈) 当 condition 条件成立时,就进行回圈,直到 condition 的条件不成立才停止 while [condition] ...

  6. tomcat监控(二)

    标签: linux 笔者Q:972581034 交流群:605799367.有任何疑问可与笔者或加群交流 这里介绍二种监控Tomcat的方法 使用windows版本的jdk监控 使用zabbix监控 ...

  7. c# 事件路由器

    事件转发 using System; using System.Collections.Generic; using System.Linq; using System.Text; using Sys ...

  8. Spring AOP小记

    一.概述 在通常的开发过程中,我们调用的顺序通常是controller->service-dao,其中,service中包含着太多的业务逻辑,并且还要不断调用dao来实现自身的业务逻辑,经常会导 ...

  9. Redis进阶实践之十 Redis主从复制的集群模式

    一.引言        Redis的基本数据类型,高级特性,与Lua脚本的整合等相关知识点都学完了,说是学完了,只是完成了当前的学习计划,在以后的时间还需继续深入研究和学习.从今天开始来讲一下有关Re ...

  10. 安装pcntl以实现php多进程

    pcntl 扩展包一般就在php源码的ext目录下. cd ./ext/pcntl /opt/server/php5/bin/phpize ./configure \ --with-php-confi ...