ElasticSearch 分散式安裝及調優
三臺ubuntuServer 的 ip: 192.168.0.4,192.168.0.5,192.168.0.6
從官網下載elasticsearch 版本2.2.1
解壓到/opt/目錄下
sudo tar -zxvf elasticsearch-2.2.1.tar.gz -C /opt
對ip為192.168.0.4的主機
進入/opt/elasticsearch-2.2.1/config/並修改elasticsearch.yml
# ======================== 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 see the documentation for further information on configuration options:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration.html>
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: qiaqia
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: dngel
#
# Add custom attributes to the node:
#
# node.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
# path.data: /path/to/data
#
# Path to log files:
#
# path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
bootstrap.mlockall: true
#
# Make sure that the `ES_HEAP_SIZE` environment variable 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.0.4
#
# Set a custom port for HTTP:
#
# http.port: 9200
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html>
#
# --------------------------------- 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.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["192.168.0.5", "192.168.0.6"]
#
# Prevent the "split brain" by configuring the majority of nodes (total number of nodes / 2 + 1):
#
discovery.zen.minimum_master_nodes: 2
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery.html>
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
# gateway.recover_after_nodes: 3
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway.html>
#
# ---------------------------------- Various -----------------------------------
#
# Disable starting multiple nodes on a single system:
#
# node.max_local_storage_nodes: 1
#
# Require explicit names when deleting indices:
#
# action.destructive_requires_name: true
安裝head外掛
[email protected]:/opt/elasticsearch-2.2.1/bin# sudo ./plugin install mobz/elasticsearch-head
其他外掛安裝可參照官網外掛安裝
配置另外兩臺主機
將elasticsearch-2.2.1複製到192.168.0.5和192.168.0.6
修改elasticsearch.yml
對192.168.0.5, 找到並修改下面配置
node.name: engel
network.host: 192.168.0.5
discovery.zen.ping.unicast.hosts: ["192.168.0.4", "192.168.0.6"]
對192.168.0.6, 找到並修改下面配置
node.name: fngel
network.host: 192.168.0.6
discovery.zen.ping.unicast.hosts: ["192.168.0.4", "192.168.0.5"]
調優
修改Es佔用記憶體:vim /opt/elasticsearch-2..2.1/bin/elasticsearch.in.sh
找到 ES_MIN_MEM和ES_MAX_MEM,修改es最大和最小佔用記憶體值, 這裡我設定為1g,視機器具體情況而定
修改/etc/security/limits.conf
加上
angel soft memlock unlimited
angel hard memlock unlimited
angel soft nofile 65536
angel hard nofile 65536
重啟電腦使配置生效angel
elasticsearch 的啟動和關閉
分別在每個節點的/opt/elasticsearch-2.2.1/bin輸入./elasticsearch
啟動完畢後,可以輸入curl '192.168.0.4:9200/_cluster/health?pretty'
檢視叢集健康狀態
顯示為green
{
"cluster_name": "qiaqia",
"status": "green",
"timed_out": false,
"number_of_nodes": 3,
"number_of_data_nodes": 3,
"active_primary_shards": 29,
"active_shards": 58,
"relocating_shards": 0,
"initializing_shards": 0,
"unassigned_shards": 0,
"delayed_unassigned_shards": 0,
"number_of_pending_tasks": 0,
"number_of_in_flight_fetch": 0,
"task_max_waiting_in_queue_millis": 0,
"active_shards_percent_as_number": 100
}
在瀏覽器輸入http://192.168.0.4:9200/_plugin/head/
,可觀察到叢集狀態
相關推薦
ElasticSearch 分散式安裝及調優
三臺ubuntuServer 的 ip: 192.168.0.4,192.168.0.5,192.168.0.6 從官網下載elasticsearch 版本2.2.1 解壓到/opt/目錄下 sudo tar -zxvf elasticsear
Nginx 安裝及調優
打開文件 inactive 如果 idf ins 根據 scrip zlib cas 下載:nginxhttp://nginx.org/en/download.html上傳服務器tar -zxvf nginx-1.15.8cd nginx-1.15.8 安裝組件包yum -
linux下的FTP安裝及調優
前言:在之前交換平臺的開發中,FTP的各種操作算是核心功能點。 在FTP的開發中,遇到了不少坑。 如FTP需要設定被動模式,否則10M以上的包可能會上傳失敗。 如FTP需要設定囚牢模式,否則訪問的資料夾可能會調到根目錄去,不在配置的目錄中,可能導致訪問錯誤、許可權不夠等問題。 以下為正確的開啟方法,以後lin
Nginx安裝配置及調優
nginx配置 nginx優化 Nginx安裝配置及調優 ? 一、安裝Nginx ? 1.安裝環境 [root@proxy ~]# yum –y install gcc pcre-devel openssl-devel 2.創建一個用戶啟動nginx [root@proxy ~]# usera
ElasticSearch5.6.5集群部署及調優、Head和Bigdesk插件安裝
work 指點 app.js 模擬 eas disable firewalld sts 無法 一、簡介:Elasticsearch是一個基於Apache Lucene的開源搜索引擎。無論在開源還是專有領域,Lucene可以被認為是迄今為止最先進、性能最好的、功能最全的搜索引
學習筆記:【Web 叢集實戰】05_CentOS 7.x 系統安裝後的基本配置及調優_楊利婷
一、基本配置 網路配置 網路配置常用的兩種方式為橋接和 NAT 模式。本文采用的是 NAT 模式連線網路。 瞭解更多網路型別可參照【Web 叢集實戰】01_VMware 虛擬機器常見的網路型別 1)首先,在宿主機 Windows 的計算機管理 - 服
【原創】大數據基礎之ElasticSearch(5)重要配置及調優
acc del refresh part closed efault end read_only bsp Index Settings 重要索引配置 Index level settings can be set per-index. Settings may be:
CPU負載觀察及調優方法
cpu負載觀察及調優方法紅帽6實現無滴答 tick lessinterrupt-driven由軟中斷進行驅動在SMP多CPU架構中,傳統上多CPU對於內存的訪問是總線方式。是總線就會存在資源爭用和一致性問題,而且如果不斷的增加CPU數量,總線的爭用會愈演愈烈,這就體現在4核CPU的跑分性能達不到2核CPU的2
Linux系統CPU的性能監控及調優
垃圾 線程的狀態 roo you etc 互聯網 訪問 get 配置文件 前言: 性能優化是一個老生常談的話題,典型的性能問題如頁面響應慢、接口超時,服務器負載高、並發數低,數據庫頻繁死鎖等。尤其是在“糙快猛”的互聯網開發模式大行其道的今天,
《Linux性能及調優指南》----1.1 Linux進程管理
內存 設計 order 輕量 地址空間 了解linux tro tar 完成 翻譯:飛哥 ( http://hi.baidu.com/imlidapeng ) 版權所有,尊重他人勞動成果,轉載時請註明作者和原始出處及本聲明。 原文名稱:《Linux Performanc
PostgreSQL on Azure.cn : 性能測試及調優
大小 ttl top 系統默認 針對 事務 環境 專用 average 上一篇我們知道怎麽一步步的安裝並部署PostgreSQL,接下來我們就要測試一下在Azure上PostgreSQL可以達成什麽樣的性能,並且嘗試修改數據庫的參數,看看怎麽優化數據庫性能。 對於數據庫新手
zabbix監控模板修改及調優(不完整版)
之前 evel proc 表達式 至少 dir 手動 最新 slave 簡介監控一直在不同的層面為我們的運維工作發揮著重要的作用:網絡層監控,及時發現網絡間的訪問質量(如我們之前介紹的全國maps網絡監控);服務器監控,了解服務器各項性能參數(如常見的zabbix、cact
ES集群部署及調優
ref 修改 三臺 java_home pre lose data blog timeout 系統:Centos6ES版本:6.4.0服務器三臺172.16.0.8172.16.0.6172.16.0.22 部署jdk解壓jdk放在/data目錄,/data/jdk配置環境
大資料之(6)hbase2.1.1版本全分散式安裝及使用
一、Hadoop安裝 具體請參見 https://blog.csdn.net/u011095110/article/details/83791734 二、Zookeeper分散式叢集安裝 1.Zookeeper下載 #進入hadoop主目錄 cd /hadoop #下載z
ElasticSearch 6 安裝及相關坑解析
首先 下載 https://www.elastic.co/downloads/elasticsearch 然後 解壓到 使用者目錄 比如:~/module 然後 配置環境變數 比如:export ES_HOME=/home/zhy/module/elasticsearch-6.4.1
記filebeat記憶體洩漏問題分析及調優
ELK 從釋出5.0之後加入了beats套件之後,就改名叫做elastic stack了。beats是一組輕量級的軟體,給我們提供了簡便,快捷的方式來實時收集、豐富更多的資料用以支撐我們的分析。但由於beats都需要安裝在ELK叢集之外,在宿主機之上,其對宿主機的效能的影響往往成
java-xx引數介紹及調優總結
功能開關: 引數 預設值或限制 說明 引數 預設值 功能 -XX:-AllowUserSignalHandlers 限於Linux和Solaris,預設不啟用
《Linux 效能及調優指南》1.6 瞭解Linux效能指標
翻譯:飛哥 ( http://hi.baidu.com/imlidapeng) 版權所有,尊重他人勞動成果,轉載時請註明作者和原始出處及本宣告。 原文名稱:《Linux Performance and Tuning Guidelines》 原文地址:http://www.redbooks.
《linux效能及調優指南》 3.4 硬碟瓶頸
翻譯:Hank (http://blog.csdn.net/fireroll)版權所有,尊重他人勞動成果,轉載時請註明作者和原始出處及本宣告。原文名稱:《Linux Performance and Tuning Guidelines》原文地址:http://www.redbooks.ibm.com/abstr
《linux效能及調優指南》 3.3 記憶體瓶頸
摘要:3.3記憶體瓶頸OnaLinuxsystem,manyprogramsrunatthesametime.Theseprogramssupportmultipleusers,andsomeprocessesaremoreusedthanothers.Someoftheseprogramsus