Elasticsearch 弹性搜索(二)单机配制

Querida ·
更新时间:2024-09-20
· 624 次阅读

配制 # 编辑配制文件 vim /usr/local/es1/config/elasticsearch.yml xpack.ml.enabled: false network.host: 0.0.0.0 http.port: 8301 #memory bootstrap.memory_lock: false bootstrap.system_call_filter: false 启动

注意:非常吃CPU,其次是内存,单核,2G表示OVER!
用虚拟机吧

# 尝试启动 /usr/local/es1/bin/elasticsearch # 错误 [1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535] [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] [3]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_maste r_nodes] must be configured # [1]:max file descriptors sudo vim /etc/security/limits.conf # 添加: * soft nofile 65536 * hard nofile 131072 # 重启 sysctl -p [2]: max virtual memory sudo vim /etc/sysctl.conf # 添加 vm.max_map_count=362144 [3]: the default discovery settings are unsuitable vim /home/parallels/SysSoftware/es1/config/elasticsearch.yml # 取消注释 cluster.initial_master_nodes: ["node-1", "node-2"] cluster.initial_master_nodes: ["node-1"] 测试 curl http://127.0.0.1:8301 重启

可能用到的
shutdown -r now


作者:ipuxin(壹朴心)



弹性 elasticsearch

需要 登录 后方可回复, 如果你还没有账号请 注册新账号