亚洲最大看欧美片,亚洲图揄拍自拍另类图片,欧美精品v国产精品v呦,日本在线精品视频免费

  • 站長資訊網(wǎng)
    最全最豐富的資訊網(wǎng)站

    Ubuntu 18.04.2上安裝部署ElasticSearch 6.6.0集群

    在Ubuntu 18.04.2上安裝部署ElasticSearch 6.6.0集群記錄。

    操作系統(tǒng):
    Ubuntu 18.04.2上安裝部署ElasticSearch 6.6.0集群
    Ubuntu 18.04.2上安裝部署ElasticSearch 6.6.0集群

    es的安裝:https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html  要緊的就這2步:     wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.0.deb       sudo dpkg -i elasticsearch-6.6.0.deb       sudo /bin/systemctl daemon-reload       sudo /bin/systemctl enable elasticsearch.service       sudo /bin/systemctl start elasticsearch.service       如果啟動失敗說找不到JAVA_HOME環(huán)境變量,但是在命令行里敲java又有,則       在 /etc/default/elasticsearch里添加如下行           `JAVA_HOME=/usr/local/jre1.8.0_191`

    2個節(jié)點:
    節(jié)點1的IP: 192.168.11.145
    節(jié)點2的IP: 192.168.11.148

    更改2個節(jié)點的配置文件  /etc/elasticsearch/elasticsearch.yml  參照這個鏈接配置 https://dzone.com/articles/elasticsearch-tutorial-creating-an-elasticsearch-c    我的2個配置

    Ubuntu 18.04.2上安裝部署ElasticSearch 6.6.0集群

    Ubuntu 18.04.2上安裝部署ElasticSearch 6.6.0集群
    配置完成后在2個節(jié)點上分別重啟: systemctl restart elasticsearch.service
    安裝kibana,kibana安裝在192.168.11.145節(jié)點上,注意kibana的版本要與es的版本匹配
    注意/etc/kibana/kibana.yml里的elasticsearch.hosts要與es的node.master: true的
    network.host:network.port相匹配

    打開 192.168.11.145:5601查看
    在DevTool里輸入GET /_cluster/state?pretty查看,可以看到有2個節(jié)點了
    Ubuntu 18.04.2上安裝部署ElasticSearch 6.6.0集群

    在Monitoring也可以看到2個節(jié)點
    Ubuntu 18.04.2上安裝部署ElasticSearch 6.6.0集群

    創(chuàng)建一個index看看
    PUT /index-sgd
    {
    “settings” : {
    “index” : {
    “number_of_shards” : 2,
    “number_of_replicas” : 1
    }
    }
    }

    發(fā)現(xiàn)健康為yellow
    Ubuntu 18.04.2上安裝部署ElasticSearch 6.6.0集群

    查看index-sgd的stats,我是2個主分片,2個副本共4個分片,顯示有2個分片successful
    Ubuntu 18.04.2上安裝部署ElasticSearch 6.6.0集群
    Monitoring的這里也可以看到index-sgd有2個分片Unassigned
    Ubuntu 18.04.2上安裝部署ElasticSearch 6.6.0集群

    應該是因為192.168.11.148這個node的node.data設置為了false的原因,把這個節(jié)點的node.data設置為true
    重啟節(jié)點再通過kibana查看,健康狀態(tài)就為green了
    Ubuntu 18.04.2上安裝部署ElasticSearch 6.6.0集群

    PUT /index-sgd
    {
    “settings” : {
    “index” : {
    “number_of_shards” : 2,
    “number_of_replicas” : 2
    }
    }
    }

    如果把number_of_shards和number_of_replicas改成2,2,健康狀態(tài)怎么都是yellow了
    {
    “_shards”: {
    “total”: 6,
    “successful”: 4,
    “failed”: 0
    },
    改成3,1 健康狀態(tài)為green
    {
    “_shards”: {
    “total”: 6,
    “successful”: 6,
    “failed”: 0
    },
    改成3,2 健康狀態(tài)為yellow
    {
    “_shards”: {
    “total”: 9,
    “successful”: 6,
    “failed”: 0
    },

    改成3,3, 健康狀態(tài)為yellow  {

    “_shards”: {
    “total”: 12,
    “successful”: 6,
    “failed”: 0
    },
    改成4,1,green
    {
    “_shards”: {
    “total”: 8,
    “successful”: 8,
    “failed”: 0
    },
    改成4,2,yellow
    {
    “_shards”: {
    “total”: 12,
    “successful”: 8,
    “failed”: 0
    },
    改成100,1,green
    {
    “_shards”: {
    “total”: 200,
    “successful”: 200,
    “failed”: 0
    },

    改成1,2,yellow  {

    “_shards”: {
    “total”: 3,
    “successful”: 2,
    “failed”: 0
    },

    健康狀態(tài)取決于node和number_of_replicas  滿足這個number_of_replicas<=node才能green

    Elasticsearch 零基礎到入門新手教程  http://fxwbio.com/Linux/2019-01/156356.htm

    贊(0)
    分享到: 更多 (0)
    網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號