操作系统:

centos版本 7.4
防火墙 关闭
selinux 关闭
elasticsearch版本 6.3.2
java版本 1.8
server1 192.168.10.126
server2 192.168.10.127

[root@server1 ~]# wget -c https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.2.tar.gz

[root@server1 ~]# tar zxf elasticsearch-6.3.2.tar.gz -C /usr/local/

[root@server1 ~]# yum -y install java

[root@server1 ~]# vim /etc/hosts

192.168.10.126 server1

192.168.10.127 server2

192.168.10.128 server3

[root@server1 ~]# vim /etc/profile

export ELASTICSEARCH_HOME=/usr/local/elasticsearch-6.3.2

export PATH=$ELASTICSEARCH_HOME/bin:$PATH

[root@server1 ~]# source /etc/profile

[root@server1 ~]# useradd elasticsearch

[root@server1 ~]# chown elasticsearch.elasticsearch /usr/local/elasticsearch-6.3.2/ -R

[root@server1 ~]# vim /etc/security/limits.conf

#最大用户进程数

* soft nproc 20480

* hard nproc 20480

#调整进程最大打开文件描述符

* soft nofile 65536

* hard nofile 65536

#最大锁定内存地址空间

* soft memlock unlimited

* hard memlock unlimited

[root@server1 ~]# vim /etc/sysctl.conf

#配置系统最大打开文件描述符

fs.file-max=655360

#限制一个Java线程数量,进程可以拥有的VMA(虚拟内存区域)的大小

vm.max_map_count = 262144

[root@server1 ~]# vim /etc/security/limits.d/20-nproc.conf

* soft nproc 4096

#root soft nproc unlimited

* soft nproc 20480

[root@server1 ~]# vim /usr/local/elasticsearch-6.3.2/config/jvm.options

#设置java内存资源使用为物理内存的一半

-Xms1g

-Xmx1g

[root@server1 ~]# vim /usr/local/elasticsearch-6.3.2/config/elasticsearch.yml

#集群名称

cluster.name: esbigdata

#节点名

node.name: server1

#指定该节点是否有资格被选举为主,默认为true

node.master: true

#指定该节点是否存储索引数据

node.data: true

#设置索引数据的存储路径

path.data: /data/elasticsearch

#设置日志文件存储路径

path.logs: /usr/local/elasticsearch-6.3.2/logs

#设置为true用来锁住物理内存

bootstrap.memory_lock: true

#设置提供服务的ip地址

network.host: 0.0.0.0

#设置提供服务的http端口

http.port: 9200

#设置集群中最少的主节点数,默认为1

discovery.zen.minimum_master_nodes: 1

#设置集群中master节点的初始列表,master节点初始列表中对应的端口时9300,即为集群交互通信端口

discovery.zen.ping.unicast.hosts: ["192.168.10.126:9300", "192.168.10.127:9300"]

[root@server1 ~]# sysctl -p

[root@server1 ~]# mkdir -p /data/elasticsearch

[root@server1 ~]# chmod 755 /data/elasticsearch

[root@server1 ~]# chmod 755 /data/elasticsearch -R

[root@server1 ~]# chown elasticsearch.elasticsearch -R /data/elasticsearch

[root@server1 ~]# su - elasticsearch

[elasticsearch@server1 ~]$ cd /usr/local/elasticsearch-6.3.2/bin/

#切换到elasticsearch用户启动服务,-d放到后台运行

[elasticsearch@server1 bin]$ elasticsearch -d

[root@server1 ~]# curl http://192.168.10.126:9200

#############################################################################

[root@server2 ~]# tar zxf elasticsearch-6.3.2.tar.gz -C /usr/local/

[root@server2 ~]# vim /etc/profile

export ELASTICSEARCH_HOME=/usr/local/elasticsearch-6.3.2

export PATH=$ELASTICSEARCH_HOME/bin:$PATH

