ELK升级后,安装稍微发生了点变化,在Elasticsearch中增加了很多资源上的限制,其他的倒是没什么变化。不过所有的安装都是基于JDK已经安装完的情况,且为1.8版本。

安装Elasticsearch

在官网下载elsaticsearch安装包:

下载地址

下载对应版本拷贝到服务器,然后执行下面命令解压缩:

tar -zxvf elasticsearch-5.2.2.tar.gz

解压后进入对应的目录,修改配置文件:

cluster.name: page-cluster
node.name: node-104
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
network.host: 0.0.0.0
http.port: 9200
discovery.zen.ping.unicast.hosts: ["other ip"]

其中bootstrap相关是为了解决一个报错:

ERROR: bootstrap checks failed
system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

修改参数vi /etc/sysctl.conf

fs.file-max=65536
vm.max_map_count=262144

然后执行命令sysctl -p

修改系统参数vi /etc/security/limits.conf:

*               soft    nofile          65536
* hard nofile 65536
* soft nproc 65536
* hard nproc 65536

修改参数vi /etc/security/limits.d/90-nproc.conf

* soft nproc 1024
#修改为
* soft nproc 2048

然后进入bin目录,切换新账户执行ulimit -u 2048,执行./elasticsearch

看到下面输出信息:

[2017-03-20T11:25:00,031][INFO ][o.e.n.Node               ] [node-104] initializing ...
[2017-03-20T11:25:00,172][INFO ][o.e.e.NodeEnvironment ] [node-104] using [1] data paths, mounts [[/ (/dev/sda3)]], net usable_space [1.4tb], net total_space [1.7tb], spins? [possibly], types [ext4]
[2017-03-20T11:25:00,173][INFO ][o.e.e.NodeEnvironment ] [node-104] heap size [1.9gb], compressed ordinary object pointers [true]
[2017-03-20T11:25:00,174][INFO ][o.e.n.Node ] [node-104] node name [node-104], node ID [T8UBB8IMT96Gh4bJx9u7ww]
[2017-03-20T11:25:00,176][INFO ][o.e.n.Node ] [node-104] version[5.2.2], pid[30823], build[f9d9b74/2017-02-24T17:26:45.835Z], OS[Linux/2.6.32-642.11.1.el6.x86_64/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_65/25.65-b01]
[2017-03-20T11:25:00,974][INFO ][o.e.p.PluginsService ] [node-104] loaded module [aggs-matrix-stats]
[2017-03-20T11:25:00,975][INFO ][o.e.p.PluginsService ] [node-104] loaded module [ingest-common]
[2017-03-20T11:25:00,975][INFO ][o.e.p.PluginsService ] [node-104] loaded module [lang-expression]
[2017-03-20T11:25:00,975][INFO ][o.e.p.PluginsService ] [node-104] loaded module [lang-groovy]
[2017-03-20T11:25:00,975][INFO ][o.e.p.PluginsService ] [node-104] loaded module [lang-mustache]
[2017-03-20T11:25:00,975][INFO ][o.e.p.PluginsService ] [node-104] loaded module [lang-painless]
[2017-03-20T11:25:00,975][INFO ][o.e.p.PluginsService ] [node-104] loaded module [percolator]
[2017-03-20T11:25:00,975][INFO ][o.e.p.PluginsService ] [node-104] loaded module [reindex]
[2017-03-20T11:25:00,976][INFO ][o.e.p.PluginsService ] [node-104] loaded module [transport-netty3]
[2017-03-20T11:25:00,976][INFO ][o.e.p.PluginsService ] [node-104] loaded module [transport-netty4]
[2017-03-20T11:25:00,976][INFO ][o.e.p.PluginsService ] [node-104] no plugins loaded
[2017-03-20T11:25:02,888][INFO ][o.e.n.Node ] [node-104] initialized
[2017-03-20T11:25:02,888][INFO ][o.e.n.Node ] [node-104] starting ...
[2017-03-20T11:25:03,084][INFO ][o.e.t.TransportService ] [node-104] publish_address {10.10.5.104:9300}, bound_addresses {[::]:9300}
[2017-03-20T11:25:03,090][INFO ][o.e.b.BootstrapChecks ] [node-104] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
[2017-03-20T11:25:06,136][INFO ][o.e.c.s.ClusterService ] [node-104] new_master {node-104}{T8UBB8IMT96Gh4bJx9u7ww}{An_WWH5xTYWUAZ-mXid5JQ}{10.10.5.104}{10.10.5.104:9300}, reason: zen-disco-elected-as-master ([0] nodes joined)
[2017-03-20T11:25:06,154][INFO ][o.e.h.HttpServer ] [node-104] publish_address {1.1.1.1:9200}, bound_addresses {[::]:9200}
[2017-03-20T11:25:06,154][INFO ][o.e.n.Node ] [node-104] started
[2017-03-20T11:25:06,229][INFO ][o.e.g.GatewayService ] [node-104] recovered [0] indices into cluster_state
^C[2017-03-20T11:28:30,939][INFO ][o.e.n.Node ] [node-104] stopping ...
[2017-03-20T11:28:30,977][INFO ][o.e.n.Node ] [node-104] stopped
[2017-03-20T11:28:30,977][INFO ][o.e.n.Node ] [node-104] closing ...
[2017-03-20T11:28:30,987][INFO ][o.e.n.Node ] [node-104] closed

