centos上手动安装最新版本ELK
软件包下载地址:https://www.elastic.co/downloads/elasticsearch
1,安装es
#tar zxvf elasticsearch-2.3.4.tar.gz
#mv elasticsearch-2.3.4 /usr/local
#Cd /usr/local
#mv elasticsearch-2.3.4/ elasticsearch
#chmod -R test:test ./elasticsearch/
#su test
更改配置文件config/elasticsearch.yml
cluster.name: node236
network.host: 192.168.1.236
$ bin/elasticsearch //这里应该正常启动了
插件安装
$ ./plugin install mobz/elasticsearch-head
-> Installing mobz/elasticsearch-head...
Trying https://github.com/mobz/elasticsearch-head/archive/master.zip ...
Downloading
......................................................................................................................................
....................................DONE
Verifying https://github.com/mobz/elasticsearch-head/archive/master.zip checksums if available ...
NOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify)
Installed head into /usr/local/elasticsearch/plugins/head
[test@node236 bin]$ ls ../plugins/head/
elasticsearch-head.sublime-project .jshintrc _site/
.gitignore LICENCE src/
Gruntfile.js package.json test/
grunt_fileSets.js plugin-descriptor.properties
index.html README.textile
访问http://192.168.1.236:9200/_plugin/head/正常
注:此处远程访问一定要改配置文件的network.host值,否则只能本机访问
2,安装kibana
#tar zxvf kibana-4.5.3-linux-x64.tar.gz -C /usr/local/
# cd /usr/local/
# mv kibana-4.5.3-linux-x64/ kibana
# cd kibana/
# ls
bin installedPlugins node optimize README.txt webpackShims
config LICENSE.txt node_modules package.json src
# cd /etc/systemd/system
# vi kibana.service
[Service]
ExecStart=/usr/local/kibana/bin/kibana
[Install]
WantedBy=multi-user.target
# systemctl enable kibana
#systemctl start kibana
Created symlink from /etc/systemd/system/multi-user.target.wants/kibana.service to /etc/systemd/system/kibana.service.
#systemctl status kibana
— kibana.service
Loaded: loaded (/etc/systemd/system/kibana.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2016-07-27 16:35:12 CST; 814ms ago
Main PID: 44722 (node)
CGroup: /system.slice/kibana.service
44722 /usr/local/kibana/bin/../node/bin/node /usr/local/kibana/b...
Jul 27 16:35:12 node236 systemd[1]: Started kibana.service.
Jul 27 16:35:12 node236 systemd[1]: Starting kibana.service...
# netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:5601 0.0.0.0:* LISTEN 44722/node
tcp6 0 0 192.168.1.236:9200 :::* LISTEN 44160/java
tcp6 0 0 192.168.1.236:9300 :::* LISTEN 44160/java
3,安装logstash
[root@node236 test]# tar zxvf logstash-2.3.4.tar.gz -C /usr/local/
[root@node236 test]# cd /usr/local/
[root@node236 local]# mv logstash-2.3.4/ logstash
[root@node236 logstash-2.3.4]# ls
bin CHANGELOG.md CONTRIBUTORS Gemfile Gemfile.jruby-1.9.lock lib LICENSE NOTICE.TXT vendor
测试一下,情况正常
[root@node236 logstash-2.3.4]# bin/logstash -e 'input { stdin { } } output { stdout {} }'
Settings: Default pipeline workers: 1
Pipeline main started
2016-07-27T08:41:53.637Z node236
fdfd
2016-07-27T08:41:58.875Z node236 fdfd
afdfad
2016-07-27T08:42:01.846Z node236 afdfad
加个证书支持
[root@node236 logstash]# cd /etc/pki/tls
[root@node236 tls]# openssl req -subj '/CN=node236/' -x509 -days 3650 -batch -nodes -newkey rsa:2048 -keyout private/logstash-
forwarder.key -out certs/logstash-forwarder.crt
Generating a 2048 bit RSA private key
..........................................+++
....+++
writing new private key to 'private/logstash-forwarder.key'
-----
手动安装是没有配置文件的,需要自己建立
[root@node236 tls]# cd /usr/local/logstash/
[root@node236 logstash]# mkdir conf
[root@node236 logstash]# vi conf/1.conf
内容如下,这是针对apache的日志的监控
input {
file {
path => "/var/log/httpd/access_log"
start_position => beginning
}
}
filter {
if [path] =~ "access" {
mutate { replace => { "type" => "apache_access" } }
grok {
match => { "message" => "%{COMBINEDAPACHELOG}" }
}
}
date {
match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
}
}
output {
elasticsearch {
hosts => "192.168.1.246:9200"
index => "fuckyou_index" #索引名称
}
stdout { codec => rubydebug }
}
"conf/1.conf" 26L, 471C written
[root@node236 logstash]# ./bin/logstash -f ./conf/1.conf //启动
4,测试
yum -y install httpd 装个apache,之后随便用个awvs扫一下IP
以下是在ES里看到的内容,说明已经正确抓取

访问kibana,一切正常。

centos上手动安装最新版本ELK的更多相关文章
- centos下安装最新版本git(通过master分支下载最新版)
centos6.7下安装最新版本git 本文参考:http://www.01happy.com/centos-install-latest-git/ 按照原博主所提供的思路安装可能会出现下列问题 解决 ...
- 【教程】CentOS 7安装 最新版本Docker
博主最近需要安装Docker,步骤如下: Docker安装官方地址:https://docs.docker.com/install/linux/docker-ce/centos/ 以下命令都是在roo ...
- 如何在CentOS 7中安装最新Git(源码安装)
如何在CentOS 7中安装最新Git 2017年05月20日 11:49:53 阅读数:1624 Git是在今天的软件开发行业一个非常有用的版本控制工具.我一直使用Git.于是为Linux公社的读者 ...
- 如何安装最新版本的memcached
转载自孟叔的博客: https://learndevops.cn/index.php/2016/06/10/how-to-install-the-latest-version-of-memcache ...
- Cacti中文版在Centos上的安装
最近老有人问Cacti中文版在哪下载啊怎么安装啊,我在这里一遍给大家讲解了:Cacti中文版在Centos上的安装 1.基本安装 cacti是运作在apache+php+mysql+net-snmp工 ...
- ubuntu14.04下配置Java环境以及安装最新版本的eclipse
首先是配置JDK 步骤一:下载最新版本的JDK,链接:http://www.oracle.com/technetwork/java/javase/downloads/index.html 步骤二:首先 ...
- angular4.0 安装最新版本的nodejs、npm、@angular/cli的方法
在使用ng项目的ui框架时,比如ng-zorro.angular Material,需要安装最新版本的@angular/cli: 配置ng-zorro框架 ng-zorro官网:https://ng. ...
- Windows7 64位安装最新版本MySQL服务器
Windows7 64位安装最新版本MySQL服务器 近期,一直在研究MySQL数据库,经常修改配置文件,导致MySQL数据库无法使用,不得不反复重装MySQL数据库.以下是在Windows7 64位 ...
- 【工具相关】ionic-通过nmp安装最新版本的 cordova 和 ionic
一,命令行下输入: sudo npm install -g cordova ionic 用来安装最新版本的cordova和ionic. 如下图所示: 二,等待一下,如下图所示. 三,用命令 npm u ...
随机推荐
- [poj2891]Strange Way to Express Integers(扩展中国剩余定理)
题意:求解一般模线性同余方程组 解题关键:扩展中国剩余定理求解.两两求解. $\left\{ {\begin{array}{*{20}{l}}{x = {r_1}\,\bmod \,{m_1}}\\{ ...
- C# 移除string[] 数组中的指定元素
本文转载自 http://www.cnblogs.com/jcdd-4041/p/3279531.html 第一步:先把string[] 转换成 ArrayList 第二步:移除指定元素 第三步 ...
- 【原】spring+springmvc+mybatis整合
整合框架的代码结构: 最全约束: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns=&q ...
- js 实现发布订阅模式
/* Pubsub */ function Pubsub(){ //存放事件和对应的处理方法 this.handles = {}; } Pubsub.prototype = { //传入事件类型typ ...
- UE4]不使用角色蓝图、动画蓝图、状态机,用“24K纯C++”实现动画播放
http://aigo.iteye.com/blog/2283454 原文作者:@玄冬Wong 不好意思,我稍稍标题党了,目前还不清楚如何用C++代码来实现BlendSpace和Montage的逻辑, ...
- 洛谷P4213 【模板】杜教筛(Sum)(杜教筛,莫比乌斯反演)
传送门 坑着,联赛活着回来再填(死了就不填了) // luogu-judger-enable-o2 //minamoto #include<iostream> #include<cs ...
- 静态文件与APP
目录 静态文件的配置和使用 什么是静态文件? 为什么使用静态文件 如何配置,使用静态文件 静态文件相关(动态配置) app创建预注册 app指什么? 创建一个APP 注册app app文件作用 app ...
- generator——实例:runner
咱们本篇说的依然还是咱们的generator,实际上来说,咱们之前已经说了generator是啥以及generator里的yield怎么个用法,那接下来呢,咱就要具体来看个例子了,东西咱都搞明白了,之 ...
- try catch finally的执行顺序学习
try catch finally的执行顺序学习 首先执行try,如果有异常执行catch,无论如何都会执行finally,当有return以后,函数就会把这个数据存储在某个位置,然后告诉主函数, ...
- [Android]Android性能优化
安卓性能优化 性能优化的几大考虑 Mobile Context 资源受限 + 内存,普遍较小,512MB很常见,开发者的机器一般比用户的机器高端 + CPU,核心少,运算能力没有全开 + GPU,上传 ...