기타

windows 에서 elasticsearch 설치하기

자유프로그램 2015. 1. 2. 16:39
반응형

windows 에서 chocolatey 를 사용하여  elasticsearch 설치하기


테스트 환경 : windows 7 64bit


참고 : https://chocolatey.org/       ==> chocolatey 홈페이지

         https://chocolatey.org/packages/elasticsearch

         http://elasticsearch-users.115913.n3.nabble.com/new-windows-install-td3021742.html



1. chocolatey 를 설치하기 

     -- 위의 chocolatey 홈페이지에 나온것 처럼 설치하면된다.


      -- 즉, 아랫명령어를 복사한후, 관리자모드 명령프롬프트창에 붙여넣고 실행하면 , chocolatey 설치된다.


@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin



2. elasticsearch 설치하기.






3. 윈도우즈 명령창에서 curl 이용하여 data 입력시 주의사항.


Its a windows command line thing. Use " and """ where you want a ". 


curl -XPUT "http://localhost:9200/twitter/user/kimchy" -d "{ """name""" : 

"""Shay Banon""" }" 


resulted in the following. 


{"ok":true,"_index":"twitter","_type":"user","_id":"kimchy","_version":1}



curl -XPUT localhost:9200/my_index/my_type/1 -d "{"""name""":"""park""","""id""":34}"




4. 입력 결과 확인하기


curl GET localhost:9200/my_index/my_type/_search

















반응형