Centos7安装Elasticsearch7.6.0

安装Elasticsearch

官网:https://www.elastic.co/cn/
把下载的压缩包传递到liux

解压:tar -zxvf 压缩包名称

vim /etc/sysctl.conf,最后一行添加:
vm.max_map_count=2621441
接着执行 /sbin/sysctl -p  使文件生效
vim /etc/security/limits.conf 添加:
* soft nofile 65535
* hard nofile 65535
此文件修改后需要重新登录用户,才会生效

修改es配置

vim /home/axs-es/elasticsearch/elasticsearch-7.6.0/config/elasticsearch.yml
在最后一行添加:
cluster.initial_master_nodes: ["node-1"]
node.name: node-1
#设置为0.0.0.0表示所有用户都可以访问。
network.host: 0.0.0.0
#启动端口
http.port: 9200
#跨域请求
http.cors.enabled: true
http.cors.allow-origin: "*"
#支持跨域请求类型
http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE
#http.cors.allow-methods: "GET"
#支持跨域请求头类型
http.cors.allow-headers: "X-Requested-With, Content-Type, Content-Length, X-User"

启动es:
进入文件夹所在的bin目录:./elasticsearch

安装elasticsearch-head

安装nodejs

curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
或者
curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash -

然后
yum -y install nodejs
最后查看版本
node -v

安装git

yum install -y git
查看git版本
git --version

安装elasticsearch-head

git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head
npm install
npm run start
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值