curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.2.tar.gz
[hadoop@hadoop004 config]$ vim elasticsearch.yml
cluster.name: my-application
path.data: /home/hadoop/app/elasticsearch-6.6.2/tmp/data
path.logs: /home/hadoop/app/elasticsearch-6.6.2/tmp/log
network.host: 0.0.0.0
http.port: 9200
# 是否支持跨域
http.cors.enabled: true
# *表示支持所有域名
http.cors.allow-origin: "*"
[hadoop@hadoop004 bin]$ ./elasticsearch
报错了
ERROR: [2] bootstrap checks failed
[1]: max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2019-06-05T15:20:28,973][INFO ][o.e.n.Node ] [U-FkatF] stopping ...
[2019-06-05T15:20:28,991][INFO ][o.e.n.Node ] [U-FkatF] stopped
[2019-06-05T15:20:28,991][INFO ][o.e.n.Node ] [U-FkatF] closing ...
[2019-06-05T15:20:29,002][INFO ][o.e.n.Node ] [U-FkatF] closed
[2019-06-05T15:20:29,005][INFO ][o.e.x.m.p.NativeController] [U-FkatF] Native controller process has stopped - no new native processes can be started
[root@hadoop004 ~]# vi /etc/security/limits.conf
添加
* soft nofile 65536
* hard nofile 65536
* soft nproc 4096
* hard nproc 4096
[root@hadoop004 ~]# vim /etc/sysctl.conf
vm.max_map_count = 655360
[root@hadoop004 ~]# sysctl -p
[root@hadoop004 ~]# reboot
重新启动,就OK了!!