1 [root@CloudGame esins2]# cat elasticsearch.yml 2 # ======================== Elasticsearch Configuration ========================= 3 # 4 # NOTE: Elasticsearch comes with reasonable defaults for most settings. 5 # Before you set out to tweak and tune the configuration, make sure you 6 # understand what are you trying to accomplish and the consequences. 7 # 8 # The primary way of configuring a node is via this file. This template lists 9 # the most important settings you may want to configure for a production cluster. 10 # 11 # Please see the documentation for further information on configuration options: 12 # <http://> 13 # 14 # ---------------------------------- Cluster ----------------------------------- 15 # 16 # Use a descriptive name for your cluster: 17 # 18 cluster.name: tksearch 19 # 20 # ------------------------------------ Node ------------------------------------ 21 # 22 # Use a descriptive name for the node: 23 # 24 node.name: node2 25 # 26 # Add custom attributes to the node: 27 # 28 # node.rack: r1 29 # 30 node.master: false 31 # ----------------------------------- Paths ------------------------------------ 32 # 33 # Path to directory where to store the data (separate multiple locations by comma): 34 # 35 path.data: /home/AppData/es/esins2/data 36 # 37 # Path to log files: 38 # 39 path.logs: /home/AppData/es/esins2/logs 40 # 41 # ----------------------------------- Memory ----------------------------------- 42 # 43 # Lock the memory on startup: 44 # 45 # bootstrap.mlockall: true 46 # 47 # Make sure that the `ES_HEAP_SIZE` environment variable is set to about half the memory 48 # available on the system and that the owner of the process is allowed to use this limit. 49 # 50 # Elasticsearch performs poorly when the system is swapping the memory. 51 # 52 # ---------------------------------- Network ----------------------------------- 53 # 54 # Set the bind address to a specific IP (IPv4 or IPv6): 55 # 56 network.host: 0.0.0.0 57 # 58 # Set a custom port for HTTP: 59 # 60 http.port: 9201 61 # 62 # For more information, see the documentation at: 63 # <http://> 64 # 65 transport.tcp.port: 9301 66 # --------------------------------- Discovery ---------------------------------- 67 # 68 # Pass an initial list of hosts to perform discovery when new node is started: 69 # The default list of hosts is ["127.0.0.1", "[::1]"] 70 # 71 discovery.zen.ping.unicast.hosts: ["127.0.0.1:9300"] 72 # 73 # Prevent the "split brain" by configuring the majority of nodes (total number of nodes / 2 + 1): 74 # 75 # discovery.zen.minimum_master_nodes: 3 76 # 77 # For more information, see the documentation at: 78 # <http://> 79 # 80 # ---------------------------------- Gateway ----------------------------------- 81 # 82 # Block initial recovery after a full cluster restart until N nodes are started: 83 # 84 # gateway.recover_after_nodes: 3 85 # 86 # For more information, see the documentation at: 87 # <http://> 88 # 89 # ---------------------------------- Various ----------------------------------- 90 # 91 # Disable starting multiple nodes on a single system: 92 # 93 node.max_local_storage_nodes: 2 94 # 95 # Require explicit names when deleting indices: 96 # 97 # action.destructive_requires_name: true View Code
3. 由于配置中指定了配置文件和数据的路径了,所以,要在相应的路径下创建所需的目录。