[root@server2 ~]# source /etc/profile

[root@server2 ~]# vim /etc/hosts

192.168.10.126 server1

192.168.10.127 server2

192.168.10.128 server3

[root@server2 ~]# useradd elasticsearch

[root@server2 ~]# chown elasticsearch.elasticsearch /usr/local/elasticsearch-6.3.2/ -R

[root@server2 ~]# vim /etc/security/limits.conf

* soft nproc 20480

* hard nproc 20480

* soft nofile 65536

* hard nofile 65536

* soft memlock unlimited

* hard memlock unlimited

[root@server2 ~]# vim /etc/sysctl.conf

fs.file-max=655360

vm.max_map_count = 262144

[root@server2 ~]# vim /usr/local/elasticsearch-6.3.2/config/elasticsearch.yml

cluster.name: esbigdata

node.name: server1

node.master: true

node.data: true

path.data: /data/elasticsearch

path.logs: /usr/local/elasticsearch-6.3.2/logs

bootstrap.memory_lock: true

network.host: 0.0.0.0

http.port: 9200

discovery.zen.minimum_master_nodes: 1

discovery.zen.ping.unicast.hosts: ["192.168.10.126:9300", "192.168.10.127:9300"]

[root@server2 ~]# mkdir -p /data/elasticsearch

[root@server2 ~]# chmod 755 /data/elasticsearch

[root@server2 ~]# chmod 755 /data/elasticsearch -R

[root@server2 ~]# chown elasticsearch.elasticsearch -R /data/elasticsearch

[root@server2 ~]# chmod 755 -R /usr/local/elasticsearch-6.3.2

[root@server2 ~]# sysctl -p

[root@server1 ~]# curl http://192.168.10.126:9200

[root@server1 ~]# yum -y install nodejs npm git

[root@server1 ~]# git clone git://github.com/mobz/elasticsearch-head.git

#修改npm的源为淘宝国内镜像点

[root@server1 ~]# npm config set registry https://registry.npm.taobao.org/

[root@server1 local]# cd /usr/local/

[root@server1 local]# npm config set registry http://registry.npm.taobao.org/

[root@server1 local]# cd /usr/local/elasticsearch-head

[root@server1 elasticsearch-head]# npm install

[root@server1 _site]# cd /usr/local/elasticsearch-head/_site

[root@server1 _site]# vim app.js

4374 this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://192.168.10.126:9200";

[root@server1 _site]# vim /usr/local/elasticsearch-6.3.2/config/elasticsearch.yml

#表示开启跨域访问支持,默认为false

http.cors.enabled: true

#表示跨域访问允许的域名地址,可以使用正则表达式,这里的*表示允许所有域名访问

http.cors.allow-origin: "\*"

[root@server1 elasticsearch-head]# npm run start

浏览器里面输入:http://192.168.10.126:9100/

