软件包下载地址: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的更多相关文章

  1. centos下安装最新版本git(通过master分支下载最新版)

    centos6.7下安装最新版本git 本文参考:http://www.01happy.com/centos-install-latest-git/ 按照原博主所提供的思路安装可能会出现下列问题 解决 ...

  2. 【教程】CentOS 7安装 最新版本Docker

    博主最近需要安装Docker,步骤如下: Docker安装官方地址:https://docs.docker.com/install/linux/docker-ce/centos/ 以下命令都是在roo ...

  3. 如何在CentOS 7中安装最新Git(源码安装)

    如何在CentOS 7中安装最新Git 2017年05月20日 11:49:53 阅读数:1624 Git是在今天的软件开发行业一个非常有用的版本控制工具.我一直使用Git.于是为Linux公社的读者 ...

  4. 如何安装最新版本的memcached

    转载自孟叔的博客:  https://learndevops.cn/index.php/2016/06/10/how-to-install-the-latest-version-of-memcache ...

  5. Cacti中文版在Centos上的安装

    最近老有人问Cacti中文版在哪下载啊怎么安装啊,我在这里一遍给大家讲解了:Cacti中文版在Centos上的安装 1.基本安装 cacti是运作在apache+php+mysql+net-snmp工 ...

  6. ubuntu14.04下配置Java环境以及安装最新版本的eclipse

    首先是配置JDK 步骤一:下载最新版本的JDK,链接:http://www.oracle.com/technetwork/java/javase/downloads/index.html 步骤二:首先 ...

  7. angular4.0 安装最新版本的nodejs、npm、@angular/cli的方法

    在使用ng项目的ui框架时,比如ng-zorro.angular Material,需要安装最新版本的@angular/cli: 配置ng-zorro框架 ng-zorro官网:https://ng. ...

  8. Windows7 64位安装最新版本MySQL服务器

    Windows7 64位安装最新版本MySQL服务器 近期,一直在研究MySQL数据库,经常修改配置文件,导致MySQL数据库无法使用,不得不反复重装MySQL数据库.以下是在Windows7 64位 ...

  9. 【工具相关】ionic-通过nmp安装最新版本的 cordova 和 ionic

    一,命令行下输入: sudo npm install -g cordova ionic 用来安装最新版本的cordova和ionic. 如下图所示: 二,等待一下,如下图所示. 三,用命令 npm u ...

随机推荐

  1. [poj3450]Corporate Identity(后缀数组)

    题意:多个字符串的最长公共子串. 解题关键:字符串的任何一个子串都是这个字符串的某个后缀的前缀.求A和B的最长公共子串等价于求A的后缀和B的后缀的最长公共前缀的最大值. 后缀数组的经典例题,连接在一起 ...

  2. 在MongoDB中修改数据类型

    引言 本文主要讲解Mongodb的类型转换.包括:string转double, string转int, string转Date. 0. 出现类型不一致的原因 ES导入数据到Mongo后,会出现类型统一 ...

  3. 使用WSAIoctl获取AcceptEx函数指针 [转]

    Winsock2的其他供应商不一定会实现AcceptEx函数.同样情况也包括的其他Microsoft的特定APIs如TransmitFile,GetAcceptExSockAddrs以及其他Micro ...

  4. HeapCreate

    为进程创建新堆,请求分配虚拟内存分页,函数原型如下: HANDLE HeapCreate( DWORD flOptions, SIZE_T dwInitialSize, SIZE_T dwMaximu ...

  5. iOS三方支付--微信支付/支付宝支付

    一.微信支付 1.注册账号并申请app支付功能 公司需要到微信开放品台进行申请app支付功能 , 获得appid和微信支付商户号(mch_id)和API秘钥(key) . Appsecret(secr ...

  6. Golang : cobra 包简介

    Cobra 是一个 Golang 包,它提供了简单的接口来创建命令行程序.同时,Cobra 也是一个应用程序,用来生成应用框架,从而开发以 Cobra 为基础的应用.本文的演示环境为 ubuntu 1 ...

  7. 修改mac host文件绑定域名

    打开终端在终端terminal中输入 sudo vi /etc/hosts 上一步输入完成之后按enter回车键,如果当前用户账号有密码,则在按完之后会提示输入密码,此时输入当前账户密码后继续按ert ...

  8. SpringMVC基础配置及使用

    SpringMVC基础配置及使用 SpringMVC:1.SpringMVC和Spring的关系:    软件开发的三层架构: web层[表示层.表现层]---->Service层----> ...

  9. uoj#335. 【清华集训2017】生成树计数(prufer序列+生成函数+多项式)

    传送门 好神仙的题目--又一次有了做一题学一堆的美好体验 据说本题有第二类斯特林数+分治\(FFT\)的做法,然而咱实在看不懂写的是啥,题解贴这里,有兴趣的可以自己去瞅瞅,看懂了记得回来跟咱讲讲 前置 ...

  10. shell常用正则表达式

    转载自: http://www.cnblogs.com/linhaifeng/p/6596660.html 和 http://www.blogjava.net/jasmine214--love/arc ...