本文来自我的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. XHR

    xhr注入 XHR 注入技术是通过XMLHttpRequest来获取javascript的.但与eval不同的是,该机制是通过创建一个script的DOM元素,然后把XMLHttpRequest的响应 ...

  2. 【Android】屏幕尺寸的表示

    1. 单位 - px(pixel): 普通的像素点描述,位图中的一个颜色点(RGBA或者YUV) - dip(device independent pixels): 设备独立像素. - dp: 与di ...

  3. mysql-innoDB-锁

    在InnoDB加锁前,为什么要先start transaction innodb下锁的释放在事务提交/回滚之后,事务一旦提交/回滚之后,就会自动释放事务中的锁,innodb默认情况下autocommi ...

  4. java常用类--与用户互动

    运行java的参数: 主方法:public static void main(String[] args){}:为了让JVM可以自由调用main方法,使用public修饰,JVM通过类来调用main方 ...

  5. jdk源码->集合->HashSet

    类的属性 public class HashSet<E> extends AbstractSet<E> implements Set<E>, Cloneable, ...

  6. SVN同步时忽略特定文件或文件夹

    在MyEclipse中使用SVN同步的时候,经常会提示一些比如.classpath等不需要同步的配置文件,可以通过设置来忽略这一部分的文件或者文件夹. 1.选择菜单Window→Preferences ...

  7. linux(ubuntu或Deepin等)+win7双系统升级win10出现grub解决办法

    1,set root=(hd0,msdos11) 2,set prefix=(hd0,msdos11)/boot/grub 3,insmod /boot/grub/i386-pc/normal.mod ...

  8. Matlab 多项式拟合、稳健滤波等实用函数

    Function summary http://www.biomecardio.com/matlab/index.html clinspace Curvilinearly spaced points ...

  9. 浅谈TreeMap以及在java中的使用

    treemap结构是红黑树 1.先介绍一下平衡二叉树 其特点是一棵空树或它的左右两个子树的高度差的绝对值不超过1,并且左右两个子树都是一棵平衡二叉树.也就是说该二叉树的任何一个子节点,其左右子树的高度 ...

  10. openstack开发基础