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 ...
随机推荐
- xgene:之ROC曲线、ctDNA、small-RNA seq、甲基化seq、单细胞DNA, mRNA
灵敏度高 == 假阴性率低,即漏检率低,即有病人却没有发现出来的概率低. 用于判断:有一部分人患有一种疾病,某种检验方法可以在人群中检出多少个病人来. 特异性高 == 假阳性率低,即错把健康判定为病人 ...
- idea+tomcat 解决 debug超级慢 问题
最近在用intellij idea 开发程序,发现debug的时候启动得特别慢,正常run的时候启动的特别快,相差30多倍. 方法断点会戏剧性的降低debug的速度.当时并没有在意,因为并不清晰这个方 ...
- NOIP2015提高组 跳石头 ACM-ICPC2017香港 E(选择/移除+二分答案)
跳石头 题目背景 一年一度的“跳石头”比赛又要开始了! 题目描述 这项比赛将在一条笔直的河道中进行,河道中分布着一些巨大岩石.组委会已经选择好了两块岩石作为比赛起点和终点.在起点和终点之间,有 NN ...
- HDU - 5001 Walk(概率dp+记忆化搜索)
Walk I used to think I could be anything, but now I know that I couldn't do anything. So I started t ...
- FZU - 2214 Knapsack problem 01背包逆思维
Knapsack problem Given a set of n items, each with a weight w[i] and a value v[i], determine a way t ...
- SqlServer2012——多表连接查询
1.基本连接 select A.姓名,A.性别,B.班级名,B.家庭住址 From 学生信息 A,班级信息 B where A.所属班级=B.班级编号 --把A表与B表连接起来 2.内连接 --内连接 ...
- mock测试方法及实践改进
此文已由作者翟曜授权网易云社区发布. 欢迎访问网易云社区,了解更多网易技术产品运营经验. mock测试常见的定义为:在测试过程中,对于某些不易构造或不易获取的对象,通过创建虚拟对象的方式来模拟测试的测 ...
- ue4 retarge记录
动画重定位(相同骨骼) https://docs.unrealengine.com/latest/CHN/Engine/Animation/AnimationRetargeting/index.htm ...
- React `controlled` 及 `uncontrolled` 组件
通过 props 来设置其 value 值的组件便是一种 controlled 组件.典型的 form 表单中,像 输入框 <input> 下拉框 <select> 多选框 & ...
- JVM 内存分析
简述JVM垃圾回收机制 垃圾回收机制时Java提供的自动释放内存空间的机制. 垃圾回收机制时JVM自导的一个线程,用于回收没有被引用的对象. JVM有一个运行时的数据区来管理内存.其主要包括五大部分: ...