一、最小化安装centos7.6

cat /etc/redhat-release

二、配置网络,可以上外网

三、安装常用命令工具,修改系统时区,校对系统时间,关闭selinux,关闭firewalld,修改主机名,修改系统文件描述符,内存锁限制及vm.max_map_count 数量(否则启动elasticsearch时报错)

1、安装常用命令工具

yum install vim net-tools bash-completion wget unzip ntp bzip2 epel-release -y

2、修改系统时区,校对系统时间

timedatectl set-timezone Asia/Shanghai

ntpdate pool.ntp.org

3、关闭selinux

vi /etc/selinux/config

4、关闭防火墙

systemctl restart firewalld.service

systemctl disable firewalld.service

5、修改主机名

vi /etc/hostname

6、修改系统文件描述符大小

vim /etc/security/limits.conf

最后添加:

* soft nofile 655360
* hard nofile 655360
* soft nproc 655360
* hard nproc 655360
* soft memlock unlimited
* hard memlock unlimited

7、修改 vm.max_map_count值

vi /etc/sysctl.conf

最后添加:

vm.max_map_count = 655360

8、重启系统使配置生效

init 6

四、安装elasticsearch

1、安装java1.8

yum install java-1.8.0-openjdk -y

设置java环境变量

vim /etc/profile

export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64
export CLASSPATH=:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
export JRE_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin

source /etc/profile

2、官网下载最新版elasticsearch

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.0.tar.gz

tar -zxf elasticsearch-6.6.0.tar.gz

mv elasticsearch-6.6.0 /opt/elasticsearch

3、添加elasticsearch用户,用来启动elasticsearch

groupadd elasticsearch

useradd elasticsearch -g elasticsearch

4、将elasticsearch目录授权给elasticsearch用户

chown -R elasticsearch:elasticsearch /opt/elasticsearch

5、修改elasticsearch配置文件

vim /opt/elasticsearch/config/elasticsearch.yml

最后添加:

cluster.name: logsearch
node.name: node-1
path.data: /opt/elasticsearch/data
path.logs: /opt/elasticsearch/logs
bootstrap.memory_lock: true
network.host: 0.0.0.0
http.port: 9200
#discovery.zen.ping.unicast.hosts: ["192.168.0.58", "192.168.0.59", "192.168.0.60"]
#discovery.zen.minimum_master_nodes: 2
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-credentials: true
http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type

6、切换到elasticsearch用户启动elasticsearch

su - elasticsearch

/opt/elasticsearch/bin/elasticsearch -d

7、用浏览器测试是否正常http://192.168.0.58:9200

五、安装elasticsearch-head插件

1、下载elasticsearch-head-master.zip包

wget https://github.com/mobz/elasticsearch-head/archive/master.zip

unzip master.zip

mv elasticsearch-head-master /opt/

2、安装node

由于head插件本质上还是一个nodejs的工程,因此需要安装node,使用npm来安装依赖的包。

wget https://nodejs.org/dist/v10.15.0/node-v10.15.0-linux-x64.tar.xz

xz -d node-v10.15.0-linux-x64.tar.xz

tar -xf node-v10.15.0-linux-x64.tar

mv node-v10.15.0-linux-x64 /opt/

添加node环境变量

vim /etc/profile

添加:

export NODE_HOME=/opt/node-v10.15.0-linux-x64
export PATH=$PATH:$NODE_HOME/bin

source /etc/profile

测试node是否安装成功

3、安装grunt(grunt是基于Node.js的项目构建工具,可以进行打包压缩、测试、执行等等工作,elasticsearch-head插件就是通过grunt启动的)

cd /opt/elasticsearch-head-master/

npm install -g grunt-cli

grunt -version测试是否安装成功

修改elasticsearch-head-master下Gruntfile.js配置文件,添加hostname: '*',

vim Gruntfile.js

更换npm源

npm install -g cnpm --registry=https://registry.npm.taobao.org

使用cnpm安装

cnpm install

安装完成后没有报错的话启动elasticsearch-head-master

grunt server &

通过浏览器测试是否正常

http://192.168.0.58:9100/

