elasticsearch 集群配置

安装包下载地址:下载中心 - Elastic 中文社区

系统级配置:

使用root登录,配置limits.conf

vi /etc/security/limits.conf

然后添加如下内容: 注意*不要去掉了

* soft nofile 65536
* hard nofile 131072
注:* 代表Linux所有用户名称(比如 hadoop)

需要保存、退出、重新登录才可生效。

vim /etc/security/limits.d/90-nproc.conf 
*          soft    nproc     8192

对于ubuntu用户而言,需要额外配置:

编辑/etc/profile配置文件,在最后添加一行:

ulimit -SHn 65535

要让配置生效:

$ sudo source /etc/profile

sudo: source: command not found

我们直接执行ulimit -SHn 65535命令又会怎么样呢?

$ ulimit -SHn 65535

-bash: ulimit: open files: cannot modify limit: Operation not permitted

$ sudo ulimit -SHn 65535

sudo: ulimit: command not found

普通用户获得root权限后反而提示找不到命令了,该如何解决这个问题呢?

$ sudo -s

# source /etc/profile

使用root登录,配置sysctl.conf,配置对应的虚拟内存大小

vi /etc/sysctl.conf
vm.max_map_count=655360

然后执行:sysctl -p,刷新配置信息

jvm.options配置最大可使用内存:

-Xms8g
-Xmx8g

elasticsearch.conf配置

集群配置
cluster.name: dengta-information
node.name: node-1
network.host: 192.168.2.47
http.port: 9200
cluster.initial_master_nodes: ["node-1"]
#用户密码输入配置
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true

重新开启新的远程连接(使以上配置生效)

插件配置:

ElasticSearch分词器IK安装教程_@来杯咖啡的博客-CSDN博客_elasticsearch ik分词安装

启动es服务

./elasticsearch -d

密码配置:

$ ./bin/elasticsearch-setup-passwords interactive

You will be prompted to enter passwords as the process progresses.
Please confirm that you would like to continue [y/N] y 
Enter password for [elastic]: 
Reenter password for [elastic]: 
Enter password for [apm_system]: 
Reenter password for [apm_system]: 
Enter password for [kibana]: 
Reenter password for [kibana]: 
Enter password for [logstash_system]: 
Reenter password for [logstash_system]: 
Enter password for [beats_system]: 
Reenter password for [beats_system]: 
Enter password for [remote_monitoring_user]: 
Reenter password for [remote_monitoring_user]: 

安装创建问题:ElasticSearch在linux上安装部署 - socket强 - 博客园

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

会发paper的学渣

您的鼓励和将是我前进的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值