<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                這里將搭建擁有3個節點的集群。 <br/> 步驟如下: **1. 準備好三臺Linux機器,其中一臺已完成【Linux單機安裝】** 我這里已經準備好三臺Linux機器,其中hadoop101已經完成【Linux單機安裝】。 ![](https://img.kancloud.cn/a4/60/a46086e867f2dbf1cd557fe802f57f2e_1506x377.png) **2. 在每個節點上配置hostname和域名映射** ```shell --節點1 # vim /etc/hostname hadoop101 --節點2 # vim /etc/hostname hadoop102 --節點3 # vim /etc/hostname hadoop103 --3個節點都做如下域名映射 # vim /etc/hosts 192.168.1.18 hadoop101 192.168.1.19 hadoop102 192.168.1.20 hadoop103 --3個節點都執行下面命名重啟網絡 # service network restart ``` **2. 將hadoop101安裝好的es環境分發到其他機器上** ```shell # scp -r /opt/install/es/ root@hadoop102:/opt/install/ # scp /etc/security/limits.conf root@hadoop102:/etc/security/limits.conf # scp /etc/security/limits.d/20-nproc.conf root@hadoop102:/etc/security/limits.d/20-nproc.conf # scp /etc/sysctl.conf root@hadoop102:/etc/sysctl.conf # scp -r /opt/install/es/ root@hadoop103:/opt/install/ # scp /etc/security/limits.conf root@hadoop103:/etc/security/limits.conf # scp /etc/security/limits.d/20-nproc.conf root@hadoop103:/etc/security/limits.d/20-nproc.conf # scp /etc/sysctl.conf root@hadoop103:/etc/sysctl.conf ``` **3. 在每個節點上都創建一個非root用戶** 因為安全性問題,Elasticsearch不允許在root用戶下運行,需要創建一個非root用戶。 ```shell --新增es用戶 # useradd es --為es用戶設置密碼 # passwd es --將es文件夾所有者設置為es用戶 # chown -R es:es /opt/install/es/ ``` **4. 修改每個節點的`${ES}/config/elasticsearch.yml`配置文件** ```shell -------------下面的配置每個節點不能相同------------- --當前節點的ip network.host: hadoop101 --當前節點的名稱,我定義hadoop101節點為node-1、hadoop102節點為node-2、hadoop103節點為node-3 node.name: node-1 -------------下面的配置每個節點都相同------------- --集群名稱 cluster.name: es-cluster --是否給予選擇主節點的權利 node.master: true node.data: true --head 插件需要這打開這兩個配置 http.cors.allow-origin: "*" http.cors.enabled: true http.max_content_length: 200mb --es數據存儲位置 path.data: /opt/install/es/data --日志存儲位置 path.logs: /opt/install/es/logs http.port: 9200 --es7.x 之后新增的配置,初始化一個新的集群時需要此配置來選舉 master cluster.initial_master_nodes: ["node-1"] --es7.x 之后新增的配置,節點發現 discovery.seed_hosts: ["hadoop101:9300","hadoop102:9300","hadoop103:9300"] gateway.recover_after_nodes: 2 network.tcp.keep_alive: true network.tcp.no_delay: true transport.tcp.compress: true --集群內同時啟動的數據任務個數,默認是 2 個 cluster.routing.allocation.cluster_concurrent_rebalance: 16 --添加或刪除節點及負載均衡時并發恢復的線程個數,默認 4 個 cluster.routing.allocation.node_concurrent_recoveries: 16 --初始化數據恢復時,并發恢復線程的個數,默認 4 個 cluster.routing.allocation.node_initial_primaries_recoveries: 16 ``` **5. 刪除每個節點 %ES_HOME%/data/ 目錄下的所有文件** ```shell # rm -rf data/* ``` **6. 測試集群是否搭建成功** ```shell --分別啟動3個節點的es # su es $ bin/elasticsearch ``` 訪問 http://192.168.1.18:9200/_cat/nodes ,看到如下3個節點信息則集群搭建成功! ![](https://img.kancloud.cn/ac/1e/ac1e30801bf8e56d01ed94d9bc514df7_1423x229.png)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看