ElasticSearch 系列 (1) 单机安装部署

ElasticSearch 是分布式的全文检索系统,官方文档 地址: https://www.elastic.co/guide/index.html

笔者在centos 上部署ES 5.0 的集群,总结了一些经验教训。


1、部署单机的ES环境

详细的部署过程,在官方文档中已经很详细的说明。简要描述如下:

== 安装 GPG-KEY

sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch

== 创建  /etc/yum.repos.d/elasticsearch.repo 文件,内容如下:
[elasticsearch-5.x]
name=Elasticsearch repository for 5.x packages
baseurl=https://artifacts.elastic.co/packages/5.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md


== 安装 elasticsearch
sudo yum install elasticsearch

== 修改配置文件

vi /etc/elasticsearch/elasticsearch.yml

== 配置自启动

sudo systemctl daemon-reload
sudo systemctl enable elasticsearch

== 运行和停止

systemctl start elasticsearch
systemctl stop elasticsearch

== ES 安装完成后,默认的文件位置

type

description

location

home

Home of elasticsearch installation

/usr/share/elasticsearch

bin

Binary scripts including elasticsearch to start a node

/usr/share/elasticsearch/bin

conf

Configuration files elasticsearch.yml and logging.yml

/etc/elasticsearch

conf

Environment variables including heap size,file descriptors

/etc/sysconfig/elasticsearch

data

The location of the data files

/var/lib/elasticsearch/

logs

Log files location

/var/log/elasticsearch

plugins

Plugin files location

/usr/share/elasticsearch/plugins


2、安装kibana

== 创建 /etc/yum.repos.d/kibana.repo ,内容如下


[kibana-5.x]
name=Kibana repository for 5.x packages
baseurl=https://artifacts.elastic.co/packages/5.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md

== 安装
sudo yum install kibana

== 配置自启动
sudo systemctl daemon-reload
sudo systemctl enable kibana

== 启动和停止

sudo systemctl start kibana
sudo systemctl stop kibana

kibana的文件位置:

配置文件 在 /etc/kibana/kibana.yml

安装目录  /usr/share/kibana


3、安装x-pack 

分别在elasticesearch的安装目录(/usr/share/elasticsearch)及kibana的安装目录(/usr/share/kibana)执行

bin/elasticsearch-plugininstall x-pack
bin/kibana-plugin install x-pack

4、检查是否工作正常

== 检查服务端口:elasticsearch 的9200,kibana的5601是否正常

sudo netstat -nltp

==使用浏览器访问:elasticsearch

http://192.168.0.21:9200


== 使用浏览器访问:kibana

http://192.168.0.21:5601


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值