elasticsearch安装
一、下载:
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.1.tar.gz
二、解压:
tar zxvf elasticsearch-5.6.1.tar.gz
三、改名:
mv elasticsearch-5.6.1 elasticsearch
四、修改配置文件:
vi elasticsearch/config/elasticsearch.yml
五、添加已下配置:(请根据自己服务器进行配置)
http.port:9200node.name: node1cluster.name: es_clusternetwork.host: 59.110.215.36.222 bootstrap.memory_lock: falsepath.data: /home/elasticsearch/datapath.logs: /home/elasticsearch/logs
六、配置足够内存:
vi /home/elasticsearch/config/jvm.options
七、配置环境变量:
vi /etc/profile
添加:export ES_HOME=/home/elasticsearch
八、添加独立用户
groupadd elsearchuseradd elsearch -g elsearchchown -R elsearch:elsearch /home/elasticsearch
九、启动
su elsearchcd /home/elasticsearch/bin./elasticsearch
十、测试
http://: / 如下提示表示安装成功
elasticsearch安装分词器
1.查找相应版本的
2.下载zip包,本地解压 3.进入根目录执行mvn package 4.拷贝和解压release下的文件#{project_path}/elasticsearch-analysis-ik/target/releases/elasticsearch-analysis-ik-*.zip 到你的 elasticsearch 插件目录,如: plugins/ik
custom是自定义词库文件夹,内文件扩展名为.dic。
5.如需自定义分词,更改plugins/ik/config/IKAnalyzer.cfg.xml
6.重启elasticsearch