集群配置-安装es

一、下载es安装包

https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.2.tar.gz

二、解压安装包

[hadoop@hadoop4 softwares]$ tar -zxvf elasticsearch-6.3.2.tar.gz -C /usr/local/modules/

三、创建es用户和组

[root@hadoop4 elasticsearch-6.3.2]# groupadd eszu
[root@hadoop4 elasticsearch-6.3.2]# useradd esuser -g eszu -p 123456

四、修改es目录所属权限

chown -R esuser:eszu ./elasticsearch-6.3.2/

五、启动es

[esuser@hadoop4 elasticsearch-6.3.2]$ ./bin/elasticsearch

报错一下错误
[esuser@hadoop4 elasticsearch-6.3.2]$ ./bin/elasticsearch
[2020-02-05T05:11:23,021][WARN ][o.e.b.JNANatives ] unable to install syscall filter:
java.lang.UnsupportedOperationException: seccomp unavailable: requires kernel 3.5+ with CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER compiled in
解决办法 编辑
[esuser@hadoop4 config]$ vim elasticsearch.yml

[esuser@hadoop4 config]$ vim elasticsearch.yml
bootstrap.memory_lock: false
bootstrap.system_call_filter: false

重启 es

[esuser@hadoop4 elasticsearch-6.3.2]$ ./bin/elasticsearch

在这里插入图片描述
六、访问es的9200端口

[esuser@hadoop4 ~]$  curl 127.0.0.1:9200

在这里插入图片描述
七、es后台启动命令

./bin/elasticsearch -d

八、查看 es进程

ps -ef | grep elastic

九、配置远程访问

[esuser@hadoop4 config]$ vim elasticsearch.yml 
network.host: 192.168.56.131
#
# Set a custom port for HTTP:
#
http.port: 9200

启动es出现一下错误
在这里插入图片描述
解决第一个错误

[root@hadoop4 ~]# vim /etc/security/limits.conf 
esuser soft nofile 65536
esuser hard nofile 65536
esuser soft nproc 4096
esuser hard nproc 4096

解决第二个错误

vim /etc/security/limits.d/90-nproc.conf
esuser     soft    nproc     4096

解决第三个错误

[root@hadoop4 limits.d]# vim /etc/sysctl.conf
vm.max_map_count=655360

执行一下命令生效

sysctl -p

在这里插入图片描述
十、安装Head插件在这里插入图片描述
十一、安装git
yum -y install git
十二、git下载head插件

[root@hadoop4 hadoop]# git clone git://github.com/mobz/elasticsearch-head.git

十三、下载安装npm
详见
https://blog.csdn.net/qq_37554565/article/details/104199219
十四、安装elasticsearch-head的依赖包

[root@hadoop4 local]# npm install -g grunt-cli

十五、安装cnpm
因为npm安装依赖包太慢(都是国外的),所以使用淘宝的镜像吧,安装cnpm

npm install -g cnpm --registry=https://registry.npm.taobao.org
[root@hadoop4 ~]# ln -s /usr/local/modules/node-v4.4.7-linux-x64/bin/cnpm /usr/local/bin/cnpm

安装结束后,查看cnpm版本

cnpm -v
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值