安装包下载地址:下载中心 - 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]: