国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Elasticsearch--01.ES8.1.0集群搭建

這篇具有很好參考價(jià)值的文章主要介紹了Elasticsearch--01.ES8.1.0集群搭建。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

一、搭建ES集群

1.集群環(huán)境安裝

本集群使用Centos7.5操作系統(tǒng),2G 2C 60G(如果主機(jī)好點(diǎn)的節(jié)點(diǎn)配置可以搞高點(diǎn))

分別修改三臺(tái)集群服務(wù)器配置:

?1.1.修改系統(tǒng)配置文件/etc/security/limits.conf

* soft nofile 65536 # 設(shè)置每個(gè)進(jìn)程可以打開(kāi)的文件數(shù)的限制
* hard nofile 65536
* soft nproc 2048  # 設(shè)置線程數(shù)
* hard nproc 4096

1.2.修改/etc/sysctl.conf

#一個(gè)進(jìn)程可以擁有的VMA數(shù)量設(shè)置為655360(默認(rèn)為65536)
vm.max_map_count=655360

1.3.#sysctl -p?重新加載

集群服務(wù)器如下:

機(jī)器地址 節(jié)點(diǎn)名稱 節(jié)點(diǎn)角色 節(jié)點(diǎn)功能
192.168.206.101 es-node-1 Master,data 主+數(shù)據(jù)節(jié)點(diǎn)
192.168.206.102 es-node-2 Master,data 主+數(shù)據(jù)節(jié)點(diǎn)
192.168.206.103 es-node-3 Master,data 主+數(shù)據(jù)節(jié)點(diǎn)

2.下載ES并解壓

???ES-8.1.0下載地址:??????Elasticsearch 8.1.0 | Elastic

將es解壓到指定的目錄:

tar -zxvf elasticsearch-8.1.0-linux-x86_64.tar.gz -C /opt/module/

?3.新增用戶es

#新增用戶
useradd es
passwd es
# 創(chuàng)建數(shù)據(jù)文件目錄
mkdir /opt/module/elasticsearch-8.1.0/data/
# 創(chuàng)建證書目錄
mkdir /opt/module/elasticsearch-8.1.0/config/certs
# 修改文件擁有者
chown -R es:es /opt/module/elasticsearch-8.1.0

4.在第一臺(tái)服務(wù)器節(jié)點(diǎn)上生成安全證書

#切換用戶
su es
# 簽發(fā)ca證書 直接敲回車 不需要輸入密碼
bin/elasticsearch-certutil ca
# 用ca證書簽發(fā)節(jié)點(diǎn)證書 敲三次回車
bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12
# 將生成的證書文件移動(dòng)到config/certs目錄中
 mv elastic-certificates.p12 config/certs

5.在第一臺(tái)服務(wù)器節(jié)點(diǎn)上生成http證書

# 簽發(fā)Https證書
bin/elasticsearch-certutil http

關(guān)鍵環(huán)節(jié)如下:

Generate? a? CRS? [y/n]n? (是否發(fā)送認(rèn)證證書請(qǐng)求)

Use? an existing CA? [y/n]y (是否使用已存在的CA證書)

CA? Path: certs/elastic-stack-ca.p12 (CA證書路徑)

Password? for elastic-stack-ca.p12:? (輸入CA證書密碼、上面生成CA證書未設(shè)置密碼、直接回車)

For? how long should? your certificate be valid: [5y] 20y (輸入證書使用年限)

Generate a? certificate per node: [y/n] n(是否每個(gè)節(jié)點(diǎn)都 生成證書)

Enter all the hostnames that you need,one per line. (輸入主機(jī)名稱、回車)

when you are done,press <enter> once more to move on to the next step

linux001

linux002

linux003

Is this correct [y/n] n(輸入的主機(jī)名稱是否正確)

Enter all the ip address that you need,one per line. (輸入節(jié)點(diǎn)ip地址、回車)

when you are done,press <enter> once more to move on to the next step

