elastisearch 安装

一、安装elasticsearch-rtf

1.jdk 1.8 安装教程 :https://blog.csdn.net/weixin_36634753/article/details/101079873

2.下载elastisearch-rtf 加了中文搜索:https://github.com/TBirdsWR/elasticsearch-rtf (最好下载zip包)

3.上传服务器上解压 解压命令:unzip 包名

4.修改权限 chmod -R 755 包名

5.新建用户 用户组

 groupadd es
    useradd es -g es -p es
    chown -R es:es es/elasticsearch-rtf
    su es

6.修改属主chown -R  用户名:用户组 包名 (不能是root,因为elasticsearch启动不能用root用户)

7.如果内存不大,要修改config/jvm.options内存大小,512m

8.在root用户,编辑/etc/security/limits.conf添加类似如下内容

    ~ vim /etc/security/limits.conf
    修改内容:* soft nofile 65536

9.然后重新登录一下用户输入ulimit -Hn

10.在切回root用户  vim /etc/sysctl.conf 在最后面添加

  
     vm.max_map_count=262144
     

11. 查看是否修改成功sysctl -a|grep vm.max_map_count

12.修改外网访问权限 在/config/elasticsearch.yml添加下面配置

network.host: 0.0.0.0
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-methods: OPTIONS,HEAD,GET,POST,PUT,DELETE
http.cors.allow-headers: "X-Requested-With,Content-Type,Content-Length, X-User"

13.到bin下启动

14.访问上面红框里的地址(记得要添加端口号)

二、安装elasticsearch-head

1.下载搜索界面 https://github.com/TBirdsWR/elasticsearch-head

2.unzip 解压

需要使用node 先安装node

安装node教程https://blog.csdn.net/weixin_36634753/article/details/101079873

3.

然后切回刚才下载的elasticsearch-head 目录执行

npm install
npm run start

4.访问地址

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值