centos上es安装

1 解压
安装ES,将es-5.4.3.tar.gz文件拷贝到/home/server下,解压:
unzip elasticsearch-5.4.3.zip

2 部署启动ES
2.1修改/etc/security/limits.conf: 添加以下内容
* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096
root soft nofile 65536:
root hard nofile 65536

2.2修改 /etc/sysctl.conf:添加以下内容。
vm.max_map_count=655360
fs.file-max=655362
添加后执行
# sysctl -p //使配置生效。

2.3 建立用户elastic:
[root@sx-01] # groupadd elastic
[root@sx-01] # useradd elastic -g elastic -p elasticsearch
[root@sx-01] # cd /home/server
[root@sx-01] # chown -R elastic elasticsearch-5.4.3/
[root@sx-01] # su elastic
[elastic@sx-01]chmod 744 -R elasticsearch-5.4.3/

2.4 elasticsearch配置及启动:
系统配置修改完成后,修改elasticsearch-5.4.3配置
[root@rlsb config]# cd /home/server/elasticsearch-5.4.3/config
[root@rlsb config]# vim elasticsearch.yml

cluster.name: elastic-x
network.host: 本机ip
http.port: 9209
transport.tcp.port: 9309
http.cors.enabled: true
http.cors.allow-origin: ""
action.auto_create_index: .security,.monitoring
,.watches,.triggered_watches,.watcher-history*
如图所示:

2.5 ES启动
[root@sx-01]#cd /home/server/elasticsearch-5.4.3/bin
[root@sx-01 bin]# su elastic
$ ./elasticsearch -d

3 启动验证ES
访问es地址http://{ip: 9209},出现类似下面的json数据,表示es启动正常。注:ip和端口可通过运行es状态命令查看

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值