1 直接去官网下载rpm包安装或者下载tar包

2 服务启动后,发现打不开页面,修改yml文件即可

用rpm包安装的软件有一个特点就是不同的目录在不同文件夹,比如config文件夹根据下面进程信息查到

  找到yml文件后,去掉注释并将ip修改为虚机ip

  访问chrome即可

3 安装elasticsearch-head插件

按照慕课网上的教程下载master包和安装nodejs后,

[root@localhost elasticsearch-head-master]# yum install nodejs
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.cn99.com
* extras: mirrors.njupt.edu.cn
* updates: mirrors.cn99.com
没有可用软件包 nodejs。
错误:无须任何处理
[root@localhost elasticsearch-head-master]# curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -

## Installing the NodeSource Node.js 8.x LTS Carbon repo...

## Inspecting system...

+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release
+ uname -m

## Confirming "el7-x86_64" is supported...

+ curl -sLf -o /dev/null 'https://rpm.nodesource.com/pub_8.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'

## Downloading release setup RPM...

+ mktemp
+ curl -sL -o '/tmp/tmp.pdvh1ov1pt' 'https://rpm.nodesource.com/pub_8.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'

## Installing release setup RPM...

+ rpm -i --nosignature --force '/tmp/tmp.pdvh1ov1pt'

## Cleaning up...

+ rm -f '/tmp/tmp.pdvh1ov1pt'

## Checking for existing installations...

+ rpm -qa 'node|npm' | grep -v nodesource

## Run `sudo yum install -y nodejs` to install Node.js 8.x LTS Carbon and npm.
## You may also need development tools to build native addons:
sudo yum install gcc-c++ make
## To install the Yarn package manager, run:
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
sudo yum install yarn

[root@localhost elasticsearch-head-master]# sudo yum install -y nodejs
已加载插件:fastestmirror
nodesource | 2.5 kB 00:00:00
nodesource/x86_64/primary_db | 39 kB 00:00:00
Loading mirror speeds from cached hostfile
* base: mirrors.cn99.com
* extras: mirrors.njupt.edu.cn
* updates: mirrors.cn99.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 nodejs.x86_64.2.8.12.0-1nodesource 将被 安装
--> 解决依赖关系完成

依赖关系解决

======================================================================================================================================================================================
Package 架构 版本 源 大小
======================================================================================================================================================================================
正在安装:
nodejs x86_64 2:8.12.0-1nodesource nodesource 16 M

事务概要
======================================================================================================================================================================================
安装 1 软件包

总下载量:16 M
安装大小:49 M
Downloading packages:
警告:/var/cache/yum/x86_64/7/nodesource/packages/nodejs-8.12.0-1nodesource.x86_64.rpm: 头V4 RSA/SHA256 Signature, 密钥 ID 34fa74dd: NOKEY= ] 3.4 MB/s | 14 MB 00:00:00 ETA
nodejs-8.12.0-1nodesource.x86_64.rpm 的公钥尚未安装
nodejs-8.12.0-1nodesource.x86_64.rpm | 16 MB 00:00:04
从 file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL 检索密钥
导入 GPG key 0x34FA74DD:
用户ID : "NodeSource <gpg-rpm@nodesource.com>"
指纹 : 2e55 207a 95d9 944b 0cc9 3261 5ddb e8d4 34fa 74dd
软件包 : nodesource-release-el7-1.noarch (installed)
来自 : /etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
警告:RPM 数据库已被非 yum 程序修改。
正在安装 : 2:nodejs-8.12.0-1nodesource.x86_64 1/1
验证中 : 2:nodejs-8.12.0-1nodesource.x86_64 1/1

已安装:
nodejs.x86_64 2:8.12.0-1nodesource

完毕!
[root@localhost elasticsearch-head-master]# node -v
v8.12.0
[root@localhost elasticsearch-head-master]# npm install
npm WARN deprecated coffee-script@1.10.0: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated http2@3.3.7: Use the built-in module in node 9.0.0 or newer, instead

> phantomjs-prebuilt@2.1.16 install /root/elasticsearch-head/elasticsearch-head-master/node_modules/phantomjs-prebuilt
> node install.js

PhantomJS not found on PATH
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Receiving...
[==--------------------------------------] 4%

^C
[root@localhost elasticsearch-head-master]# npm install
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN elasticsearch-head@0.0.0 license should be a valid SPDX license expression

audited 1750 packages in 7.391s
found 23 vulnerabilities (17 low, 6 high)
run `npm audit fix` to fix them, or `npm audit` for details
[root@localhost elasticsearch-head-master]#
[root@localhost elasticsearch-head-master]# npm run start

> elasticsearch-head@0.0.0 start /root/elasticsearch-head/elasticsearch-head-master
> grunt server

(node:25855) ExperimentalWarning: The http2 module is an experimental API.
Running "connect:server" (connect) task
Waiting forever...
Started connect web server on http://localhost:9100
^C
[root@localhost elasticsearch-head-master]# ps -ef|grep java
elastic+ 26668 1 9 16:11 ? 00:00:53 /bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.io.tmpdir=/tmp/elasticsearch.acV6mTPj -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/lib/elasticsearch -XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime -Xloggc:/var/log/elasticsearch/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=32 -XX:GCLogFileSize=64m -Des.path.home=/usr/share/elasticsearch -Des.path.conf=/etc/elasticsearch -Des.distribution.flavor=default -Des.distribution.type=rpm -cp /usr/share/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch -p /var/run/elasticsearch/elasticsearch.pid --quiet
root 27538 3767 0 16:20 pts/1 00:00:00 grep --color=auto java
[root@localhost elasticsearch-head-master]#
[root@localhost elasticsearch-head-master]#
[root@localhost elasticsearch-head-master]#
[root@localhost elasticsearch-head-master]# npm run start

