elasticsearch、head插件、kibina插件、ik插件 windows安裝


一.elasticsearch 安裝

  官網下載 選擇歷史版本5.5.0 安裝即可,運行.bat文件

  

 

二.kibana 

  同es,運行.bat文件 5.5.0.x86版本,沒找到64位的

三.ik 分詞器

  1.下載 https://github.com/medcl/elasticsearch-analysis-ik   (下載源碼,有pom文件那個)

  2.解壓並進入elasticsearch-analysis-pinyin-master目錄,mvn打包(沒有安裝maven的自行安裝),運行命令:mvn package

  3.打包成功以后, 會生成一個target文件夾, 在elasticsearch-analysis-ik-master/target/releases目錄下, 找到elasticsearch-analysis-ik-5.1.1.zip, 這就是我們需要的安裝文件; 解壓elasticsearch-analysis-ik-5.1.1.zip, 並將內容拷貝到elasticsearch安裝目錄的plugins/ik目錄下(在plugins目錄下新建ik文件夾)

  4.遠程加載自定義新詞

    方式1:遠程加載

     a.啟動tomcat,webapp 目錄下ROOT目錄測試,新建caolihua.txt (用notepad++另存為UTF-8編碼,無BOM格式,不然windows加載,控制台打印是亂碼;同時修改F:\elasticsearch-5.5.0\config\jvm.options  的-Dfile.encoding=GBK,不然控制台日志中文亂碼)

     b. 配置F:\elasticsearch-5.5.0\plugins\ik\config\IKAnalyzer.cfg.xml,<entry key="remote_ext_dict">http://localhost:8080/caolihua.txt</entry>  

     #es實時監聽 詞庫,可以看到控制打印新增的詞;

     

 

     #自己配置一個服務,可以使得用戶端重新自定義業務詞庫

 

四、head插件

  

es5以上版本安裝head需要安裝node和grunt(之前的直接用plugin命令即可安裝)

(一)從地址:https://nodejs.org/en/download/ 下載相應系統的msi,雙擊安裝。

(二)安裝完成用cmd進入安裝目錄執行 node -v可查看版本號

(三)執行 npm install -g grunt-cli 安裝grunt ,安裝完成后執行grunt -version查看是否安裝成功,會顯示安裝的版本號

(四)開始安裝head
① 進入安裝目錄下的config目錄,修改elasticsearch.yml文件.在文件的末尾加入以下代碼

http.cors.enabled: true http.cors.allow-origin: "*" node.master: true node.data: true

然后去掉network.host: 192.168.0.1的注釋並改為network.host: 0.0.0.0,去掉cluster.name;node.name;http.port的注釋(也就是去掉#)

②雙擊elasticsearch.bat重啟es
③在https://github.com/mobz/elasticsearch-head中下載head插件,選擇下載zip

④解壓到指定文件夾下,G:\elasticsearch-5.5.0\elasticsearch-head-master  進入該文件夾,修改G:\elasticsearch-5.5.0\elasticsearch-head-master\Gruntfile.js 在對應的位置加上hostname:'*'

⑤在G:\elasticsearch-5.5.0\elasticsearch-head-master  下執行npm install 安裝完成后執行grunt server 或者npm run start 運行head插件,如果不成功重新安裝grunt。成功如下

⑥瀏覽器下訪問http://localhost:9100/

成功。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM