<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>

                [TOC] ## 一、下載 下載地址:[https://www.elastic.co/cn/downloads/elasticsearch](https://www.elastic.co/cn/downloads/elasticsearch) ![](https://img.kancloud.cn/85/ca/85caf98d387d1c630fa2ba6f587b0c61_2648x1020.png) 獲取歷史版本: ![](https://img.kancloud.cn/db/7f/db7fb5745f30b468c0181d1c4d95dcbb_2940x1122.png) ## 二、安裝 ### 2. 配置xpack ![](https://img.kancloud.cn/60/e1/60e1ec516a2ef06112fb7b34142cb641_1104x148.png) #### 2.1. 生成證書 ``` bin/elasticsearch-certutil cert -out config/elastic-certificates.p12 -pass "" ``` #### 2.2. 修改配置 ``` vim config/elasticsearch.yml ``` 修改config目錄下elasticsearch.yml文件,在最后新增以下參數 ``` xpack.security.enabled: true xpack.security.transport.ssl.enabled: true xpack.security.transport.ssl.verification_mode: certificate xpack.security.transport.ssl.keystore.path: elastic-certificates.p12 xpack.security.transport.ssl.truststore.path: elastic-certificates.p12 ``` 配置elasticsearch.yml ``` cluster.name: my-es network.host: 0.0.0.0 node.name: node-1 cluster.initial_master_nodes: ["node-1"] http.cors.enabled: true http.cors.allow-origin: "*" bootstrap.memory_lock: false bootstrap.system_call_filter: false xpack.security.enabled: true xpack.security.transport.ssl.enabled: true xpack.security.transport.ssl.verification_mode: certificate xpack.security.transport.ssl.keystore.path: elastic-certificates.p12 xpack.security.transport.ssl.truststore.path: elastic-certificates.p12 ``` ## 三、啟動 ``` bin/elasticsearch ``` > 后臺運行:bin/elasticsearch -d ## 四、初始化密碼 兩種方式二選一 ### 4.1. 自動生成密碼 ``` bin/elasticsearch-setup-passwords auto ``` ### 4.2. 手動設置密碼 ``` bin/elasticsearch-setup-passwords?interactive ``` > 【重要】記錄密碼,很多地方需要驗證密碼。如:logstash,kibana。 ``` Changed password for user apm_system PASSWORD apm\_system = vKqf8FtzpUqPDrYfbsjt Changed password for user kibana_system PASSWORD kibana_system = 45CnPubkY740mul0BGst Changed password for user kibana PASSWORD kibana = 45CnPubkY740mul0BGst Changed password for user logstash_system PASSWORD logstash_system = KIUsb7e2cJePAWH5KW1t Changed password for user beats_system PASSWORD beats_system = zAnlSRyBEWJ1oOyUjxSK Changed password for user remote_monitoring_user PASSWORD remote_monitoring_user = K1YDZxvqURqIVylvUq0J Changed password for user elastic PASSWORD elastic = 7kgH0ARRpwLbhrdCTvrO ``` ## 五、IK分詞器 查詢數據,都是使用的默認的分詞器,分詞效果不太理想,會把text的字段分成一個一個漢字,然后搜索的時候也會把搜索的句子進行分詞,所以這里就需要更加智能的分詞器IK分詞器了 ### 5.1. 下載 下載地址:[https://github.com/medcl/elasticsearch-analysis-ik/releases](https://github.com/medcl/elasticsearch-analysis-ik/releases) > 這里你需要根據你的**Es的版本來下載對應版本的IK** ### 5.2. 將解壓文件復制到 es的安裝目錄/plugin/ik下面即可 ![](https://img.kancloud.cn/ee/92/ee923b0d3d3bc6c3c3d3ed7345045a07_2182x182.png) ### 5.3. 重啟es并檢查插件是否安裝成功 [http://localhost:9200/\_cat/plugins](http://localhost:9200/_cat/plugins) ![](https://img.kancloud.cn/55/f1/55f1c184776929f0756c3851d7fd0c09_1582x188.png) ## 六、訪問 1. 驗證密碼 [http://localhost:9200](http://localhost:9200) 打開瀏覽器,輸入我們的elasticsearch的網址,比如本地的[http://localhost:9200/](http://localhost:9200/)?,然后會彈出一個輸入框,讓我們輸入賬號和密碼 ![](https://img.kancloud.cn/51/da/51da4625a24c08eaf2508653fe3c2515_666x472.png) ![](https://img.kancloud.cn/b7/18/b718b96455c75ce810a63cdb946dbfd6_1048x540.png) 2. 查看索引 [http://localhost:9200/\_cat/indices?v](http://localhost:9200/_cat/indices?v) ![](https://img.kancloud.cn/00/a4/00a454bb2417089b1be63de060378f1e_2534x1956.png) 3. 查看插件 [http://localhost:9200/\_cat/plugins](http://localhost:9200/_cat/plugins) ![](https://img.kancloud.cn/55/f1/55f1c184776929f0756c3851d7fd0c09_1582x188.png) 4. 查看狀態 [http://localhost:9200/\_cluster/health?pretty=true](http://localhost:9200/_cluster/health?pretty=true) ![](https://img.kancloud.cn/96/5a/965ab9e717ff208d6bac2eb4f49cc90c_814x550.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>

                              哎呀哎呀视频在线观看