将本机host 配置其中
10.20.26.96 node-1tar zxvf elasticsearch.tgz -C 指定目录
注意: 不修改配置,是不可以外网访问的,如下属性都是必须要配置的
#node.name: node-1 node.name: node-1 #network.host: 192.168.0.1 network.host: node-1 #http.port: 9200 http.port: 9200 # 允许跨域访问 http.cors.enabled: true http.cors.allow-origin: "*" path.data: /home/elasticsearch/deploy/elasticsearch-7.3.2/data path.logs: /home/elasticsearch/deploy/elasticsearch-7.3.2/logs # 快照路径 path.repo: /home/elasticsearch/deploy/elasticsearch-7.3.2/snapshots cluster.initial_master_nodes: ['node-1'] ##优化参数 indices.memory.index_buffer_size: 20% indices.query.bool.max_clause_count: 100000000注意 加上 “-d” 表示后台启动
./elasticsearch.sh -d浏览器中输入: