首先安装 JDK 环境

# 本机是否已经安装,ElasticSearch 最低支持 jdk 1.7
yum list installed | grep java # 查看 yum 库中的 java 安装包
yum list java* # 安装 java-1.8.
yum install -y java-1.8.-openjdk # 安装完成后查看 java 版本
java -version openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-b04)
OpenJDK -Bit Server VM (build 25.212-b04, mixed mode)

安装 elasticsearch(当前为 7.2)

# 下载并安装公共签名密钥
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch # 创建 yum 源文件
vim /etc/yum.repos.d/elasticsearch.repo [elasticsearch-.x]
name=Elasticsearch repository for .x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=
autorefresh=
type=rpm-md # 安装
yum install -y elasticsearch

配置 elasticsearch

# 配置文件都在 /etc/elasticsearch/ 目录下
vim /etc/elasticsearch/elasticsearch.yml # 集群名称
cluster.name: jhxxb
# 节点名称
node.name: node-
# 数据文件与日志文件存放目录
path.data: /home/esData/es
path.logs: /home/esData/log
# 网络设置
network.host: 0.0.0.0
http.port:
# 集群设置
cluster.initial_master_nodes: ["node-1"] # 修改配置中目录的用户与用户组,不然无法启动
chown -R elasticsearch:elasticsearch /home/esData/log/
chown -R elasticsearch:elasticsearch /home/esData/es/

启动 elasticsearch

# 启动
systemctl start elasticsearch.service # 开机自启
systemctl enable elasticsearch.service # 查看状态
systemctl status elasticsearch.service

浏览器访问 ip + 9200/?pretty 查看状态

安装 kibana(当前为 7.2),elasticsearch 的可视化界面(类似的还有 es-head 插件)

# 下载并安装公共签名密钥
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch # 添加源
vim /etc/yum.repos.d/kibana.repo [kibana-.x]
name=Kibana repository for .x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=
autorefresh=
type=rpm-md # 安装
yum install -y kibana # 配置
vim /etc/kibana/kibana.yml server.host: "0.0.0.0"
# 不要用 127.0.0.1,可能会提示 Kibana server is not ready yet
elasticsearch.hosts: ["http://192.168.8.41:9200"]
i18n.locale: "zh-CN" # 刷新服务配置
systemctl daemon-reload
# 开机自启
systemctl enable kibana.service
# 启动
systemctl start kibana.service
# 查看状态
systemctl status kibana.service

默认端口为 5601


https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html

https://www.elastic.co/guide/en/kibana/current/rpm.html

http://www.eryajf.net/2351.html

CentOS7 yum install elasticsearch的更多相关文章

  1. centos7 yum install redis

    直接yum 安装的redis 不是最新版本 yum install redis 如果要安装最新的redis,需要安装Remi的软件源,官网地址:http://rpms.famillecollet.co ...

  2. centos7#yum install ffmpeg

    yum install ffmpeg rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro rpm -Uvh http://li. ...

  3. Centos7 yum install chrome

    一.配置 yun 源 vim /etc/yum.repos.d/google-chrome.repo [google-chrome] name=google-chrome baseurl=http:/ ...

  4. centos7 yum install timeout

    https://yum.dockerproject.org/repo/main/centos/7/repodata/repomd.xml: [Errno 12] Timeout on https:// ...

  5. Centos7 yum install vim 出现“could not retrieve mirrorlist”

    ps:来源 https://www.cnblogs.com/justphp/p/5959655.html 办法一:改dns解析 vim /etc/resolv.conf 添加: nameserver ...

  6. 【elasticsearch】(1)centos7 使用yum安装elasticsearch 2.X

    前言 elasticsearch(下面称为ES)是一个基于Lucene的搜索服务器(By 百度百科:查看).所以他需要java的环境即jdk,这里提供懒人一键安装方式 # yum install ja ...

  7. CentOS7.3 yum install MySQL5.7

    安装环境:阿里云服务器 + CentOS7.3 测试工具:Navicat for MySQL 参考博客:https://blog.csdn.net/qq_38417808/article/detail ...

  8. wireshark使用心得 centos7安装wireshark: yum install wireshark wireshark-gnome

    centos7 安装wireshark 安装 yum install wireshark yum install wireshark-gnome 关于pcap文件的文件解析网上资料有很多,我在这就不说 ...

  9. [CentOS7 mini]Linux命令补全 yum install bash-completion

    CentOS7 mini默认不带命令补全需要自行安装 使用国内yum清华源 安装完后退出当前窗口再登录生效 # yum install -y bash-completion 已加载插件:fastest ...

随机推荐

  1. Mac EI 10.11.3 MySQL5.7.11 .dmg 安装(便捷设置,密码重置,卸载)

    MySQL 5.7+ 安装成功以后会弹出一个临时密码 后面需要通过临时密码设置新的密码 重置root密码:安装成功后,使用临时密码登陆:敲入命令,mysqladmin -u root -p passw ...

  2. vue下载后台传过来的乱码流的解决办法

    后台返回的乱码流 解决办法: 请求方式用的是axios,主要加关键的 {responseType: 'blob'} axios封装 export function postDownload(url, ...

  3. 怎么处理Win7电脑打开软件速度慢的情况?

    很多使用Win7系统的用户都会发现这么一个问题,就是电脑在使用过一段时间后,打开一个应用软件的速度就会变慢,非常耽误时间.下面就和大家分享一个解决Win7系统应用软件打开速度慢的小技巧. Win7系统 ...

  4. 【2017-05-19】WebForm复合控件、用DropDownList实现时间日期选择。

    自动提交的属性: AutoPostBack="True" 1.RadioButtonList     单选集合 -属性:RepeatDirection:Vertical (垂直排布 ...

  5. goquery 解析不了noscript

    今天在用goquery的时候 解析noscript标签的时候.发现一直获取不到里面的元素. google得到.需要去除noscript标签. s.Find("noscript"). ...

  6. Spring基础01——在IDEA中编写spring.xml

    如果需要在IDEA自动创建spring.xml配置文件,那么我们就需要先引入Spring相关的依赖 <dependency> <groupId>org.springframew ...

  7. java8学习之Function与BiFunction函数式接口详解

    Function接口: 上次中已经使用了Function的apply()方法,但是在这个接口中还存在三个具体实现的方法,如下: 下面来仔细的将剩下的方法学习一下: compose(): 首先来读一下该 ...

  8. FastDFS分布式图片服务器搭建

    一:Fastdfs简介 1. 什么是FastDFS FastDFS 是用 c 语言编写的一款开源的分布式文件系统.FastDFS 为互联网量身定制, 充分考虑了冗余备份.负载均衡.线性扩容等机制,并注 ...

  9. 数据管理必看!Kendo UI for jQuery过滤器状态保持

    Kendo UI for jQuery最新试用版下载 Kendo UI目前最新提供Kendo UI for jQuery.Kendo UI for Angular.Kendo UI Support f ...

  10. 强大的Visual Studio插件CodeRush全新发布v19.2,助力VS开发

    CodeRush是一个强大的Visual Studio .NET 插件,它利用整合技术,通过促进开发者和团队效率来提升开发者体验.CodeRush能帮助你以极高的效率创建和维护源代码.Consume- ...