Elasticsearch-8.17.0 centos7安裝

下載鏈接
https://www.elastic.co/downloads/past-releases/elasticsearch-8-17-0
https://www.elastic.co/downloads/past-releases/logstash-8-17-0
https://www.elastic.co/cn/downloads/past-releases/kibana-8-17-0https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.17.0-linux-x86_64.tar.gz
https://artifacts.elastic.co/downloads/logstash/logstash-8.17.0-linux-x86_64.tar.gz
https://artifacts.elastic.co/downloads/kibana/kibana-8.17.0-linux-x86_64.tar.gz1、上傳下載的安裝包到指定機器上,然后做準備工作1)編輯 /etc/security/limits.conf 文件,添加以下行:星號(*)代表對所有用戶應用該限制
*          soft    nofile      65535
*          hard    nofile      65535
2)編輯/etc/pam.d/login
加在最后
session required pam_limits.so3)vi /etc/sysctl.conf
添加或修改以下行:
vm.max_map_count=262144運行以下命令以使配置立即生效:
sudo sysctl -p然后重啟電腦2、解壓和改名
進入到軟件的目錄
/usr/local/software執行如下2條命令
tar -xzf elasticsearch-8.17.0-linux-x86_64.tar.gz
mv elasticsearch-8.17.0  elasticsearch3、運行
cd /usr/local/software/elasticsearch/bin
[root@localhost bin]# ./elasticsearch遇到錯誤,不能以 root 用戶身份運行 Elasticsearch
fatal exception while booting Elasticsearch java.lang.RuntimeException: can not run elasticsearch as root
這個錯誤的含義是 不能以 root 用戶身份運行 Elasticsearch。為了安全性和權限問題4、創建data目錄
在/usr/local/software/elasticsearch目錄下mkdir data5、新建用戶和授權
useradd elasticsearchchown -R elasticsearch:elasticsearch /usr/local/software/elasticsearch
chown -R elasticsearch:elasticsearch /usr/local/software/elasticsearch/datachown -R elasticsearch:elasticsearch /usr/local/software/elasticsearch/logs/
chmod -R 755 /usr/local/software/elasticsearch/logs/6、刪除elasticsearch.keystore[root@localhost config]# rm elasticsearch.keystore
rm: remove regular file ‘elasticsearch.keystore’? y7、修改elasticsearch.yml cd /usr/local/software/elasticsearch/configvi /usr/local/software/elasticsearch/config/elasticsearch.yml備份下
cp elasticsearch.yml  elasticsearch_bak.yml修改
vi elasticsearch.ymldiscovery.seed_hosts: ["127.0.0.1:9300"]
cluster.initial_master_nodes: ["localhost"]xpack.security.enabled: false
xpack.security.enrollment.enabled: truehttp.host: 0.0.0.0transport.host: 0.0.0.0修改elasticsearch的堆內存
cd /usr/local/software/elasticsearch/config/jvm.options.d/
沒有文件就創建一個
touch heap-size.options
-Xms2g
-Xmx2g下面   Memory: 2.6G就是證明改變更了[root@localhost ~]# systemctl status elasticsearch
● elasticsearch.service - ElasticsearchLoaded: loaded (/etc/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)Active: active (running) since Tue 2024-12-31 16:00:36 CST; 1min 46s agoDocs: http://www.elastic.coMain PID: 992 (java)Tasks: 87Memory: 2.6G8 切換到 elasticsearch 用戶
sudo su - elasticsearch9 以 elasticsearch 用戶身份啟動 Elasticsearch
在 elasticsearch 用戶下,進入到 Elasticsearch 安裝目錄并啟動服務:cd /usr/local/software/elasticsearch/bin
./elasticsearch -d-d代表后臺啟動10 訪問http://192.168.150.50:9200/, 如果不能訪問再往下看或者文騰訊的AI,https://cat.aichatos8.com.cn/#/home
{"name" : "localhost.localdomain","cluster_name" : "elasticsearch","cluster_uuid" : "udrBoGSRRwal_hpQ7ocUlQ","version" : {"number" : "8.17.0","build_flavor" : "default","build_type" : "tar","build_hash" : "2b6a7fed44faa321997703718f07ee0420804b41","build_date" : "2024-12-11T12:08:05.663969764Z","build_snapshot" : false,"lucene_version" : "9.12.0","minimum_wire_compatibility_version" : "7.17.0","minimum_index_compatibility_version" : "7.0.0"},"tagline" : "You Know, for Search"
}11 創建服務 vi /etc/systemd/system/elasticsearch.service
文件內容如下:[Unit]
Description=Elasticsearch
Documentation=http://www.elastic.co
After=network.target[Service]
Type=simple
ExecStart=/usr/local/software/elasticsearch/bin/elasticsearch
User=elasticsearch
Group=elasticsearch
Restart=always
LimitMEMLOCK=infinity
LimitNOFILE=65536
LimitNPROC=4096[Install]
WantedBy=multi-user.target替換 /path/to/elasticsearch-8.17.0 為實際路徑。12 開機啟動
systemctl daemon-reload
systemctl enable elasticsearch
systemctl start elasticsearch
systemctl status elasticsearchelasticsearch.yml
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
#       Before you set out to tweak and tune the configuration, make sure you
#       understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
#cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
#node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
#path.data: /path/to/data
#
# Path to log files:
#
#path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:
#
#network.host: 192.168.0.1
#
# By default Elasticsearch listens for HTTP traffic on the first free port it
# finds starting at 9200. Set a specific HTTP port here:
#
#http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["host1", "host2"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
#cluster.initial_master_nodes: ["node-1", "node-2"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
discovery.seed_hosts: ["127.0.0.1:9300"]
cluster.initial_master_nodes: ["localhost"]
# ---------------------------------- Various -----------------------------------
#
# Allow wildcard deletion of indices:
#
#action.destructive_requires_name: false#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically      
# generated to configure Elasticsearch security features on 30-12-2024 12:29:02
#
# --------------------------------------------------------------------------------# Enable security features
xpack.security.enabled: false
xpack.security.enrollment.enabled: true# Allow HTTP API connections from anywhere
# Connections are encrypted and require user authentication
http.host: 0.0.0.0# Allow other nodes to join the cluster from anywhere
# Connections are encrypted and mutually authenticated
transport.host: 0.0.0.0#----------------------- END SECURITY AUTO CONFIGURATION -------------------------
==============================安裝遇到的具體問題分析==================運行后Elasticsearch security features have been automatically configured!
? Authentication is enabled and cluster connections are encrypted.??  Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`):7b9UkBY*NeEH3_ea85JG??  HTTP CA certificate SHA-256 fingerprint:d7a127636d720f927127c4f974f806f512eae01dd8b85af21be192dd5bbb3c3c??  Configure Kibana to use this cluster:
? Run Kibana and click the configuration link in the terminal when Kibana starts.
? Copy the following enrollment token and paste it into Kibana in your browser (valid for the next 30 minutes):eyJ2ZXIiOiI4LjE0LjAiLCJhZHIiOlsiMTkyLjE2OC4xNTAuNTA6OTIwMCJdLCJmZ3IiOiJkN2ExMjc2MzZkNzIwZjkyNzEyN2M0Zjk3NGY4MDZmNTEyZWFlMDFkZDhiODVhZjIxYmUxOTJkZDViYmIzYzNjIiwia2V5IjoiYVR5VkY1UUJWLTBzb19zV0UzT246UkhSangyMFRReWl1ZzZPeUtWSVJIQSJ9??  Configure other nodes to join this cluster:
? On this node:? Create an enrollment token with `bin/elasticsearch-create-enrollment-token -s node`.? Uncomment the transport.host setting at the end of config/elasticsearch.yml.? Restart Elasticsearch.
? On other nodes:? Start Elasticsearch with `bin/elasticsearch --enrollment-token <token>`, using the enrollment token that you generated.重要信息:
elastic user 的密碼是 7b9UkBY*NeEH3_ea85JG
重置密碼的命令 bin/elasticsearch-reset-password -u elastic使用:bin/elasticsearch-create-enrollment-token -s node創建一個token, 但這個還用不上"取消對config/exelasticsearch.yml末尾transport.host設置的注釋。重新啟動Elasticsearch。8、修改elasticsearch.yml cd /usr/local/software/elasticsearch/config備份下
cp elasticsearch.yml  elasticsearch_bak.yml修改
vi elasticsearch.yml把它的注釋去掉,然后保存重啟。
transport.host: 0.0.0.0[2024-12-30T21:00:35,801][ERROR][o.e.b.Elasticsearch      ] [localhost.localdomain] node validation exception
[2] bootstrap checks failed. You must address the points described in the following [2] lines before starting Elasticsearch. For more information see [https://www.elastic.co/guide/en/elasticsearch/reference/8.17/bootstrap-checks.html]
bootstrap check failure [1] of [2]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]; for more information see [https://www.elastic.co/guide/en/elasticsearch/reference/8.17/bootstrap-checks-file-descriptor.html]
bootstrap check failure [2] of [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]; for more information see [https://www.elastic.co/guide/en/elasticsearch/reference/8.17/bootstrap-checks-max-map-count.html]
ERROR: 這個錯誤信息說明 Elasticsearch 在啟動時執行了 bootstrap checks(啟動檢查),并且未通過兩個關鍵的檢查。具體來說,出現了以下兩個問題:錯誤信息解析:
max file descriptors 設置過低錯誤信息:[bootstrap check failure [1] of [2]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]]
解釋:Elasticsearch 需要較高的文件描述符限制,因為它會同時打開很多文件(例如索引文件、日志文件等)。默認情況下,操作系統可能只允許最多 4096 個文件描述符,而 Elasticsearch 要求至少 65535 個。
vm.max_map_count 設置過低錯誤信息:[bootstrap check failure [2] of [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]]
解釋:vm.max_map_count 是操作系統設置的最大虛擬內存區域數(用于內存映射文件)。Elasticsearch 需要更高的這個值,特別是在處理大數據量時。默認值可能較低(如 65530),而 Elasticsearch 要求至少 262144。
如何解決這些問題:
1. 增加 max file descriptors 限制
你需要增加操作系統中可打開文件的最大數量。方法如下:查看當前設置:bash
ulimit -n
如果顯示的數字小于 65535,你需要增加它。臨時修改(只對當前會話有效):bash
ulimit -n 65535
永久修改(適用于 Linux):編輯 /etc/security/limits.conf 文件,添加以下行:星號(*)代表對所有用戶應用該限制
*          soft    nofile      65535
*          hard    nofile      65535如果你知道運行 Elasticsearch 的用戶(例如 elasticsearch 用戶),你可以替換星號為該用戶名:elasticsearch soft nofile 65535
elasticsearch hard nofile 65535還需要修改 /etc/pam.d/common-session 或 /etc/pam.d/login 文件(具體路徑取決于發行版),并添加以下行:
centos7 用這個/etc/pam.d/login
加在最后
session required pam_limits.so
最后,重新啟動機器或注銷當前會話后生效。2. 增加 vm.max_map_count 限制
vm.max_map_count 控制了每個進程可以映射的最大虛擬內存區域數量。需要將其增加到至少 262144:臨時修改:
bash
sudo sysctl -w vm.max_map_count=262144永久修改:
編輯 /etc/sysctl.conf 文件:bash
sudo vi /etc/sysctl.conf
添加或修改以下行:bash
vm.max_map_count=262144
運行以下命令以使配置立即生效:bash
sudo sysctl -p
3. 重啟 Elasticsearch
完成上述設置后,重啟 Elasticsearch:bash
sudo systemctl restart elasticsearch
或者如果你是手動啟動 Elasticsearch,則執行:bash
./bin/elasticsearch
總結:
max file descriptors 的問題:增加文件描述符的限制到 65535。
vm.max_map_count 的問題:增加虛擬內存映射區域的限制到 262144。
完成配置后重啟 Elasticsearch,應該能夠順利啟動。如果還有其他問題,或者配置后仍然無法啟動,可以查看 Elasticsearch 的日志(/usr/local/software/elasticsearch/logs/elasticsearch.log)來獲取更多詳細的錯誤信息。啟動說沒權限,繼續修改目錄權限
如果 Elasticsearch 進程沒有足夠的權限來寫入該目錄,你可以更改該目錄的權限,使得 Elasticsearch 有權訪問它。假設 Elasticsearch 是以 elasticsearch 用戶運行的,你可以執行以下命令來修復權限。給目錄賦予適當的權限:bash
sudo chown -R elasticsearch:elasticsearch /usr/local/software/elasticsearch/logs/
這條命令將目錄的所有權授予 elasticsearch 用戶和組。確保目錄具有正確的讀寫權限:bash
sudo chmod -R 755 /usr/local/software/elasticsearch/logs/
這樣,目錄將具有所有者的讀、寫和執行權限,其他用戶只有讀和執行權限。3. 檢查日志文件權限
同樣需要確保日志文件本身(elasticsearch.log)的權限設置正確。執行以下命令來檢查日志文件的權限:查看日志文件的權限:ls -l /usr/local/software/elasticsearch/logs/elasticsearch.log刪除elasticsearch.keystore[root@localhost config]# rm elasticsearch.keystore
rm: remove regular file ‘elasticsearch.keystore’? y從你提供的日志信息來看,Elasticsearch 在啟動時遇到了 bootstrap 檢查失敗,并且因為 缺少配置 導致啟動失敗。錯誤消息中指出了如下問題:錯誤描述
bootstrap check failure [1] of [1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured;
這意味著 Elasticsearch 發現你沒有配置必要的發現設置,這是在生產環境中啟動集群時的強制要求。具體來說,Elasticsearch 需要知道如何找到集群的節點和確定主節點。解決辦法
編輯 Elasticsearch 配置文件Elasticsearch 的配置文件 elasticsearch.yml 存在于你的 Elasticsearch 安裝目錄下的 config 目錄中,例如:/usr/local/software/elasticsearch/config/elasticsearch.yml。添加 Discovery 配置在該文件中,你需要添加以下配置來啟用節點發現機制。對于單節點部署,可以配置 discovery.seed_hosts 或 cluster.initial_master_nodes。
如果你的環境是 單節點(即只有一個 Elasticsearch 實例),你可以添加以下配置:yaml
# discovery.seed_hosts 用于指定初始節點列表,Elasticsearch 用它來查找其他節點
discovery.seed_hosts: ["127.0.0.1:9300"]# 或者你可以使用 cluster.initial_master_nodes 指定初始的主節點列表
cluster.initial_master_nodes: ["localhost"]
如果你部署的是 多節點集群,你需要配置集群中的所有節點的 IP 地址。例如:
yaml
discovery.seed_hosts: ["node1_ip:9300", "node2_ip:9300", "node3_ip:9300"]
cluster.initial_master_nodes: ["node1", "node2", "node3"]
discovery.seed_hosts 用于幫助節點相互發現,而 cluster.initial_master_nodes 用于在集群啟動時指定初始的主節點。重啟 Elasticsearch修改配置文件后,重啟 Elasticsearch 服務。你可以使用以下命令來啟動 Elasticsearch:vi /usr/local/software/elasticsearch/config/elasticsearch.yml
discovery.seed_hosts: ["127.0.0.1:9300"]
cluster.initial_master_nodes: ["localhost"]bash
./bin/elasticsearch

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/bicheng/90661.shtml
繁體地址,請注明出處:http://hk.pswp.cn/bicheng/90661.shtml
英文地址,請注明出處:http://en.pswp.cn/bicheng/90661.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

windows下SAS9.4軟件下載與安裝教程

SAS 9.4是SAS公司推出的一款功能強大的統計分析軟件&#xff0c;廣泛應用于數據分析、商業智能、預測分析、數據挖掘及統計建模等多個領域。數據處理與管理能力&#xff1a;SAS 9.4支持多種數據格式的導入導出&#xff0c;包括JSON、XML等&#xff0c;便于處理來自Web和API的數…

MyBatis-Plus極速開發指南

MyBatis-Plus簡介MyBatis-Plus 是一個 MyBatis 的增強工具&#xff0c;在 MyBatis 的基礎上只做增強不做改變&#xff0c;簡化開發&#xff0c;提高效率。它提供了以下主要特性&#xff1a;無侵入&#xff1a;只做增強不做改變&#xff0c;引入它不會對現有工程產生影響強大的 …

Django接口自動化平臺實現(五)

8. 測試用例執行 預期效果如下&#xff1a;用例執行邏輯如下&#xff1a;前端提交用例 id 列表到后臺&#xff0c;后臺獲取每一條用例的信息&#xff1b;后臺獲取域名信息、用例 id 列表&#xff1b;對用例的請求數據進行變量的參數化、函數化等預處理操作&#xff1b;根據先后…

一個沒有手動加分號引發的bug

最近因為分號的疏忽&#xff0c;導致出現了一個bug&#xff0c;記錄下來&#xff0c;分享給大家。 1、一個示例 給你下面這一段代碼&#xff0c;你根據經驗判斷一下運營結果 let [a,b] [a,b] let [x,y] [1,2] if(x < y){[x,y] [y,x][a,b] [b,a] }按照一般的理解&#xf…

Elasticsearch安全審計日志設置與最佳實踐

一、Elasticsearch安全審計簡介 審計日志&#xff08;Audit Logging&#xff09;用于記錄Elasticsearch中的安全相關事件&#xff0c;包括認證失敗、連接拒絕、數據訪問事件以及通過API對安全配置&#xff08;如用戶、角色、API密鑰&#xff09;的變更記錄。 注意&#xff1a;審…

算法訓練營day29 貪心算法③ 134. 加油站、135. 分發糖果 、860.檸檬水找零、406.根據身高重建隊列

貪心算法的第三篇博客&#xff0c;繼續腦筋風暴&#xff01; 134. 加油站 寫在前面 這道題規定了有解的話&#xff0c;必定為唯一解 貪心思路 直接從全局進行貪心選擇&#xff0c;情況如下&#xff1a; 情況一&#xff1a;如果gas的總和小于cost總和&#xff0c;那么無論從…

【09】C#入門到精通——C# 結構體對齊 與 常用數據 對應關系

文章目錄1 C# 結構體對齊1.1 默認對齊方式1.2 節對齊方式設置1.3 偏移量設置2 C#與C/C之間類型的對應關系1 C# 結構體對齊 1.1 默認對齊方式 struct默認對齊方式&#xff0c;結構體長度必須是&#xff0c;最大成員長度的整數倍&#xff0c;所以下面結構體大小是 24 (實際占用…

pytest 測試報告生成方案有哪些?

在 pytest 中&#xff0c;除了 Allure 和 HTMLTestRunner&#xff0c;還有許多其他生成測試報告的方法和插件。以下是一些常用的方案及其特點&#xff1a;1. pytest-html&#xff08;官方推薦&#xff09;特點&#xff1a;輕量級、易集成&#xff0c;生成獨立的 HTML 報告。安裝…

Unity中EditorPrefs與PlayerPrefs對比分析

Unity中EditorPrefs與PlayerPrefs對比分析 EditorPrefs與PlayerPrefs是Unity引擎中用于數據持久化的兩個核心類&#xff0c;分別用于于編輯器擴展與游戲運行時場景。以下從設計目標、存儲位置、數據類型、生命周期、安全性、使用場景等方面展開對比&#xff0c;并結合代碼示例說…

藍光中的愧疚

藍光中的愧疚活動結束那晚&#xff0c;深圳的空氣吸飽了水汽&#xff0c;沉甸甸地壓在胸口。我站在西鄉社區活動中心冰涼的玻璃門外&#xff0c;目送著最后一個離開的王老師。她關掉門廳的燈&#xff0c;電子門鎖合攏時發出輕微卻尖銳的“嘀”聲&#xff0c;像一根細針扎在我緊…

Linux: network: wireshark: esp attempt to detec null-encrypted esp payloads

最近看到一個pcap文件&#xff0c;里面有esp協議包&#xff0c;而且是明文/沒有加密的消息&#xff0c;為什么wireshark沒有將esp上層的tcp/sip消息沒有解出來。 類似于Info列只有ESP的信息。后來選中了協議選項里的&#xff1a;attempt to detect/decode NULL encrypted ESP p…

10分鐘搭建腳手架:Spring Boot 3.2 + Vue3 前后端分離模板

10分鐘搭建腳手架&#xff1a;Spring Boot 3.2 Vue3 前后端分離模板一、項目結構設計二、后端搭建&#xff08;Spring Boot 3.2&#xff09;1. 快速初始化&#xff08;使用 Spring Initializr&#xff09;2. 核心配置application.yml跨域配置 CorsConfig.java3. 安全配置Secur…

【軌物方案】分布式光伏電站運維升級智能化系列:老電站的數智化重生

自2010年分布式光伏在國內興起以來&#xff0c;十余年間&#xff0c;市場裝機容量已實現飛躍式增長。長期以來&#xff0c;傳統的人工巡查和抄表模式是它們日常運維的主要手段。然而&#xff0c;隨著電站數量的激增和設備的老化&#xff0c;由此導致的事故頻發&#xff0c;使得…

RAG 技術深度面試題:架構、優化與實踐應用

1. RAG 基礎架構設計 問題&#xff1a;對比單階段檢索&#xff08;Single-stage Retrieval&#xff09;與兩階段檢索&#xff08;Two-stage Retrieval&#xff09;在 RAG 系統中的架構差異&#xff0c;說明在企業知識庫場景下為何優先選擇兩階段檢索&#xff1f; 答案&#xff…

yolov8通道級剪枝講解(超詳細思考版)

為了提升推理速度并降低部署成本&#xff0c;模型剪枝已成為關鍵技術。本文將結合實踐操作&#xff0c;講解YOLOv8模型剪枝的方法原理、實施步驟及注意事項。 雖然YOLOv8n版本本身參數量少、推理速度快&#xff0c;能滿足大多數工業檢測需求&#xff0c;但谷歌研究表明&#x…

JavaSE:隨機數生成

隨機數在游戲開發、密碼學、模擬測試等場景中扮演著關鍵角色。本文將深入探討Java中兩種主流的隨機數生成技術&#xff1a;Random類和Math.random()方法&#xff0c;并解析背后的類與對象概念&#xff0c;助你全面掌握隨機數生成的核心機制。一、隨機數生成的兩大技術 Java提供…

Android 持久化存儲原理與使用解析

一、核心存儲方案詳解1. SharedPreferences (SP)使用方式&#xff1a;// 獲取實例 SharedPreferences sp getSharedPreferences("user_prefs", MODE_PRIVATE);// 寫入數據 sp.edit().putString("username", "john_doe").putInt("login_cou…

無 sudo 權限的環境下將 nvcc (CUDA Toolkit) 安裝到個人目錄 linux

要在無 sudo 權限的環境下將 nvcc 安裝到 home 個人目錄&#xff0c;你可以手動安裝 CUDA Toolkit 到你的 $HOME 目錄&#xff0c;只需以下幾步即可使用 nvcc 編譯 CUDA 程序。 ? 步驟&#xff1a;本地安裝 CUDA Toolkit&#xff08;含 nvcc&#xff09; 下載 CUDA Toolkit Ru…

從指標定義到AI執行流:衡石SENSE 6.0的BI PaaS如何重構ISV分析鏈路

一、痛點&#xff1a;ISV行業解決方案的“三重斷鏈”傳統ISV構建行業分析模塊時面臨的核心挑戰&#xff1a;指標定義碎片化&#xff1a;客戶A的“銷售額”含稅&#xff0c;客戶B不含稅&#xff0c;衍生指標無法復用&#xff1b;分析-執行割裂&#xff1a;發現庫存異常后需人工導…

構建跨平臺遠程醫療系統中的視頻通路技術方案探究

一、遠程醫療走向日常化&#xff0c;音視頻能力成為關鍵基礎設施 隨著醫療數字化與分級診療體系的不斷演進&#xff0c;遠程醫療正從試點探索階段&#xff0c;逐步邁向常態化、標準化應用。從縣域醫院遠程問診、基層醫療協作&#xff0c;到大型三甲醫院的術中協同、專科教學直…