-
解压与配置等:略
-
elasticsearch在Linux上无法使用root账号启动,并且普通账号无法使用root账号的jdk
方案:切换root账号,输入一下命令:sudo chown -R [用户名] {jdk安装路径}
-
普通用户下输入./elasticsearch报错:java.nio.file.AccessDeniedException
同样是权限问题,输入一下命令sudo chown -R [用户名] {elasticsearch安装路径}
- 报错:max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
网上的资料有些坑爹,虽然讲的大致不差,但关键的地方没讲,所以用不了,正确方法是:
// 切换root账号; // vim /etc/security/limits.conf // 追加一下内容,username为启动elasticsearch的用户: [username] soft nofile 65536 [username] hard nofile 65536 // 退出vi编辑器,调用"ulimit -Hn"命令,检查"硬限制"数值是否已经改成65535
- 报错:max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
-
报错: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
// 使用root账号,vi /etc/sysctl.conf // 追加:vm.max_map_count = 655360 // 退出编辑,执行:"sysctl -p"
-
外部主机访问不到elasticsearch服务
防火墙问题:// 关闭防火墙 systemctl stop firewalld.service
关于安装jdk之后java命令不生效的处理
source /etc/profile