192.168.206.101

192.168.206.102

192.168.206.103

Is this correct [y/n] n(輸入的ip地址是否正確)

DO you wish to change any of these options [y/n] n (是否修改證書配置)

Provide a password for the "http.p12" file:[<enter> for none] (輸入密碼、沒(méi)配置密碼、直接回車)?

What filename should be used for the output zip files?[/opt/module/elasticsearch-8.1.0/elasticsearch-ssl-http.zip] (是否自定義名稱、直接回車)

解壓并移動(dòng)到config/certs目錄里

unzip elasticsearch-ssl-http.zip
# 證書文件移動(dòng)到指定目錄下
mv elasticsearch/http.p12 kibana/elasticsearch-ca.pem config/certs

6.配置第一個(gè)服務(wù)器節(jié)點(diǎn)

#vim conf/elasticsearch.yml

# ES集群配置
cluster.name: cluster-es
node.name: es-node-1
#設(shè)置數(shù)據(jù)
path.data: /opt/module/elasticsearch-8.1.0/data/
path.logs: /opt/module/elasticsearch-8.1.0/logs/
# 網(wǎng)絡(luò)訪問(wèn)節(jié)點(diǎn)名稱(需要在/etc/hosts里設(shè)置解析)
network.host: linux001
# Rest訪問(wèn)端口9200 ES集群內(nèi)部端口為9300
http.port: 9200
# 初始節(jié)點(diǎn)
discovery.seed_hosts: ["linux001"]
# 安全認(rèn)證
xpack.security.enabled: true
xpack.security.enrollment.enabled: true
xpack.security.http.ssl:
  enabled: true
  keystore.path: /opt/module/elasticsearch-8.1.0/config/certs/http.p12
  truststore.path: /opt/module/elasticsearch-8.1.0/config/certs/http.p12
xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: /opt/module/elasticsearch-8.1.0/config/certs/elastic-certificates.p12
  truststore.path: /opt/module/elasticsearch-8.1.0/config/certs/elastic-certificates.p12
# 集群初始化的主節(jié)點(diǎn)
cluster.initial_master_nodes: ["es-node-1"]
http.host: [_local_, _site_]
ingest.geoip.downloader.enabled: false
xpack.security.http.ssl.client_authentication: none

7.配置其他服務(wù)器節(jié)點(diǎn)

其余節(jié)點(diǎn)的配置文件只需要修改node.name和network.host即可。

注意:

如果es是從第一臺(tái)服務(wù)器節(jié)點(diǎn)上使用rsync/scp拷貝過(guò)去的。先刪除data和logs文件、重新創(chuàng)建再啟動(dòng)es、否則會(huì)出現(xiàn)找不到其他服務(wù)器節(jié)點(diǎn)問(wèn)題、如果同第一個(gè)節(jié)點(diǎn)一樣是解壓安裝的忽略。

服務(wù)器節(jié)點(diǎn)2:

Elasticsearch--01.ES8.1.0集群搭建,Elasticsearch,elasticsearch,大數(shù)據(jù),java

服務(wù)器節(jié)點(diǎn)3:

Elasticsearch--01.ES8.1.0集群搭建,Elasticsearch,elasticsearch,大數(shù)據(jù),java

8.啟動(dòng)ES服務(wù)器

#bin/elasticsearch

第一次啟動(dòng)會(huì)顯示密碼、最好保存后、免得后面忘記、

忘記密碼:bin/elasticsearch-reset-password -u elastic?重置登錄es的密碼

#bin/elasticsearch -d? (依次啟動(dòng)三臺(tái)服務(wù)器、-d是后臺(tái)啟動(dòng))

這里如果不進(jìn)行密碼重置或者修改的話,三臺(tái)機(jī)器登錄的賬號(hào)是共享密碼的

#tail? -f? ?logs/cluster-es.log (查看es日志)

網(wǎng)頁(yè)訪問(wèn)查看es集群信息:(帶*的是主節(jié)點(diǎn))