elasticsearch6.6.0安装配置及elasticsearch-head插件安装的更多相关文章

  1. jupyter notebook 安装配置使用,+目录插件安装

    1.安装 pip3 install jupyter 2.配置 2.1. 生成一个 notebook 配置文件 jupyter notebook --generate-config /root/.jup ...

  2. Elasticsearch入门教程(一):Elasticsearch及插件安装

    原文:Elasticsearch入门教程(一):Elasticsearch及插件安装 版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:h ...

  3. 阿里云服务器Linux CentOS安装配置(八)nginx安装、配置、域名绑定

    阿里云服务器Linux CentOS安装配置(八)nginx安装.配置.域名绑定 1.安装nginx yum -y install nginx 2.启动nginx service nginx star ...

  4. 阿里云服务器Linux CentOS安装配置(四)yum安装tomcat

    阿里云服务器Linux CentOS安装配置(四)yum安装tomcat 1.yum -y install tomcat  执行命令后,会帮你把jdk也安装好 2.tomcat安装目录:/var/li ...

  5. ELK 学习笔记之 elasticsearch head插件安装

    elasticsearch head插件安装: 准备工作: 安装nodejs和npm https://nodejs.org/en/download/ node-v6.11.2-linux-x64.ta ...

  6. 阿里云服务器Linux CentOS安装配置(三)yum安装mysql

    阿里云服务器Linux CentOS安装配置(三)yum安装mysql 1.执行yum安装mysql命令:yum -y install mysql-server mysql-devel 2.启动mys ...

  7. 阿里云服务器Linux CentOS安装配置(二)yum安装svn

    阿里云服务器Linux CentOS安装配置(二)yum安装svn 1.secureCRT连接服务器 2.先创建一个文件夹,用来按自己的习惯来,用来存放数据 mkdir /data 3.yum安装sv ...

  8. kibana7.x安装配置操作elasticsearch

    什么是Kibana? Kibana是一个基于Node.js的Elasticsearch索引库数据统计工具,可以利用Elasticsearch的聚合功能,生成各种图表,如柱形图,线状图,饼图等. 而且还 ...

  9. ElasticSearch head 插件安装

    head 客户端可以很方便在上面创建索引,类型,文档,还有查询,使用它管理elasticsearch 提高效率. 在安装head 客户端之前必须安装node.js 环境,因为它是用node.js 编写 ...

  10. elasticsearch介绍,安装,安装错误解决及相应插件安装

    一.elasticsearch介绍 1.简介(使用的是nosql,更新比mongodb慢): ElasticSearch是一个基于Lucene的搜索服务器.它提供了一个分布式多用户能力的全文搜索引擎, ...

随机推荐

  1. selenium-各种定位方法

    selenium各种定位方法. https://www.red-gate.com/simple-talk/wp-content/uploads/imported/1269-Locators_table ...

  2. mac层和llczi层

    1.何为数据链路层的(DATA LINK LAYER)的MAC子层和LLC子层? MAC子层的主要功能包括数据帧的封装/卸装,帧的寻址和识别,帧的接收与发送,链路的管理,帧的差 错控制等.MAC子层的 ...

  3. PyQt5 的几个核心模块作用

    QtCore  包含了核心的非GUI功能.此模块用于处理时间.文件和目录.各种数据类型.流.URL.MIME类型.线程或进程. QtGui  包含类窗口系统集成.事件处理.二维图形.基本成像.字体和文 ...

  4. [MySQL]在安装windows版MySQL时遇到过如下问题Error Nr.1045和Error.Nr.2003,相应解决办法如下

    1.准备mysql server-5.0.27.exe 2.按照指导安装,在安装到最后一步时遇到如下两个错误: 2.1.出现错误Error Nr.1045 解决办法: a).停止MySQL服务:我的电 ...

  5. js字符串String常用方法

    1.   charAt()         返回指定位置的字符. str.charAt(index) index 为必须参数,类型为number(0到str.length-1之间,否则该方法返回 空串 ...

  6. Javascript之DOM性能优化

    原文地址:http://ce.sysu.edu.cn/hope/Item/140355.aspx 作者:陈古松 来源:本站原创 发布时间:2015-03-14 更新时间:2015-03-14  点击数 ...

  7. python第三十一课--递归(3.递归的弊端)

    演示递归的弊端: def mySum(num): if num == 1: return 1 return num+mySum(num-1) mySum(998) [注意]:递归可以解决绝大多数循环能 ...

  8. WorldWind源码剖析系列:枚举类型

    PluginSDK中的枚举型主要有以下这些: public enum AltitudeMode//高度模式枚举 { ClampedToGround,//强制到地面模式 RelativeToGround ...

  9. C++之new和delete操作符

    在C语言中的动态分配和释放内存的函数是malloc calloc 和 free , 而在C++中要用 new new[] delete delete[] 来申请动态空间和释放空间. 注意:的是new. ...

  10. Android 混淆打包

    有些时候我们希望我们自己的apk包不能被别人反编译而获取自己的源代码.这就需要我们通过Android提供的混淆打包技术来完成. 一.没有引用外部包的情况: 这种情况下代码混淆的方式相对简单: 1)只需 ...