{"id":27805,"date":"2024-11-24T20:01:54","date_gmt":"2024-11-24T12:01:54","guid":{"rendered":"https:\/\/fwq.ai\/blog\/?p=27805"},"modified":"2024-11-24T20:01:54","modified_gmt":"2024-11-24T12:01:54","slug":"elastic%e4%b8%ad%e7%9a%84elasticsearch%e6%96%87%e4%bb%b6%e7%9a%84%e9%85%8d%e7%bd%ae%e9%80%89%e9%a1%b9","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/27805\/","title":{"rendered":"Elastic\u4e2d\u7684elasticsearch\u6587\u4ef6\u7684\u914d\u7f6e\u9009\u9879"},"content":{"rendered":"<p>\u6ce8\u610f\uff1a\u548c\u00a0Elastic\u7684elasticsearch.yml\u914d\u7f6e\u00a0\u7684\u533a\u522b\uff0c\u8be5\u914d\u7f6e\u6587\u4ef6\u662f\/etc\/sysconfig\/elasticsearch<\/p>\n<p># Elasticsearch\u7684\u5b89\u88c5\u76ee\u5f55<br \/>\nES_HOME=\/usr\/share\/elasticsearch<\/p>\n<p># Elasticsearch Java path,Java\u7684\u5b89\u88c5\u76ee\u5f55<br \/>\nJAVA_HOME=\/usr\/java\/jdk1.8.0_11<\/p>\n<p>&nbsp;<\/p>\n<p># elasticsearch.yml\u7684\u76ee\u5f55<br \/>\nCONF_DIR=\/etc\/elasticsearch<\/p>\n<p># Elasticsearch\u7684\u6570\u636e\u5b58\u653e\u76ee\u5f55\uff0c\u5728elasticsearch.yml\u4e2d\u4e5f\u53ef\u4ee5\u5b9a\u4e49<br \/>\nDATA_DIR=\/var\/lib\/elasticsearch<\/p>\n<p># Elasticsearch logs directory<br \/>\nLOG_DIR=\/var\/log\/elasticsearch<\/p>\n<p># Elasticsearch PID directory<br \/>\nPID_DIR=\/var\/run\/elasticsearch<\/p>\n<p># Additional Java OPTS<br \/>\n#ES_JAVA_OPTS=<\/p>\n<p>#\u6ce8\u610fJAVA_OPTS\u7684\u533a\u522b\uff0cAVA_OPTS\u5927\u591a\u6570\u65f6\u5019\u5bf9\u6574\u4e2a\u673a\u5668\u73af\u5883\u8d77\u4f5c\u7528\uff0c<br \/>\n#\u6240\u4ee5\u6700\u597d\u662f\u4fdd\u7559\u9ed8\u8ba4\u7684JAVA_OPTS\uff0c\u6700\u597d\u7528ES_JAVA_OPTS\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e<br \/>\n#\u6765\u4f5c\u4e3aJAVA_OPTS\u53c2\u6570<\/p>\n<p>#ES_JAVA_OPTS=\u201d\u201d<\/p>\n<p>#\u8bbe\u7f6eES\u7684\u5185\u5b58\u5806\u6709\u4e09\u79cd\u529e\u6cd5<br \/>\n#1\u3001\u901a\u8fc7ES_HEAP_SIZE\u6765\u8bbe\u7f6emin\u3001max\uff0c\u6b64\u65f6\u4e24\u4e2a\u503c\u76f8\u7b49\uff3b\u63a8\u8350\uff3d<br \/>\n#2\u3001\u901a\u8fc7ES_MIN_MEM\u548cES_MAX_MEM\u76f4\u63a5\u8bbe\u7f6e<br \/>\n#3\u3001\u4f7f\u7528ES_JAVA_OPTS\u6765\u8bbe\u7f6e\uff0cES_JAVA_OPTS=\u201d-Xms=512M\u201d,ES_JAVA_OPTS=\u201d-Xmx=512M\u201d<br \/>\n#\u6ce8\u610f\uff1a\u5982\u679c\u503c\u88ab\u540c\u65f6\u8bbe\u7f6e\u65f6\uff0c\u4f18\u5148\u7ea7\u65b9\u6cd53 &gt;\u00a0 \u65b9\u6cd51 &gt; \u65b9\u6cd52<br \/>\n#ES_HEAP_SIZE=512M<br \/>\nES_JAVA_OPTS=\u201d-Xmx128M -Xms128M -Xss128k\u201d<\/p>\n<p>################################<br \/>\n# Elasticsearch service<br \/>\n################################<\/p>\n<p>ES_USER=elasticsearch<br \/>\nES_GROUP=elasticsearch<\/p>\n<p># The number of seconds to wait before checking if Elasticsearch started successfully as a daemon process<br \/>\nES_STARTUP_SLEEP_TIME=5<\/p>\n<p>################################<br \/>\n# System properties<br \/>\n################################<\/p>\n<p>#\u6700\u5927\u6253\u5f00\u7684\u6587\u4ef6\u63cf\u8ff0\u7b26\u6570<br \/>\nMAX_OPEN_FILES=65536<\/p>\n<p>#\u8bbe\u7f6e\u8be5\u503c\u4e3aunlimited \uff0c\u5728elasticsearch.yml\u4e2d\u8bbe\u7f6ebootstrap.mlockall: true<br \/>\n#MAX_LOCKED_MEMORY=unlimited<\/p>\n<p>MAX_MAP_COUNT=262144<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6ce8\u610f\uff1a\u548c\u00a0Elastic\u7684elasticsearch.yml\u914d\u7f6e\u00a0\u7684\u533a\u522b\uff0c\u8be5\u914d\u7f6e\u6587\u4ef6\u662f\/etc\/sysconfig\/elasticsearch # Elasticsearch\u7684\u5b89\u88c5\u76ee\u5f55 ES_HOME=\/usr\/share\/elasticsearch # Elasticsearch Java path,Java\u7684\u5b89\u88c5\u76ee\u5f55 JAVA_HOME=\/usr\/java\/jdk1.8.0_11 &nbsp; # elasticsearch.yml\u7684\u76ee\u5f55 CONF_DIR=\/etc\/elasticsearch # Elasticsearch\u7684\u6570\u636e\u5b58\u653e\u76ee\u5f55\uff0c\u5728elasticsearch.yml\u4e2d\u4e5f\u53ef\u4ee5\u5b9a\u4e49 DATA_DIR=\/var\/lib\/elasticsearch # Elasticsearch logs directory LOG_DIR=\/var\/log\/elasticsearch # Elasticsearch PID directory PID_DIR=\/var\/run\/elasticsearch # Additional Java OPTS #ES_JAVA_OPTS= #\u6ce8\u610fJAVA_OPTS\u7684\u533a\u522b\uff0cAVA_OPTS\u5927\u591a\u6570\u65f6\u5019\u5bf9\u6574\u4e2a\u673a\u5668\u73af\u5883\u8d77\u4f5c\u7528\uff0c #\u6240\u4ee5\u6700\u597d\u662f\u4fdd\u7559\u9ed8\u8ba4\u7684JAVA_OPTS\uff0c\u6700\u597d\u7528ES_JAVA_OPTS\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e #\u6765\u4f5c\u4e3aJAVA_OPTS\u53c2\u6570 #ES_JAVA_OPTS=\u201d\u201d #\u8bbe\u7f6eES\u7684\u5185\u5b58\u5806\u6709\u4e09\u79cd\u529e\u6cd5 #1\u3001\u901a\u8fc7ES_HEAP_SIZE\u6765\u8bbe\u7f6emin\u3001max\uff0c\u6b64\u65f6\u4e24\u4e2a\u503c\u76f8\u7b49\uff3b\u63a8\u8350\uff3d #2\u3001\u901a\u8fc7ES_MIN_MEM\u548cES_MAX_MEM\u76f4\u63a5\u8bbe\u7f6e #3\u3001\u4f7f\u7528ES_JAVA_OPTS\u6765\u8bbe\u7f6e\uff0cES_JAVA_OPTS=\u201d-Xms=512M\u201d,ES_JAVA_OPTS=\u201d-Xmx=512M\u201d #\u6ce8\u610f\uff1a\u5982\u679c\u503c\u88ab\u540c\u65f6\u8bbe\u7f6e\u65f6\uff0c\u4f18\u5148\u7ea7\u65b9\u6cd53 &gt;\u00a0 \u65b9\u6cd51 &gt; \u65b9\u6cd52 #ES_HEAP_SIZE=512M ES_JAVA_OPTS=\u201d-Xmx128M -Xms128M -Xss128k\u201d ################################ # Elasticsearch service ################################ ES_USER=elasticsearch ES_GROUP=elasticsearch [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-27805","post","type-post","status-publish","format-standard","hentry","category-docker"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27805","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=27805"}],"version-history":[{"count":1,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27805\/revisions"}],"predecessor-version":[{"id":27811,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27805\/revisions\/27811"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=27805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=27805"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=27805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}