您的位置:首页 > 游戏 > 手游 > seo在线教学_有网但是网页打不开是什么原因_海会网络做的网站怎么做优化_网络推广seo怎么弄

seo在线教学_有网但是网页打不开是什么原因_海会网络做的网站怎么做优化_网络推广seo怎么弄

2025/4/21 11:47:18 来源:https://blog.csdn.net/jiaofan_yun/article/details/144519572  浏览:    关键词:seo在线教学_有网但是网页打不开是什么原因_海会网络做的网站怎么做优化_网络推广seo怎么弄
seo在线教学_有网但是网页打不开是什么原因_海会网络做的网站怎么做优化_网络推广seo怎么弄

ElasticSearch-head就是一款能连接ElasticSearch搜索引擎,并提供可视化的操作页面对ElasticSearch搜索引擎进行各种设置和数据检索功能的管理插件,如在head插件页面编写RESTful接口风格的请求,就可以对ElasticSearch中的数据进行增删改查、创建或者删除索引等操作。类似于使用navicat工具连接MySQL这种关系型数据库,对数据库做操作。

1、环境检查

Es-head插件运行需要node环境,确保安装有node,如果未安装,自行安装

node -v npm -v

2、安装运行

# git clone https://github.com/mobz/elasticsearch-head.git
# cp -r elasticsearch-head /opt/

3、安装grunt

# npm install -g grunt

4、安装插件

# cd elasticsearch-head
# yum -y install bzip2
# npm install

5、grunt检查

在elasticsearch-head目录下node_modules/grunt下如果没有grunt二进制程序,需要执行:
npm install grunt --save

6、配置修改

vim Gruntfile.js
###修改Gruntfile.js文件下参数,修改为ES服务器IPconnect: {server: {options: {hostname: '*',port: 9100,base: '.',keepalive: true}}}});
# vim  /opt/elasticsearch-head/_site/app.js
# 原来是http://localhost:9200 ,如果head和ES不在同一个节点,注意修改成ES的IP地址,写成node-1或node-3的IP地址
this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://192.168.65.175:9200";

7、修改es配置文件并重启es

# vim /opt/elasticsearch-7.10.2/config/elasticsearch.yml
# 如果启用了 HTTP 端口,那么此属性会指定是否允许跨源 REST 请求。
http.cors.enabled: true
# 如果 http.cors.enabled 的值为 true,那么该属性会指定允许 REST 请求来自何处。
http.cors.allow-origin: "*"

8、启动插件 elasticsearch-head

npm run start
后台运行:nohup npm run start > /dev/null 2>&1 &
或者进入到/opt/elasticsearch-head/node_modules/grunt/bin目录下启动
./grunt   server   &

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com