<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、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                [TOC] # 目錄 | 文件夾 | 作用 | | --- | --- | | /bin | 運行elasticsearch實例和管理插件的一些腳本 | | /config | 配置文件路徑,包含elasticsearch.yml | | /data | 在節點上每個索引/碎片的數據文件的位置.可以有多個目錄 | | /lib | ElasticSearch使用的庫 | | /logs | 日志的文件夾 | | /plugins | 已經安裝的插件的存放位置 | 啟動成功會生成個data和logs文件夾 ~~~ //mac es7 brew tap elastic/tap brew install elastic/tap/elasticsearch-full ~~~ # es配置 配置文件位于config目錄中 - elaticsearch.yml es的相關配置 - jvm.options jvm相關參數 - log4j2.properties 日志相關配置 --- ## jvm.options文件 里面有個 -Xms1g -Xmx2g 表示默認使用內存1G,可以調小點 --- ## elasticsearch.yml關鍵配置 * `cluster.name` 集群名稱,以此作為是否同一集群的判斷條件 * `node.name` 節點名稱,以此作為集群中不同節點的區分條件 * `network.host/http.port` 網絡地址和端口,用于http和transport服務使用 * `path.data` 數據存儲地址 * `path.log` 日志存儲地址 如果裝了插件不能成功連接到es,添加下面的2個命令 ~~~ # header插件 # 是否支持跨域 http.cors.enabled: true # *表示支持所有域名 http.cors.allow-origin: "*" ~~~ **elasticsearch配置說明** * Development與Production模式說明 * 以transport的地址是否綁定在localhost為判斷標準network.host,只要綁定的不是localhost他就認為你在線上模式 - Development模式下在啟動時會以warning的方式提示配置檢查異常 - Production 模式下啟動會以error的方式提示配置檢查異常并退出 ## 參數修改的第二種方式 * bin/elasticsearch -E配置名稱=配置值 ~~~ bin/elasticsearch -Ehttp.port=19200 ~~~ ## es7需要jdk11 進入bin文件下:`cd bin` 修改es7.4指向java\_home配置 `vi elasticsearch ` 添加一下幾行內容: ~~~ #配置自己的jdk11 export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.5.jdk/Contents/Home export PATH=$JAVA_HOME/bin:$PATH #添加jdk判斷 if [ -x "$JAVA_HOME/bin/java" ]; then JAVA="/Library/Java/JavaVirtualMachines/jdk-11.0.5.jdk/Contents/Home/bin/java" else JAVA=`which java` fi ~~~ 上面路徑換成自己的 啟動es: ./elasticsearch(啟動時要切換為普通用戶,root身份啟動報錯!) 這時如果出現以下警告信息: ~~~ OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release. ~~~ 這是提醒你 cms 垃圾收集器在 jdk9 就開始被標注為 @deprecated 這時候去修改jvm.options文件配置 將 `-XX:+UseConcMarkSweepGC` 改為 `-XX:+UseG1GC` 保存文件后退出,再次啟動es,若出現 permisson denied錯誤信息,證明應該給對應的操作用戶授權(這點栽了好多坑!!可以切換成root身份給當前普通用戶授權,授權的基本上是jdk所在路徑、es所在路徑及啟動時涉及到的一些路徑,授權命令:chown -R username 路徑地址) # kibana配置 打開 config/kibana.yml這個配置文件,告訴kibana他elasticsearch.url在什么地方 默認`localhost:9200` 下載成功,瀏覽器訪問 `localhost:5601`就可以看到了 **漢化** [https://github.com/anbai-inc/Kibana\_Hanization](https://github.com/anbai-inc/Kibana_Hanization) 7.x配置文件 ~~~ i18n.locale: "zh-CN" ~~~ 配置文件位于config文件夾中 kibana.yml關鍵配置說明 * server.host/server.port 訪問kibana用的地址和端口,如果你想讓外網訪問你的kibana就要修改這個 * elasticsearch.url待訪問elasticsearch的地址 **常用功能** * Discover 數據搜索查看 * Visualize 圖標制作 * Dashboard 儀表盤制作 * Timelion 時序數據的高級可視化分析 * DevTools 開發者工具 * Management 配置 # 啟動es集群 本地啟動集群的方式 1. `./bin/elasticsearch` 2. `./bin/elasticsearch -Ehttp.port=8200 -Epath.data=node2` 3. `./bin/elasticsearch -Ehttp.port=7200 -Epath.data=node3` --- 然后我們啟動完就可以用 `http://localhost:9200/_cat/nodes` 看到里面有對應的節點了 `http://localhost:9200/_cat/nodes?v` 可以看到詳細說明 master 中* 表示那個是主節點 里面還有cpu,內存等信息 --- 地址欄輸入 `http://localhost:9200/_cluster/stats` 可以看到cluster的詳細信息 # es配置文件 elasticsearch.yml配置詳解 ~~~ # 變量可以用${}這樣的形式賦予 #node.rack: ${RACK_ENV_VAR} ~~~ ~~~ # 集群的名稱 cluster.name: jdxia ~~~ ~~~ # 節點名稱 node.name: "w1" # 1. You want this node to never become a master node, only to hold data. # This will be the "workhorse" of your cluster. # 他是子節點,存儲數據 #node.master: false #node.data: true # 2. You want this node to only serve as a master: to not store any data and # to have free resources. This will be the "coordinator" of your cluster. # 假如你的設置是這樣,他只做master,不做索引和分片,master節點就是協調各個節點 #node.master: true #node.data: false # # 3. You want this node to be neither master nor data node, but # to act as a "search load balancer" (fetching data from nodes, # aggregating results, etc.) # 都設置為false,他是做了個負載均衡器 #node.master: false #node.data: false ~~~ 數據讀取是由集群中各個節點共同完成的,而數據的修改是由集群的master來完成的 ~~~ # 每個節點定義與之關聯的屬性,進行碎片分配時的過濾,這邊使用默認值就行 #node.rack: rack314 # 設置一臺服務器能運行的節點數目,一般一臺服務器就部署1臺 #node.max_local_storage_nodes: 1 ~~~ ~~~ #定義碎片的數量 #index.number_of_shards: 5 #定義副本的數量 #index.number_of_replicas: 1 ~~~ ~~~ #定義配置文件的位置 #path.conf: /path/to/conf #定義索引數據存放的位置 #path.data: /path/to/data #也可以定義多個路徑 #path.data: /path/to/data1,/path/to/data2 #定義臨時文件的路徑 #path.work: /path/to/work #定義日志文件的路徑 #path.logs: /path/to/logs #定義插件的位置 #path.plugins: /path/to/plugins ~~~ ~~~ # 插件的名字,如果這個節點這個插件沒有安裝就不能啟動 #plugin.mandatory: mapper-attachments,lang-groovy ~~~ ~~~ # 設為true表示會鎖定一些內存給es,一般這個內存是給jvm的 bootstrap.mlockall: true ~~~ ~~~ # elasticsearch綁定的地址,可以(IPv4 or IPv6) #network.bind_host: 192.168.0.1 # es發布的地址,就是和其他節點通信的地址 #network.publish_host: 192.168.0.1 # 如果這邊設置,上面的2個設置可以都不用設置了 #network.host: 192.168.0.1 # 定義是否壓縮tcp傳輸的數據 #transport.tcp.compress: true # http協議的端口 #http.port: 9200 # 設置http交互中傳輸內容的最大長度 #http.max_content_length: 100mb # 禁用和啟用http協議 #http.enabled: false ~~~ ~~~ # es的持久化存儲,local是本地文件 gateway.type: local # 控制集群在達到多少個節點后才會開始數據恢復功能,可以避免集群初期自動發現share分片不全的問題,比如設置5,集群必須有5個節點才能進行數據分片 #gateway.recover_after_nodes: 1 # 初始化數據恢復過程的超時時間 #gateway.recover_after_time: 5m # 初始化數據恢復過程的超時時間,這個具體是節點都啟動成功,過了5分鐘才能進行數據恢復 #gateway.recover_after_time: 5m # 設置在集群中多少個節點啟動成功后就馬上開始數據恢復 #gateway.expected_nodes: 2 ~~~ ~~~ #是設置一個節點的并發數量,初始恢復過程中 #cluster.routing.allocation.node_initial_primaries_recoveries: 4 # 添加刪除節點和負載均衡時的個數 #cluster.routing.allocation.node_concurrent_recoveries: 2 #設置恢復時限制的寬帶,0就是無限制 #indices.recovery.max_bytes_per_sec: 20mb # 限制從其他分片,最大打開并發流的限制 #indices.recovery.concurrent_streams: 5 ~~~ ~~~ # 設置多少個節點,可以成為候選節點的個數,如果你集群中節點數量比較多可以設置為2~4 #discovery.zen.minimum_master_nodes: 1 #自動發現其他節點的,超時時間,網絡環境比較差可以設置高點 #discovery.zen.ping.timeout: 3s # 設置是否打開多播協議發現其他節點 discovery.zen.ping.multicast.enabled: true # 設置集群中master節點,初始化列表,里面的host用來自動發現加入集群的節點 #discovery.zen.ping.unicast.hosts: ["host1", "host2:port"] # 設置log,debug的打印四份 # # query查詢 #index.search.slowlog.threshold.query.warn: 10s #index.search.slowlog.threshold.query.info: 5s #index.search.slowlog.threshold.query.debug: 2s #index.search.slowlog.threshold.query.trace: 500ms # fetch獲取 #index.search.slowlog.threshold.fetch.warn: 1s #index.search.slowlog.threshold.fetch.info: 800ms #index.search.slowlog.threshold.fetch.debug: 500ms #index.search.slowlog.threshold.fetch.trace: 200ms #index.indexing.slowlog.threshold.index.warn: 10s #index.indexing.slowlog.threshold.index.info: 5s #index.indexing.slowlog.threshold.index.debug: 2s #index.indexing.slowlog.threshold.index.trace: 500ms # 設置jvm的gc打印時間 #monitor.jvm.gc.young.warn: 1000ms #monitor.jvm.gc.young.info: 700ms #monitor.jvm.gc.young.debug: 400ms #monitor.jvm.gc.old.warn: 10s #monitor.jvm.gc.old.info: 5s #monitor.jvm.gc.old.debug: 2s # 開始jsonp的數據交換格式 http.jsonp.enable: true ~~~ # 簡單的集群管理 es提供了一套api,叫做cat api,可以查看es中各種各樣的數據 ~~~ GET /_cat/health?v ~~~ * green:每個索引的primary shard和replica shard都是active狀態的 * yellow:每個索引的primary shard都是active狀態的,但是部分replica shard不是active狀態,處于不可用的狀態 * red:不是所有索引的primary shard都是active狀態的,部分索引有數據丟失了
                  <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>

                              哎呀哎呀视频在线观看