解决ES安装过程中遇到的问题
匿名用户1572018-05-14 18:52
1、can not run elasticsearch as root
切换到非root用户
2、main ERROR Could not register mbeans java.security.AccessControlException: access denied ("javax.management.MBeanTrustPermission" "register")
改变elasticsearch文件夹所有者到当前用户
sudo chown -R noroot:noroot elasticsearch
3、max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
sudo vi /etc/sysctl.conf
添加下面配置:
vm.max_map_count=655360
并执行命令:
sudo sysctl -p
4、max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
sudo vi /etc/security/limits.conf
添加如下内容:
* soft nofile 65536
* hard nofile 131072
注意:如果不生效,请重新链接Linux端即可
安装后允许外网访问
vi /{es_home}/config/elasticsearch.yml
#增加(允许外网访问)
network.host: 0.0.0.0
#解决跨域
http.cors.enabled: true
http.cors.allow-origin: "*"
