此篇文章讲的非常详细.可以参考
遇到的常见问题:
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
解决:切换到root用户,编辑limits.conf 添加类似如下内容
vi /etc/security/limits.conf
添加如下内容:
-
soft nofile 65536
-
hard nofile 131072
-
soft nproc 2048
-
hard nproc 4096
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解决:切换到root用户修改配置sysctl.conf
vi /etc/sysctl.conf
添加下面配置:
vm.max_map_count=655360
执行命令:
sysctl -p
[3]: 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
cluster.name: “docker-cluster”
network.host: 0.0.0.0
custom config
node.name: "node-1"
discovery.seed_hosts: ["127.0.0.1", "[::1]"]
cluster.initial_master_nodes: ["node-1"]
开启跨域访问支持,默认为false
http.cors.enabled: true
跨域访问允许的域名地址,(允许所有域名)以上使用正则
http.cors.allow-origin: /.*/