一、下载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