访问对应的地址:http://1.2.3.4:9200/

看到下面的信息,就正常了:

{
"name": "node-104",
"cluster_name": "page-cluster",
"cluster_uuid": "jZsQmqpUSbS_Hwv-NcGWsg",
"version": {
"number": "5.2.2",
"build_hash": "f9d9b74",
"build_date": "2017-02-24T17:26:45.835Z",
"build_snapshot": false,
"lucene_version": "6.4.1"
},
"tagline": "You Know, for Search"
}

安装Kibana

去官网下载Kibana安装包,下载地址

解压缩后,修改配置文件vi kibana.yml

server.host: 0.0.0.0

运行./bin/kibana,看到输出:

[hdfs@localnode4 bin]$ ./kibana
log [05:22:04.137] [info][status][plugin:kibana@5.2.2] Status changed from uninitialized to green - Ready
log [05:22:04.224] [info][status][plugin:elasticsearch@5.2.2] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [05:22:04.254] [info][status][plugin:console@5.2.2] Status changed from uninitialized to green - Ready
log [05:22:04.476] [info][status][plugin:timelion@5.2.2] Status changed from uninitialized to green - Ready
log [05:22:04.480] [info][listening] Server running at http://0.0.0.0:5601
log [05:22:04.482] [info][status][ui settings] Status changed from uninitialized to yellow - Elasticsearch plugin is yellow
log [05:22:09.490] [info][status][plugin:elasticsearch@5.2.2] Status changed from yellow to yellow - No existing Kibana index found
log [05:22:10.331] [info][status][plugin:elasticsearch@5.2.2] Status changed from yellow to green - Kibana index ready
log [05:22:10.331] [info][status][ui settings] Status changed from yellow to green - Ready

然后访问对应的页面即可:1.1.1.1:5601

安装logstash

Logstash我用的wondows版本,下载后解压就可以用。下载地址

logstash_home/bin目录下创建logstash.conf文件,内容如下:

input {
stdin{}
}
output {
stdout{codec=>rubydebug}
}

然后执行下面的命令logstash.bat -f logstash.conf:

C:\Users\xx\Documents\workspace\elk\logstash-5.2.2\bin>logstash.bat -f logstash.conf
Could not find log4j2 configuration at path /Users/xinghailong/Documents/workspace/elk/logstash-5.2.2/config/log4j2.properties. Using default config which logs to console
09:10:25.692 [[main]-pipeline-manager] INFO logstash.pipeline - Starting pipeline {"id"=>"main", "pipeline.workers"=>4, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>500}
09:10:25.758 [[main]-pipeline-manager] INFO logstash.pipeline - Pipeline main started
The stdin plugin is now waiting for input:
09:10:26.229 [Api Webserver] INFO logstash.agent - Successfully started Logstash API endpoint {:port=>9600}
test
{
"@timestamp" => 2017-03-20T06:31:49.209Z,
"@version" => "1",
"host" => "DESKTOP-JB5HET6",
"message" => "test\r"
}
success
{
"@timestamp" => 2017-03-20T06:31:54.481Z,
"@version" => "1",
"host" => "DESKTOP-JB5HET6",
"message" => "success\r"
}

