elasticsearch5.3linux集群
来源:互联网 发布:网络水是什么意思意思 编辑:程序博客网 时间:2024/06/09 06:44
必须安装jdk8以上
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.3.0.zipmkdir ela1
mkdir ela2
cp elasticsearch-5.3.0.zip ela1
cp elasticsearch-5.3.0.zip ela2
unzip elasticsearch-5.3.0.zip
vi /data1/elasticsearch/ela2/elasticsearch-5.3.0/config/elasticsearch.yml
因为安全问题elasticsearch 不让用root用户直接运行,所以要创建新用户
第一步:liunx创建新用户 adduser XXX 然后给创建的用户加密码 passwd XXX 输入两次密码。
第二步:切换刚才创建的用户 su XXX 然后执行elasticsearch 会显示Permission denied 权限不足。
第三步:给新建的XXX赋权限,chmod 777 * 这个不行,因为这个用户本身就没有权限,肯定自己不能给自己付权限。所以要用root用户登录付权限。
第四步:root给XXX赋权限,chown -R XXX /你的elasticsearch安装目录。
然后执行成功。
sudo chown -R noroot:noroot elasticsearch
/data1/elasticsearch/ela1/elasticsearch-5.3.0/bin/elasticsearch -d
/data1/elasticsearch/ela2/elasticsearch-5.3.0/bin/elasticsearch -d
节点1配置
# ======================== Elasticsearch Configuration =========================## NOTE: Elasticsearch comes with reasonable defaults for most settings.# Before you set out to tweak and tune the configuration, make sure you# understand what are you trying to accomplish and the consequences.## The primary way of configuring a node is via this file. This template lists# the most important settings you may want to configure for a production cluster.## Please consult the documentation for further information on configuration options:# https://www.elastic.co/guide/en/elasticsearch/reference/index.html## ---------------------------------- Cluster -----------------------------------## Use a descriptive name for your cluster:#cluster.name: my-applicationnode.master: truediscovery.zen.ping_timeout: 30s#discovery.zen.ping.multicast.enabled: true## ------------------------------------ Node ------------------------------------## Use a descriptive name for the node:#node.name: node-1## Add custom attributes to the node:##node.attr.rack: r1## ----------------------------------- Paths ------------------------------------## Path to directory where to store the data (separate multiple locations by comma):#path.data: /path/to/data1## Path to log files:#path.logs: /path/to/logs1## ----------------------------------- Memory -----------------------------------## Lock the memory on startup:#bootstrap.system_call_filter: falsebootstrap.memory_lock: false## Make sure that the heap size is set to about half the memory available# on the system and that the owner of the process is allowed to use this# limit.## Elasticsearch performs poorly when the system is swapping the memory.## ---------------------------------- Network -----------------------------------## Set the bind address to a specific IP (IPv4 or IPv6):#network.host: 192.168.7.204## Set a custom port for HTTP:#http.port: 9201transport.tcp.port: 9301## For more information, consult the network module documentation.## --------------------------------- Discovery ----------------------------------## Pass an initial list of hosts to perform discovery when new node is started:# The default list of hosts is ["127.0.0.1", "[::1]"]#discovery.zen.ping.unicast.hosts: ["192.168.7.204:9302"]## Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):##discovery.zen.minimum_master_nodes: 3## For more information, consult the zen discovery module documentation.## ---------------------------------- Gateway -----------------------------------## Block initial recovery after a full cluster restart until N nodes are started:#gateway.recover_after_nodes: 3## For more information, consult the gateway module documentation.## ---------------------------------- Various -----------------------------------## Require explicit names when deleting indices:##action.destructive_requires_name: true
节点2配置
# ======================== Elasticsearch Configuration =========================## NOTE: Elasticsearch comes with reasonable defaults for most settings.# Before you set out to tweak and tune the configuration, make sure you# understand what are you trying to accomplish and the consequences.## The primary way of configuring a node is via this file. This template lists# the most important settings you may want to configure for a production cluster.## Please consult the documentation for further information on configuration options:# https://www.elastic.co/guide/en/elasticsearch/reference/index.html## ---------------------------------- Cluster -----------------------------------## Use a descriptive name for your cluster:#cluster.name: my-applicationnode.master: truediscovery.zen.ping_timeout: 30s#discovery.zen.ping.multicast.enabled: true## ------------------------------------ Node ------------------------------------## Use a descriptive name for the node:#node.name: node-2## Add custom attributes to the node:##node.attr.rack: r1## ----------------------------------- Paths ------------------------------------## Path to directory where to store the data (separate multiple locations by comma):#path.data: /path/to/data2## Path to log files:#path.logs: /path/to/logs2## ----------------------------------- Memory -----------------------------------## Lock the memory on startup:##bootstrap.memory_lock: truebootstrap.system_call_filter: false## Make sure that the heap size is set to about half the memory available# on the system and that the owner of the process is allowed to use this# limit.## Elasticsearch performs poorly when the system is swapping the memory.## ---------------------------------- Network -----------------------------------## Set the bind address to a specific IP (IPv4 or IPv6):#network.host: 192.168.7.204transport.tcp.port: 9302## Set a custom port for HTTP:#http.port: 9202## For more information, consult the network module documentation.## --------------------------------- Discovery ----------------------------------## Pass an initial list of hosts to perform discovery when new node is started:# The default list of hosts is ["127.0.0.1", "[::1]"]#discovery.zen.ping.unicast.hosts: ["192.168.7.204:9301"]## Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):##discovery.zen.minimum_master_nodes: 3## For more information, consult the zen discovery module documentation.## ---------------------------------- Gateway -----------------------------------## Block initial recovery after a full cluster restart until N nodes are started:##gateway.recover_after_nodes: 3## For more information, consult the gateway module documentation.## ---------------------------------- Various -----------------------------------## Require explicit names when deleting indices:##action.destructive_requires_name: true
0 0
- elasticsearch5.3linux集群
- elasticsearch5.4.1 linux 搭建集群
- elasticsearch5.3集群 java 调用实例
- Centos7.3部署Elasticsearch5.4.0集群
- Linux上Elasticsearch5版本集群管理工具head安装
- ElasticSearch5.1.1集群部署
- elasticsearch5.2 集群
- Elasticsearch5.2.2集群搭建
- elasticsearch5.2集群部署
- elasticsearch5.5.2 配置 集群
- elasticsearch5.4集群超时
- ElasticSearch5.4集群搭建
- ElasticSearch5.3插件开发(二)获取集群健康信息
- Elasticsearch5.1集群+kibana部署
- elasticsearch5.2局域网集群搭建
- linux安装elasticsearch5.5
- elasticsearch5 版本集群管理工具head安装
- elasticsearch5 版本集群管理工具head安装
- FutureTask理解
- python + django + dwebsocket 实现简单的聊天室, 同时可作为监控实时在线的用户
- js 判断各种数据类型的简单方法
- mysql忘记密码的解决方法
- 我是如何进行code review的
- elasticsearch5.3linux集群
- 文章标题
- 试图加载格式不正确的程序。 (异常来自 HRESULT:0x8007000B)
- Python3实现BP神经网络
- java语法随笔
- Maven详解之仓库------本地仓库、远程仓库
- JavaScript找数组中重复出现过的元素
- 谈谈敏捷开发
- java连接数据库两种方式