赞
踩
如果想要添加账户密码,只需要在config/elasticsearch.yml中添加下面两个配置:
xpack.security.enabled: true xpack.security.transport.ssl.enabled: true
- [root@hecs-292215 ~]# su es
- [es@hecs-292215 root]$ cd ~
- [es@hecs-292215 ~]$ pwd
- /home/es
- [es@hecs-292215 ~]$ ls
- elasticsearch
- [es@hecs-292215 ~]$ cd elasticsearch/
- [es@hecs-292215 elasticsearch]$ ls
- data elasticsearch-7.12.0 elasticsearch-7.12.0-linux-x86_64.tar.gz logs
- [es@hecs-292215 elasticsearch]$ cd elasticsearch-7.12.0
- [es@hecs-292215 elasticsearch-7.12.0]$ ls
- bin config jdk lib LICENSE.txt logs modules NOTICE.txt plugins README.asciidoc
- [es@hecs-292215 elasticsearch-7.12.0]$ cd conf
- bash: cd: conf: No such file or directory
- [es@hecs-292215 elasticsearch-7.12.0]$ ls
- bin config jdk lib LICENSE.txt logs modules NOTICE.txt plugins README.asciidoc
- [es@hecs-292215 elasticsearch-7.12.0]$ cd config/
- [es@hecs-292215 config]$ ls
- elasticsearch.yml jvm.options jvm.options.d log4j2.properties role_mapping.yml roles.yml users users_roles
- [es@hecs-292215 config]$ pwd
- /home/es/elasticsearch/elasticsearch-7.12.0/config
- [es@hecs-292215 config]$ vim elasticsearch.yml
上面两个配置表示启用x-pack验证插件。
ps -ef|grep elastic:查看进程号
kill -9 pid:杀掉进程
bin目录下:./elasticsearch -d
检查ES启动状态:curl ip:9200
bin目录下:./elasticsearch-setup-passwords interactive
内置的用户:
elastic:内置超级用户
kibana_system:仅可用于kibana用来连接elasticsearch并与之通信, 不能用于kibana登录;(kibana配置文件中使用)。
logstash_system:用于Logstash在Elasticsearch中存储监控信息时使用;(logstash配置文件中使用)。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。