ELK5.0安装教程的更多相关文章

  1. Windows环境下Android Studio v1.0安装教程

    Windows环境下Android Studio v1.0安装教程 准备工具 JDK安装包. 要求:JDK 7以及以上版本. Android Studio安装文件. Windows: exe(包含SD ...

  2. 【转】Windows环境下Android Studio v1.0安装教程

    原文网址:http://ask.android-studio.org/?/article/9 http://android-studio.org/index.php/docs/experience/1 ...

  3. Adobe After Effects 2017-14.0安装教程

    Adobe After Effects 2017-14.0安装教程 第一步:首先请将电脑的网络断开,很简单:禁用本地连接或者拔掉网线,这样就可以免除登录Creative Cloud帐号,安装更方便快捷 ...

  4. creo5.0安装教程(图文详解)

    PTC公司最近发布了Creo 5.0正式版 ,作为最具其革命性的新一代产品设计软件,其所提供专业的二维和三维设计设计,能帮助企业和公司进行产品生命周期管理(PLM)和制定服务管理解决方案.Creo5. ...

  5. Greenplum5.16.0 安装教程

    Greenplum5.16.0 安装教程 一.环境说明 1.1官方网站 Greenplum官方安装说明:https://gpdb.docs.pivotal.io/5160/install_guide/ ...

  6. Adobe Audition CC 2017 (10.0)安装教程

    Adobe Audition CC 2017 (10.0)安装教程 注:下载地址在文章末尾 第一步:首先请将电脑的网络断开,很简单:禁用本地连接或者拔掉网线,这样就可以免除登录Creative Clo ...

  7. Adobe Photoshop CC 2017-18.0安装教程

    Adobe Photoshop CC 2017-18.0安装教程 注:下载链接在文章后面 第一步:首先请将电脑的网络断开,很简单:禁用本地连接或者拔掉网线,这样就可以免除登录Creative Clou ...

  8. [转]Tomcat9.0安装教程 Tomcat9.0环境变量配置教程

    [转]Tomcat9.0安装教程 Tomcat9.0环境变量配置教程 [转]超详细MySQL安装及基本使用教程

  9. Android笔记——Windows环境下Android Studio v1.0安装教程

    本文主要讲解Windows环境下Android Studio的安装教程,Mac的Android Studio安装与此类似不在赘述,另外友情提示Windows下的SDK与Mac的SDK是通用的,可以直接 ...

随机推荐

  1. Unity随手记

    过年11天假期,带娃带了7天,吃吃喝喝.也看了点书,<射雕英雄传>(书)看了一半,还有就是在看<unity官方案例精讲>这本. 随手记一些自觉有价值或者有意思的点. 1. 对脚 ...

  2. MyEclipse-Initializing Java Tooling问题

    问题描述: 今天早上打开Eclipse,打开Package Explorer 中项目时,总出现卡死现象. MyEclipse状态栏显示两个任务,(1) Checking for Updates (2) ...

  3. Easy单例模式

    在学习单例模式前,不妨问自己几个问题:单例模式是怎么来的,单例模式怎么去用? 单例模式是怎么来的? 这就从设计模式起源开始,他是在实际实践中遇到类似情况可以通用经验所得到的总结,一般在其他模块或者方法 ...

  4. Oracle instant client在windows下的安装和使用

    安装 * 从oracle官方网站下载instant client文件,一般来说,有basic.sqlplus.odbc.jdbc,就足够用的了: instantclient-basic-win32-1 ...

  5. 将apache的prefork改成worker

    1. 检测apache正在使用哪个MPM? XXX@XXX-ThinkPad-Edge-E431:~$ apachectl -V | grep -i mpm Server MPM: prefork 2 ...

  6. Java编程风格学习(二)

    二.格式规范 在上一篇的Java编程风格学习(一)中我们讲述了在Java编码中的一般原则,虽然这些原则并不涉及具体的代码规范,但是这些原则却是我们在Java开发过程中所应该遵循的规范与思想.今天我们将 ...

  7. [Kafka] - Kafka基本操作命令

    Kafka支持的基本命令位于${KAFKA_HOME}/bin文件夹中,主要是kafka-topics.sh命令:Kafka命令参考页面: kafka-0.8.x-帮助文档  -1. 查看帮助信息 b ...

  8. Angular.js之内置过滤器学习笔记

    <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...

  9. Xcode的中常用到的快捷键,印象笔记中常用到的快捷键

    Xcode提供了很多快捷键,灵活使用快捷键可以提升开发效率.但对于初学者来说,一次性的去记住并掌握如此多的快捷键显然是不现实的,本文就是来帮助大家了解在iOS开发过程中,使用最频繁的一些快捷键. 1. ...

  10. angular : direative :comunication 指令之间的通讯

    在网络上可以找到多种指令之间的通讯 · $on,$emit,$boardcast (向上或向下冒泡) · 指令return的required (^)向上一个scope通讯,前提要先给scope一个na ...