ELK实战-elasticsearch安装的更多相关文章

  1. elk之elasticsearch安装

    环境: centos7 jdk8 参考: https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.htmlhttp:// ...

  2. ELK之elasticsearch安装&&kibana安装

    1.ES和Kibana安装都是开箱即用的? 解压缩就可以用 elasticsearch解压缩之后,双击下图中的elasticsearch.bat,启动,kibana也是一样 双击之后, 我们看到上图有 ...

  3. ELK日志监控平台安装部署简介--Elasticsearch安装部署

    最近由于工作需要,需要搭建一个ELK日志监控平台,本次采用Filebeat(采集数据)+Elasticsearch(建立索引)+Kibana(展示)架构,实现日志搜索展示功能. 一.安装环境描述: 1 ...

  4. elk实战分析nginx日志文档

    elk实战分析nginx日志文档 架构: kibana <--- es-cluster <--- logstash <--- filebeat 环境准备:192.168.3.1 no ...

  5. ELK之elasticsearch6安装认证模块search guard

    参考:https://www.cnblogs.com/marility/p/9392645.html 1,安装环境及软件版本 程序 版本 安装方式  elasticsearch  6.3.1  rpm ...

  6. Centos7中ELK集群安装流程

    Centos7中ELK集群安装流程   说明:三个版本必须相同,这里安装5.1版. 一.安装Elasticsearch5.1   hostnamectl set-hostname elk vim /e ...

  7. Kibana安装(图文详解)(多节点的ELK集群安装在一个节点就好)

    对于Kibana ,我们知道,是Elasticsearch/Logstash/Kibana的必不可少成员. 前提: Elasticsearch-2.4.3的下载(图文详解) Elasticsearch ...

  8. 全文搜索引擎 Elasticsearch 安装

    全文搜索引擎 Elasticsearch 安装 学习了:http://www.ruanyifeng.com/blog/2017/08/elasticsearch.html 拼音:https://www ...

  9. Filebeat-1.3.1安装和设置(图文详解)(多节点的ELK集群安装在一个节点就好)(以Console Output为例)

    前期博客 Filebeat的下载(图文讲解) 前提 Elasticsearch-2.4.3的下载(图文详解) Elasticsearch-2.4.3的单节点安装(多种方式图文详解) Elasticse ...

随机推荐

  1. 看到两道小学数学题,实在是解不动,用js写了一下

    把一个自然数的约数(除去它本身)按照从小到大的顺序写在它的左边,可以得到一个多位数,比如6的约数是1,2,3,写成一个多位数是1236,假如这个多位数中,没有直复数字,那么我们你这个多位数是唯一的.请 ...

  2. 备战省赛组队训练赛第六场(UPC)

    传送门 外来博客题解1:戳这里 外来博客题解2:戳这里 CRWG全方位题解:戳这里

  3. dotnet core 获取 MacAddress 地址方法

    本文告诉大家如何在 dotnet core 获取 Mac 地址 因为在 dotnetcore 是没有直接和硬件相关的,所以无法通过 WMI 的方法获取当前设备的 Mac 地址 但是在 dotnet c ...

  4. 服务端CURL请求

    服务端与服务端之间,也存在接口编程. 比如我们网站服务端,需要发送短信.发送邮件.查询快递等,都需要调用第三方平台的接口. 1.php中发送请求 ①file_get_contents函数 :传递完整的 ...

  5. com.netflix.discovery.DiscoveryClient : Completed shut down of DiscoveryClient

    启动报错:com.netflix.discovery.DiscoveryClient    : Completed shut down of DiscoveryClient 解决方案: 添加web主件 ...

  6. 用Qt写的简单屏保程序

    近日老大提别人家产品都有屏保程序,貌似我们也该有,简单在qtcn.org请教了一下,写了个小程序! 晕倒,半天没找到上传功能!我已经上传到qtcn上了,地址如下: http://www.qtcn.or ...

  7. AS优化

    第一步:打开AS安装所在的位置,用记事本打开“红色框”选中的文件. 如图: 第二步:打开“studio64.exe.vmoptions”文件后修改里面的值,修改后如下: 1 2 3 4 5 6 7 8 ...

  8. 看各类框架源码淘来的一些JavaScript技巧

    1. 创建定长的JavaScript数组,并赋空值: 出自VUE文档Render函数讲解 // 创建定长20的JavaScript数组,并把每个项的值设为null Array.apply(null, ...

  9. DOCKER学习_007:Docker的套接字介绍

    根据https://www.cnblogs.com/zyxnhr/p/11825331.html这个文章,已经可以正常安装一个docker服务 查看Docker状态 [root@docker-serv ...

  10. 解决vs2017创建.net core失败以及不能登录问题

    创建.net core web 提示值不能为空,开始以为是vs安装错误,重新安装了一遍也是这样,之前都好好的,然后登录也不行了(提示我们无法刷新此账号的凭据),百度了下,是ie不能上网的问题.解决了登 ...