ES使用笔记

1. 启动

./bin/elasticsearch

 查看启动结果

curl http://localhost:9200/

 查看其他信息

curl http://localhost:9200/_cat
//查看健康信息
[root@VM-32-4-centos home]# curl http://localhost:9200/_cat/health 1621865421 14:10:21 elasticsearch green 1 1 0 0 0 0 0 0 - 100.0%
//当前ES集群的master节点信息 [root@VM-32-4-centos home]# curl http://localhost:9200/_cat/master QNv2_NZCSfqgRKXunmA9JQ 127.0.0.1 127.0.0.1 VM-32-4-centos
//显示当前ES集群的所有节点信息 [root@VM-32-4-centos home]# curl http://localhost:9200/_cat/nodes 127.0.0.1 30 96 4 0.31 0.32 0.22 cdfhilmrstw * VM-32-4-centos
//查看已经安装的插件 [root@VM-32-4-centos home]# curl http://localhost:9200/_cat/plugins

 插件安装

./elasticsearch-plugin install analysis-icu

node安装:

https://nodejs.org/en/download

然后配置node的环境变量

export NODE_HOME=/home/hadoop/es/elasticsearch-6.0.1/node
export PATH=$PATH:$NODE_HOME/bin
export NODE_PATH=$NODE_HOME/lib/node_modules

source /etc/profile

head插件安装方式:

https://github.com/mobz/elasticsearch-head

elasticsearch-head

    不能放在elasticsearch的 plugins、modules 目录下
不能使用 elasticsearch-plugin install 直接启动elasticsearch即可 安装 elasticsearch-head 修改 elasticsearch/config/elasticsearch.yml 添加 http.cors.enabled: true http.cors.allow-origin: "*" 下载 elasticsearch-head 或者 git clone 到随便一个文件夹 安装nodejs cd /path/to/elasticsearch-head npm install -g grunt-cli npm install --ignore-script npm run start http://localhost:9100/

 

posted @ 2021-05-25 11:06  dsfsadfdgd  阅读(48)  评论(0)    收藏  举报