发现存在跨域问题,在elasticsearch.yaml中增加一下两行,注意冒号后要有空格。

修改完后,关闭到head进程和elasticsearch进程,分别启动head进程和elasticsearch进程。访问head进程,如下, 集群健康值green

elasticsearch安装指导(new)的更多相关文章

  1. ElasticSearch实践系列(一):安装

    Elasticsearch简介 Elasticsearch是一个高度可扩展的开源全文搜索和分析引擎.它允许您快速,近实时地存储,搜索和分析大量数据.它通常用作底层引擎/技术,为具有复杂搜索功能和要求的 ...

  2. 在centos7上安装elasticSearch

    因为elasticsearch是用java编写的,所以需要先安装JDK: jdk1.8的安装:安装指导 elasticsearch的下载和安装 一.下载elasticSearch 1.下载地址: ht ...

  3. Elasticsearch 及 Kibana 安装篇

    简介 官网-安装介绍 这里记载了各个软件包的安装方法,Linux Mac Windows-- 本文记载的是在 CentOS 系统安装 Elasticsearch 7.0.0 版本的步骤. 安装 Jav ...

  4. Elasticsearch之java的基本操作一

    摘要   接触ElasticSearch已经有一段了.在这期间,遇到很多问题,但在最后自己的不断探索下解决了这些问题.看到网上或多或少的都有一些介绍ElasticSearch相关知识的文档,但个人觉得 ...

  5. Elasticsearch 5.0 中term 查询和match 查询的认识

    Elasticsearch 5.0 关于term query和match query的认识 一.基本情况 前言:term query和match query牵扯的东西比较多,例如分词器.mapping ...

  6. 以bank account 数据为例,认识elasticsearch query 和 filter

    Elasticsearch 查询语言(Query DSL)认识(一) 一.基本认识 查询子句的行为取决于 query context filter context 也就是执行的是查询(query)还是 ...

  7. Ubuntu 14.04中Elasticsearch集群配置

    Ubuntu 14.04中Elasticsearch集群配置 前言:本文可用于elasticsearch集群搭建参考.细分为elasticsearch.yml配置和系统配置 达到的目的:各台机器配置成 ...

  8. ElasticSearch 5学习(10)——结构化查询(包括新特性)

    之前我们所有的查询都属于命令行查询,但是不利于复杂的查询,而且一般在项目开发中不使用命令行查询方式,只有在调试测试时使用简单命令行查询,但是,如果想要善用搜索,我们必须使用请求体查询(request ...

  9. ElasticSearch 5学习(9)——映射和分析(string类型废弃)

    在ElasticSearch中,存入文档的内容类似于传统数据每个字段一样,都会有一个指定的属性,为了能够把日期字段处理成日期,把数字字段处理成数字,把字符串字段处理成字符串值,Elasticsearc ...

随机推荐

  1. hdoj1068 Girls and Boys(二分图的最大独立集)

    题意:有n个人,要彼此认识.选择一个集合,使得集合里的每个人相互不认识.求集合中人数的最大值. 求二分图的最大独立集. 公式:最大独立集=顶点数-最大匹配 这个题目中因为集合是一个,所以求出最大匹配数 ...

  2. 《JAVA与模式》之模板方法模式

    在阎宏博士的<JAVA与模式>一书中开头是这样描述模板方法(Template Method)模式的: 模板方法模式是类的行为模式.准备一个抽象类,将部分逻辑以具体方法以及具体构造函数的形式 ...

  3. 话谈C#第二天

    今天做了几个小小的练习,和大家分享一下. 1.用*打印出等腰三角形,代码如下: static void Main(string[] args) { int n = 5; for (int i = 1; ...

  4. POJ 2379

    #include <iostream> #include <algorithm> #define MAXN 1005 using namespace std; struct n ...

  5. 在k8s中搭建可解析hostname的DNS服务

    2016-01-25更新 上篇文章总结k8s中搭建hbase时,遇到Pod中hostname的DNS解析问题,本篇将通过修改kube2sky源码来解决这个问题. 1 前言 kube2sky在Githu ...

  6. Java虚拟机(三):JVM垃圾回收机制

    概述 垃圾收集 Garbage Collection 通常被称为“GC”,它诞生于1960年 MIT 的 Lisp 语言,经过半个多世纪,目前已经十分成熟了. jvm 中,程序计数器.虚拟机栈.本地方 ...

  7. Go语言学习笔记九: 指针

    Go语言学习笔记九: 指针 指针的概念是当时学C语言时了解的.Go语言的指针感觉与C语言的没啥不同. 指针定义与使用 指针变量是保存内存地址的变量.其他变量保存的是数值,而指针变量保存的是内存地址.这 ...

  8. 阿里云域名ssl证书导入aws负载均衡使用

    一 .原因 由于公司战略需求,需要将阿里云的服务器迁移到aws,在迁移过程中,我们需要使用的是aws的负载均衡,可以在EC2的控制台 负载平衡位找到负载均衡.根据业务需求我们使用的是应用程序负载均衡器 ...

  9. java-jdk7-forkjoin异常返回

    来自:http://ifeve.com/fork-join-5/ 在Java中有两种异常: 已检查异常(Checked exceptions):这些异常必须在一个方法的throws从句中指定或在内部捕 ...

  10. 使用redis的发布订阅模式实现消息队列

    配置文件 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://w ...