1、检测是否已经安装的elasticsearchpython
ps aux|grep elasticsearch.
2、下载elasticsearch.tar.gz并上传至服务器usr/local/文件夹下bootstrap
3、解压安装
进入usr/local/文件夹下解压服务器
tar -zxvf elasticsearch-5.6.7.tar.gz
4、修改配置文件elasticsearch
1:进入以下目录code
cd /usr/local/elasticsearch/config vi elasticsearch.yml 添加下面两行 bootstrap.memory_lock: false bootstrap.system_call_filter: false
保存io
建立python用户(root用户不能启动elasticsearch)ast
useradd python
passwd python
按提示输入两次密码:python登录
而后受权:后台
cd /usr/local
sudo chown -R python:python elasticsearch
切换用户配置
su - python
5、启动elasticsearch
1:控制台启动(ctrl+c 后中止):
./bin/elasticsearch
2:后台启动:
./bin/elasticsearch -d
```
6、常见问题
1:can not run elasticsearch as root
Elasticsearch版本> = 5.0.0时,是不可用超级管理员运行Elasticsearch的,退出管理员帐号,切换成普通用户登陆便可
具体修改配置,请看修改配置文件第3项
4:bootstrap checks failed system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
具体修改配置,请看修改配置文件第4项
转