elasticsearch是一款知名的开源全文搜索引擎,应用普遍,因项目须要,须要使用elasticsearch知足应用内搜索,地图搜索。目前还在线上试运营,根据本身的使用部署过程,分享一下经验,梳理一下踩过的坑。java
最低版本java-jdk 1.8,我本地选择jdk-1.8.0_191.jdkelasticsearch
安装完成以后配置环境变量ui
查看java版本搜索引擎
java -version openjdk version "1.8.0_191" OpenJDK Runtime Environment (build 1.8.0_191-b12) OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)
版本选择code
eleasticsearch v6.5.4 ,最新稳定版本,选择最新稳定版虽然用的人很少,but who care索引
下载eleasticsearch进程
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.5.4.tar.gz
安装配置ip
项目配置到:data/目录部署
root @ localhost in /data/elasticsearch-6.5.4 [17:18:23] $ l 总用量 4.8M drwxrwxr-x 9 euser euser 198 12月 11 11:26 . drwxr-xr-x. 7 root root 90 1月 16 16:35 .. drwxrwxr-x 3 euser euser 4.0K 12月 11 11:13 bin drwxrwxr-x 2 euser euser 178 12月 11 11:32 config drwxrwxr-x 3 euser euser 19 12月 11 11:25 data -rwxrwxr-x 1 euser euser 4.3M 12月 6 22:30 elasticsearch-analysis-ik-6.5.4.zip drwxrwxr-x 3 euser euser 4.0K 11月 30 08:02 lib -rwxrwxr-x 1 euser euser 14K 11月 30 07:55 LICENSE.txt drwxrwxrwx 2 euser euser 8.0K 2月 11 01:30 logs drwxrwxr-x 28 euser euser 4.0K 11月 30 08:02 modules -rwxrwxr-x 1 euser euser 395K 11月 30 08:01 NOTICE.txt drwxrwxr-x 3 euser euser 25 12月 11 11:29 plugins -rwxrwxr-x 1 euser euser 8.4K 11月 30 07:55 README.textile
配置data:it
/data/elasticsearch/data
配置log:
/data/elasticsearch/logs
配置其余项说明
遇到的错误说明
不能使用root用户启动 添加新用户
useradd euser
添加用户到用户组
groupadd euser -g euser
切换到对应的用户
sudo euser
以守护进程启动
./data/elasticsearch/bin/elasticsearch -d
其余错误根据状况本身配置解决