ElasticSearch 5.0及head插件安装
一、elasticsearch安装配置
1.官网下载源码包
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.0.0.tar.gz
2.解压安装
useradd elasticsearch
tar xf elasticsearch-5.0.0.tar.gz -C /usr/local
cd /usr/local
ln -sv elasticsearch-5.0.0 elasticsearch
mkdir -pv /data/elasticsearch/{data,logs}
chown -R elasticsearch.elasticsearch /data/elasticsearch
3.修改配置文件
cat /usr/local/elasticsearch/config/elasticsearch.yml
path.data:/data/elasticsearch/data
path.logs:/data/elasticsearch/logs
network.host:192.168.1.12
http.cors.enabled:true
http.cors.allow-origin:"*"
4.修改系统参数
cat /etc/security/limits.conf
* soft nproc 65536
* hard nproc 65536
* soft nofile 65536
* hard nofile 65536
cat /etc/sysctl.conf
vm.max_map_count= 262144
sysctl -p
5.启动服务
su - elasticsearch -c "/usr/local/elasticsearch/bin/elasticsearch &"
浏览器访问:http://192.168.1.12:9200/
二、head插件的安装
在5.0版本中不支持直接安装head插件,需要启动一个服务
1.下载插件安装
git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head
npm install
在elasticsearch-head目录下node_modules/grunt下如果没有grunt二进制程序,需要执行
cd elasticsearch-head
npm install grunt --save
2.修改配置
修改elasticsearch-head下Gruntfile.js文件,默认监听在127.0.0.1下9200端口
3.启动服务
/usr/local/elasticsearch-head/node_modules/grunt/bin/grunt server
浏览器访问 http://192.168.1.12:9100/
错误:
const escapeStringRegexp = require('escape-string-regexp');
解决:1 在项目根目录下 npm install --save escape-string-regexp
2 删除你项目的/node_module
,然后重新执行npm install
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架