准备工作 ### 添加一个额外用户用以启动 Ela 因为Ela不支持root启动adduser tmp## 设置密码passwd tmp## 添加授权文件的写权限chmod -v u+w /etc/s
准备工作
### 添加一个额外用户用以启动 Ela 因为Ela不支持root启动adduser tmp## 设置密码passwd tmp## 添加授权文件的写权限chmod -v u+w /etc/sudoers## 修改授权文件 添加tmp用户的授权 vi /etc/sudoers## Allow root to run any commands anywher root ALL=(ALL) ALL tmp ALL=(ALL) ALL #这是你新添加的用户 tmp## 保存退出:wq## 收回 授权文件的写权限chmod -v u-w /etc/sudoers### 修改系统文件的打开限制vi /etc/security/limits.conf ## 添加内容:* soft nofile 65536* hard nofile 131072* soft nproc 2048* hard nproc 4096## 保存退出 :wq### 修改系统配置vi /etc/sysctl.conf ## 添加内容:vm.max_map_count=655360## 保存退出:wq## 生效sysctl -p## 再退出一次登录### =======================================================### 下载最新版的 Ela :wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.tar.gz## 解压出来tar -zxvf elasticsearch-5.5.0.tar.gz## 修改配置文件,以便外网可以访问:vi elasticsearch-5.5.0/config/elasticsearch.yml## 添加内容如下:network.host: 0.0.0.0transport.tcp.port: 9300transport.tcp.compress: true## 切换用户 su tmp## 使用新用户 tmp 启动Ela: cd elasticsearch-5.5.0/bin./elasticsearch -d
RPM 安装方式:
https://www.elastic.co/cn/downloads/elasticsearch
启动:
systemctl start elasticsearch
Elasticsearch 官方地址: https://www.elastic.co/downloads/elasticsearch