【原創】大數據基礎之ElasticSearch(3)升級

elasticsearch版本升級方案html

 

經常使用的滾動升級過程(Rolling Upgrade)以下:node

$ curl -XPUT '$es_server:9200/_cluster/settings?pretty' -H 'Content-Type: application/json' -d '{"transient":{"cluster.routing.allocation.enable":"none"}}'
$ curl -XPOST '$es_server/_flush/synced?pretty'
$ systemctl stop elasticsearch.servicejson

# upgrade elasticsearchapp

$ systemctl start elasticsearch.service
$ curl -XGET '$es_server:9200/_cat/nodes?pretty'
$ curl -XPUT '$es_server:9200/_cluster/settings?pretty' -H 'Content-Type: application/json' -d '{"transient":{"cluster.routing.allocation.enable":"all"}}'
$ curl -XGET '$es_server:9200/_cat/health?pretty'curl

以上爲單個節點升級過程,逐個節點操做便可elasticsearch


參考:
https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/rolling-upgrades.htmlide

相關文章
相關標籤/搜索