网址:https://www.elastic.co
192.168.14.239 es-node1
192.168.14.240 es-node2
192.168.14.241 es-node3
=====> 初始化
① 关闭防火墙、selinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g'  /etc/selinux/config
setenforce 0
systemctl stop firewalld
systemctl disable firewalld
② 修改系统最大打开文件数和进程数
cat <<EOF >> /etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 2048
* hard nproc 4096
EOF
echo vm.max_map_count=655360 >> /etc/sysctl.conf
sysctl -p
③ 配置主机名及互信
cat <<EOF >> /etc/hosts
192.168.14.239 es-node1
192.168.14.240 es-node2
192.168.14.241 es-node3
EOF
hostname es-node1
hostnamectl set-hostname es-node1
ssh-keygen
ssh-copy-id es-node1
ssh-copy-id es-node2
ssh-copy-id es-node3
④ 配置yum源
yum -y install wget vim
cd /etc/yum.repos.d/
mkdir backup
mv *.repo backup
# 阿里云yun源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache
# epel源
yum -y install epel-release      
yum clean all
yum makecache
# elk源
cat <<EOF > /etc/yum.repos.d/elk.repo
[elk]
name=elk
baseurl=https://mirrors.tuna.tsinghua.edu.cn/elasticstack/yum/elastic-6.x/
enable=1
gpgcheck=0
EOF
⑤ 源码安装java
mkdir -p /data/apps/
tar -xf jdk-8u11-linux-x64.tar.gz
mv jdk1.8.0_11/ jdk
cat <<EOF > /etc/profile.d/jdk.sh
JAVA_HOME=/data/apps/jdk
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH PATH
EOF
source /etc/profile
=====> 安装elasticsearch
① 下载
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.3.1-linux-x86_64.tar.gz
tar -xf elasticsearch-7.3.1-linux-x86_64.tar.gz
mv elasticsearch-7.3.1 /data/apps/elasticsearch
cd /data/apps
useradd es
chown -R es.es elasticsearch
su - es
mkdir -pv /home/es/{data,logs}/elastic
② 配置
cd elasticsearch
vim config/elasticsearch.yml     
cluster.name: bigdata      # 集群名称 
node.name: node-1       # 节点名称 
path.data: /home/es/data/elastic   # es索引库的数据存储目录
path.logs: /home/es/logs/elastic   # es进程启动后,对应的日志信息存放目录 
network.host: 0.0.0.0
# 允许跨域请求
http.cors.enabled: true   
http.cors.allow-origin: "*"
http.cors.allow-credentials: true
#discovery.seed_hosts: ["node-1"]
cluster.initial_master_nodes: ["es-node1"]
transport.tcp.port: 9300                 # 节点间交互的tcp端口,默认9300
discovery.zen.minimum_master_nodes: 2    # 防脑裂,集群中至少又2台节点可用,否则集群就瘫痪。计算公式: 节点数/2+1
discovery.zen.ping.unicast.hosts: ['es-node1','es-node2','es-node3'] #
#Running as a daemon
./bin/elasticsearch -d -p pid_file
# shut down Elasticsearch
pkill -F pid_file 
# Checking that Elaelasticsearch is running
curl -XGET 'http://127.0.0.1:9200'
====> ES-Head Plugin 方便对ES进行各种操作的客户端工具
https://github.com/mobz/elasticsearch-head
*** 插件不能安装在es的plugin目录下
git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head
yum -y install nodejs npm
npm init -f   # 解决 npm WARN enoent ENOENT: no such file or directory, open '/soft/elasticsearch/plugins/package.json'
npm install -g grunt-cli
npm install grunt --save
npm install grunt-contrib-clean
npm install grunt-contrib-concat
npm install grunt-contrib-watch
npm install grunt-contrib-connect
npm install grunt-contrib-copy
npm install phantomjs-prebuilt@2.1.14 --ignore-scripts
npm install grunt-contrib-jasmine
# elasticsearch-head 目录下的 Gruntfile.js 文件,在 options 属性内增加 hostname,设置为 0.0.0.0
connect: {
    server: {
        options: {
            hostname: '0.0.0.0',
            port: 9100,
            base: '.',
            keepalive: true
        }
    }
}
# 修改elasticsearch-head/_site/app.js
this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://node-1:9200";
# 启动elasticsearch-head
nohup grunt server > /dev/null 2>&1 &
# 屏启
yum -y install screen
screen -S es-head
grunt server
# 访问
http://localhost:9100/
====> BigDesk Plugin 实时状态监控(jvm、linux、elasticsearch的情况)
https://github.com/lukas-vlcek/bigdesk
mkdir elasticsearch/plugins/bigdesk/_site
unzip bigdesk-master.zip -C plugin/bigdesk/_site
mv plugin/bigdesk/_site/bigdesk-master/* plugins/bigdesk/_site
cd plugin/bigdesk
cat <<EOF > plugin-descriptor.properties
description=bigdesk
version=master
site=true
name=bigdesk
EOF
cd elasticsearch/plugins/bigdesk/_site/js/store
vim  BigdeskStore.js
return (major == 1 && minor >= 0 && maintenance >= 0 && (build != 'Beta1' || build != 'Beta2'));
-->>
return (minor >= 0 && maintenance >= 0 && (build != 'Beta1' || build != 'Beta2'));
#python -m SimpleHTTPServer
nohup python -m SimpleHTTPServer > /dev/null 2>&1 &
#nohup python -m SimpleHTTPServer 8888 > /dev/null 2>&1 &
https://ip:9200/_plugin/bigdesk/
 
====> kibana Plugin 读取es集群中索引库的type信息,并使用可视化的方式呈现

wget https://artifacts.elastic.co/downloads/kibana/kibana-7.3.2-linux-x86_64.tar.gz
shasum -a 512 kibana-7.3.2-linux-x86_64.tar.gz
tar -xzf kibana-7.3.2-linux-x86_64.tar.gz
mv kibana-7.3.2-linux-x86_64 kibana
mv kibana /data/apps/es-plugin
cd /data/apps/es-plugin/kibana
vim $kibana/config/kibana.yml
server.port: 5601                                //监听端口
server.host: "192.168.14.239"                      //监听IP地址,建议内网ip
elasticsearch.url: "http://192.168.14.239:9200"    //elasticsearch连接kibana的URL,也可以填写192.168.1.32,因为它们是一个集群
useradd -s /sbin/nologin kibana
chown -R kibana.kibana kibana
su - kibana
./bin/kibana
192.168.14.239:5601   # 访问
 
=====> logstash 收集日志文件内容
#vim /etc/logstash/conf.d/system.conf
input {
        file {
                path => "/var/log/messages"                     //日志路径
                type => "system"                                //定义类型
                start_position => "beginning"                   //表示logstash从头开始读取文件内容
                stat_interval => "2"                            //logstash每隔多久检查一次被监听文件状态(是否有更新),默认是1秒
        }
}
output {
        elasticsearch {
                hosts => ["192.168.1.31"]                       //指定hosts
                index => "systemlog-%{+YYYY.MM.dd}"             //指定索引名称
                }
}

elasticsearch7.x集群安装(含head、bigdesk、kibana插件)的更多相关文章

  1. docker安装Elasticsearch7.6集群并设置密码

    docker安装Elasticsearch7.6集群并设置密码 Elasticsearch从6.8开始, 允许免费用户使用X-Pack的安全功能, 以前安装es都是裸奔.接下来记录配置安全认证的方法. ...

  2. hadoop-2.6.0.tar.gz的集群搭建(3节点)(不含zookeeper集群安装)

    前言 本人呕心沥血所写,经过好一段时间反复锤炼和整理修改.感谢所参考的博友们!同时,欢迎前来查阅赏脸的博友们收藏和转载,附上本人的链接http://www.cnblogs.com/zlslch/p/5 ...

  3. Hadoop 2.8集群安装及配置记录

    第一部分:环境配置(含操作系统.防火墙.SSH.JAVA安装等) Hadoop 2.8集群安装模拟环境为: 主机:Hostname:Hadoop-host,IP:10.10.11.225 节点1:Ho ...

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

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

  5. Spring集成Redis集群(含spring集成redis代码)

    代码地址如下:http://www.demodashi.com/demo/11458.html 一.准备工作 安装 Redis 集群 安装参考: http://blog.csdn.net/zk6738 ...

  6. 批量搞机(二):分布式ELK平台、Elasticsearch介绍、Elasticsearch集群安装、ES 插件的安装与使用

    一.分布式ELK平台 ELK的介绍: ELK 是什么? Sina.饿了么.携程.华为.美团.freewheel.畅捷通 .新浪微博.大讲台.魅族.IBM...... 这些公司都在使用 ELK!ELK! ...

  7. 【Oracle 集群】Oracle 11G RAC教程之集群安装(七)

    Oracle 11G RAC集群安装(七) 概述:写下本文档的初衷和动力,来源于上篇的<oracle基本操作手册>.oracle基本操作手册是作者研一假期对oracle基础知识学习的汇总. ...

  8. kafka集群安装部署

    kafka集群安装 使用的版本 系统:centos6.5 centos6.7 jdk:1.7.0_79 zookeeper:3.4.9 kafka:2.10-0.10.1.0 一.环境准备[只列,不具 ...

  9. CentOS下Hadoop-2.2.0集群安装配置

    对于一个刚开始学习Spark的人来说,当然首先需要把环境搭建好,再跑几个例子,目前比较流行的部署是Spark On Yarn,作为新手,我觉得有必要走一遍Hadoop的集群安装配置,而不仅仅停留在本地 ...

随机推荐

  1. Python中的数据类型、变量、字符编码、输入输出、注释

    数据类型 number(数字) 用于存储类型,通常分为int.long.float.complex: int:32位机器上占32位,取值范围为-231 ~ 231 - 1:64位机器上占64位,取值范 ...

  2. spring session cpu占用过高

      集成spring session很简单,只需几行代码即可. @Configuration @EnableRedisHttpSession public class SessionConfig { ...

  3. jQuery无缝轮播图思路详解-唯品会

    效果图如上: 需求:图片自动轮播,鼠标移上停止播放,离开恢复播放,箭头切换图片. html代码 <!--轮播图大盒子开始--> <div class="wrap" ...

  4. js指定日期时间加一天 ,判断指定时间是否为周末

    function dateAdd(startDate) { startDate = new Date(startDate); startDate = +startDate + ***; startDa ...

  5. Sql 脚本文件太大 还原数据库

    sql脚本太大直接在数据库中执行会提示内存不足,我们看生成的脚本文件会发现每隔100条会有一个GO来分隔,这就好说了 在我将数据库的结构连同数据生成一个脚本文件db.sql 后,想在另外的电脑上恢复数 ...

  6. wbSocket

    <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...

  7. 2019年北航OO第4单元(UML)总结

    1 架构设计 经过了接近一学期的程序设计训练,在这一单元的第一次作业中我就非常注重架构的设计,竭力避免像之前一样陷入"第一次作业凑合,第二次作业重构"的不健康的迭代模式.整体上来说 ...

  8. 将H5页面打包成安卓原生app

    第一步:下载HBuilderX,新建项目选择5+App新建一个空项目如下图 新建后项目目录结构如下图 第二步,将你要打包成安卓app的文件打包,最后生成的文件目录如下图 1.打包完成后,将对应文件内容 ...

  9. 使用ngspice进行电路仿真

    电路spice仿真工具已经比较成熟,开源的免费工具也有不错的性能.使用ngspice可以得到不错的仿真结果. 在Linux系统上,例如写一个RLC谐振的电路: RLCV1 1 0 AC 1V L 1 ...

  10. 常见SVN图标的含义

    转自:https://www.cnblogs.com/genhaosan/articles/5129791.html 灰色向右箭头:本地修改过 蓝色向左箭头:SVN上修改过 灰色向右且中间有个加号的箭 ...