https://linux001:9200/_cat/nodes?v

Elasticsearch--01.ES8.1.0集群搭建,Elasticsearch,elasticsearch,大數(shù)據(jù),java文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-650877.html

到了這里,關(guān)于Elasticsearch--01.ES8.1.0集群搭建的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • ElasticSearch第二章(ES8.X的使用)

    ElasticSearch第二章(ES8.X的使用)

    目錄 1:ES的使用(DSL創(chuàng)建索引庫(kù)-相當(dāng)于表) 1.1:什么是索引庫(kù) 1.2:索引庫(kù)的增刪改查使用 2:ES的使用(DSL操作文檔-相當(dāng)于數(shù)據(jù)) 2.1:什么是文檔 2.2:文檔的增刪改查 3:java代碼開(kāi)發(fā) 3.1:準(zhǔn)備工作 3.2:代碼操作索引(也就是表的增刪改查) 3.3:代碼操作文檔(也就是數(shù)

    2024年03月23日
    瀏覽(23)
  • Elasticsearch8系列【2】Windows環(huán)境安裝ES8

    Elasticsearch8系列【2】Windows環(huán)境安裝ES8

    有道無(wú)術(shù),術(shù)尚可求,有術(shù)無(wú)道,止于術(shù)。 Elasticsearch 使用 Java 語(yǔ)言開(kāi)發(fā),在安裝之前需要安裝 JDK 環(huán)境?;局С炙兄髁鞑僮飨到y(tǒng),安裝包在官網(wǎng)下載,目前最新的版本為 8.5.2 。 1. 下載 下載 elasticsearch-8.5.2-windows-x86_64.zip 并解壓: 2. 獲取密碼 點(diǎn)擊 bin/elasticsearch.bat 啟動(dòng):

    2023年04月16日
    瀏覽(22)
  • 袁庭新ES系列14節(jié) | 搭建Elasticsearch集群

    袁庭新ES系列14節(jié) | 搭建Elasticsearch集群

    單節(jié)點(diǎn)的Elasticsearch需要在處理大量數(shù)據(jù)的時(shí)候需要消耗大量?jī)?nèi)存和CPU資源,數(shù)據(jù)量大到一定程度就會(huì)產(chǎn)生處理瓶頸,甚至?xí)霈F(xiàn)宕機(jī)。 為了解決單節(jié)點(diǎn)ES的處理能力的瓶頸及單節(jié)點(diǎn)故障問(wèn)題,我們考慮使用Elasticsearch集群。接下來(lái)袁老師帶領(lǐng)大家學(xué)習(xí)如何搭建Elasticsearch的集群

    2024年04月17日
    瀏覽(25)
  • 【ElasticSearch系列-06】Es集群架構(gòu)的搭建以及集群的核心概念

    【ElasticSearch系列-06】Es集群架構(gòu)的搭建以及集群的核心概念

    ElasticSearch系列整體欄目 內(nèi)容 鏈接地址 【一】ElasticSearch下載和安裝 https://zhenghuisheng.blog.csdn.net/article/details/129260827 【二】ElasticSearch概念和基本操作 https://blog.csdn.net/zhenghuishengq/article/details/134121631 【三】ElasticSearch的高級(jí)查詢Query DSL https://blog.csdn.net/zhenghuishengq/article/details/1

    2024年02月04日
    瀏覽(26)
  • 磐基2.0搭建es集群 k8s安裝elasticsearch集群

    參考: k8s安裝elasticsearch集群_k8s部署elasticsearch集群_MasonYyp的博客-CSDN博客 1 環(huán)境簡(jiǎn)述搭建es集群需要使用的技術(shù)如下:k8s集群、StatefulSet控制器、Service(NodePort)服務(wù)、PV、PVC、volumeClaimTemplates(存儲(chǔ)卷申請(qǐng)模板)。StatefulSet控制器創(chuàng)建的Pod適合用于分布式存儲(chǔ)系統(tǒng),它最大的特

    2024年02月09日
    瀏覽(20)
  • docker安裝es8.x及elasticSearch8部分api使用

    docker中安裝es8 1、es8的tar下載地址: tar包下載地址) 2、docker load -i es-name 3、docker run -d --name elasticsearch-8.6.2 -e ES_JAVA_OPTS=“-Xms256m -Xmx256m” -p 9200:9200 -p 9300:9300 -e “discovery.type=single-node” elasticsearch:8.6.2 4、8開(kāi)始以后不支持直接使用http方式訪問(wèn)es: 4.1、cd /usr/share/elasticsearch/config 4

    2024年02月12日
    瀏覽(17)
  • Elasticsearch 系列(六)- ES數(shù)據(jù)同步和ES集群

    Elasticsearch 系列(六)- ES數(shù)據(jù)同步和ES集群

    本章將和大家分享ES的數(shù)據(jù)同步方案和ES集群相關(guān)知識(shí)。廢話不多說(shuō),下面我們直接進(jìn)入主題。 1、數(shù)據(jù)同步問(wèn)題 Elasticsearch中的酒店數(shù)據(jù)來(lái)自于mysql數(shù)據(jù)庫(kù),因此mysql數(shù)據(jù)發(fā)生改變時(shí),Elasticsearch也必須跟著改變,這個(gè)就是Elasticsearch與mysql之間的數(shù)據(jù)同步。 在微服務(wù)中,負(fù)責(zé)酒

    2024年04月28日
    瀏覽(23)
  • 最新版ES8的client API操作 Elasticsearch Java API client 8.0

    最新版ES8的client API操作 Elasticsearch Java API client 8.0

    作者:ChenZhen 本人不??淳W(wǎng)站消息,有問(wèn)題通過(guò)下面的方式聯(lián)系: 郵箱:1583296383@qq.com vx: ChenZhen_7 我的個(gè)人博客地址:https://www.chenzhen.space/?? 版權(quán):本文為博主的原創(chuàng)文章,本文版權(quán)歸作者所有,轉(zhuǎn)載請(qǐng)附上原文出處鏈接及本聲明。?? 如果對(duì)你有幫助,請(qǐng)給一個(gè)小小的s

    2024年02月04日
    瀏覽(28)
  • ElasticSearch多數(shù)據(jù)源配置,連接多個(gè)ES集群

    開(kāi)發(fā)時(shí)遇到需要連接多個(gè)ES的需求,類似于連接多個(gè)MySQL數(shù)據(jù)庫(kù)一樣。 Elasticsearch Java API有四類client連接方式 TransportClient RestClient Jest Spring Data Elasticsearch ????????其中TransportClient和RestClient是Elasticsearch原生的api。TransportClient可以支持2.x,5.x版本,TransportClient將會(huì)在Elasticsea

    2023年04月14日
    瀏覽(16)
  • elasticsearch(ES)分布式搜索引擎04——(數(shù)據(jù)聚合,自動(dòng)補(bǔ)全,數(shù)據(jù)同步,ES集群)

    elasticsearch(ES)分布式搜索引擎04——(數(shù)據(jù)聚合,自動(dòng)補(bǔ)全,數(shù)據(jù)同步,ES集群)

    **聚合(aggregations)**可以讓我們極其方便的實(shí)現(xiàn)對(duì)數(shù)據(jù)的統(tǒng)計(jì)、分析、運(yùn)算。例如: 什么品牌的手機(jī)最受歡迎? 這些手機(jī)的平均價(jià)格、最高價(jià)格、最低價(jià)格? 這些手機(jī)每月的銷售情況如何? 實(shí)現(xiàn)這些統(tǒng)計(jì)功能的比數(shù)據(jù)庫(kù)的sql要方便的多,而且查詢速度非常快,可以實(shí)現(xiàn)近

    2024年02月08日
    瀏覽(36)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包