一、安装nodejs和rpm
1. su - root
2. yum install epel-release
3. yum install nodejs npm
二、下载并安装elasticsearch-head
1. git clone https://github.com/mobz/elasticsearch-head.git
2. cd elasticsearch-head
3. npm install
4. npm run start
5. open http://localhost:9100 or http://you IP Address:9100
三、安装elasticsearch,修改elasticsearch参数,以便于head插件访问es
1. 在elasticsearch下的elasticsearch.yml下新增一下两行:
http.cors.enabled: true
http.cors.allow-origin: "*"
2. 重启elastsearch
systemctl restart elasticsearch.service
或者
cd /es
./bin/elasticsearch
四、修改es-head的localhost地址
1. cd ./elasticsearch-head #(elasticsearch-head源码文件夹)
2. vim Gruntfile.js
3. Add hostname
connect: {
server: {
options: {
hostname: '0.0.0.0',
port: 9100,
base: '.',
keepalive: true
}
}
}
五、修改head的连接地址
1. cd ./elasticsearch-head #(elasticsearch-head源码文件夹)
2. vim ./_site/app.js
3. 将localhost修改为ESdeIP地址
修改前:this.base_uri = this.config.base_uri;
修改后: this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://you ip address:9200";
六、启动elasticsearch-head
1. cd elasticsearch-head(elasticsearch-head源码目录)
2. ./node_modules/grunt/bin/grunt server
1. su - root
2. yum install epel-release
3. yum install nodejs npm
二、下载并安装elasticsearch-head
1. git clone https://github.com/mobz/elasticsearch-head.git
2. cd elasticsearch-head
3. npm install
4. npm run start
5. open http://localhost:9100 or http://you IP Address:9100
三、安装elasticsearch,修改elasticsearch参数,以便于head插件访问es
1. 在elasticsearch下的elasticsearch.yml下新增一下两行:
http.cors.enabled: true
http.cors.allow-origin: "*"
2. 重启elastsearch
systemctl restart elasticsearch.service
或者
cd /es
./bin/elasticsearch
四、修改es-head的localhost地址
1. cd ./elasticsearch-head #(elasticsearch-head源码文件夹)
2. vim Gruntfile.js
3. Add hostname
connect: {
server: {
options: {
hostname: '0.0.0.0',
port: 9100,
base: '.',
keepalive: true
}
}
}
五、修改head的连接地址
1. cd ./elasticsearch-head #(elasticsearch-head源码文件夹)
2. vim ./_site/app.js
3. 将localhost修改为ESdeIP地址
修改前:this.base_uri = this.config.base_uri;
修改后: this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://you ip address:9200";
六、启动elasticsearch-head
1. cd elasticsearch-head(elasticsearch-head源码目录)
2. ./node_modules/grunt/bin/grunt server