** This blog is written by Lee Jae Sun, TA for the GIST "Database System (EC4204-01)". This was developed to support a Indexing module thought by Prof. Suman Pandey.
이번 포스트에서는 검색 및 분석 업무를 수행할 수 있는 강력한 도구인 Elasticsearch에 대해서 알아보고 이를 설치하는 방법을 알아보도록 하겠습니다.
In this post, we'll learn about Elasticsearch, a powerful tool for search and analytics, and how to install it.
What is the Elasticsearch?
Elasticsearch는 오픈소스 검색 소프트웨어인 Apache Lucene를 기반으로 JAVA로 작성된 RESTful 검색 및 분석 엔진입니다. Elasticsearch 또한 오픈소스이며, 빠른 검색 기능과 넓은 확장성을 포함하여 다양한 기능을 제공합니다.
Elasticsearch is a RESTful search and analytics engine written in JAVA based on the open-source search software Apache Lucene. Elasticsearch is also open source and offers many features, including fast search capabilities and wide scalability.
Installation
우선 아래 링크에 접속해 봅시다. Let's start by accessing the link below.저는 8.11.0 버전을 설치하였습니다. I installed version 8.11.0.
[2024.11.05 edited]
현재기준, 8.15.3 버전에서도 유효 합니다. Version 8.15.3 is also available for this instruction.
https://www.elastic.co/downloads/elasticsearch
Download Elasticsearch
Download Elasticsearch or the complete Elastic Stack (formerly ELK stack) for free and start searching and analyzing in minutes with Elastic.
www.elastic.co
Mac OS/Linux
해당 파일을 다운로드 받으면 "elasticsearch-8.15.3-darwin-aarch64.tar.gz" 라는 이름으로 파일이 다운받아졌을 겁니다. 파일을 다운 받은 위치에서 아래와 같은 코드를 터미널에서 실행합니다.(리눅스일 경우 wget 커맨드를 사용하여 파일을 다운로드 합니다.)
You should have downloaded the file with the name "elasticsearch-8.15.3-darwin-aarch64.tar.gz".
From the location where you downloaded the file, run the code below in your terminal (on Linux, use the wget command to download the file).
$ gzip -d elasticsearch-8.15.3-darwin-aarch64.tar.gz # file decompression
$ tar xvf elasticsearch-8.15.3-darwin-aarch64.tar # untape file
아래와 같이 폴더가 생성되었다면 제대로 수행된 것이 맞습니다.
If the folder is created as shown below, you've done it right.
해당 폴더 위치로 통해 이동해서 "./bin/elasticsearch"를 실행해 봅시다.
Go to the Elasticsearch folder location and run "./bin/elasticsearch".
여기 있는 정보들은 다음에 다른 프로그램과 연동할 때 꼭 필요한 것들이니 따로 저장해 두길 바랍니다. (반드시!!!)
Save the information here because you'll need it the next time you want to integrate with another program. (Plz!!!)
다음으로 로컬 환경에서 실행되는 것을 확인하기 위해서, 아래 커맨드를 통해 configfile에 들어가서 xpack.security.enabled를 true에서 false로 바꿔줍니다.
First, to check it's running on your local environment, enter the config file(config\elasticsearch.yml) with the command below and change xpack.security.enabled from true to false.
$ vim ./config/elasticsearch.yml
실행 execution
해당 폴더 위치로 통해 이동해서 "./bin/elasticsearch"를 실행해주면 끝입니다.
Simply navigate to that folder location and run "./bin/elasticsearch".
그리고 localhost:9200으로 접속하면 현재 실행한 elasticsearch cluster에 대한 정보를 확인할 수 있습니다.
And if you connect to localhost:9200, you'll see information about the elasticsearch cluster you're currently running.
Windows
윈도우 옵션을 선택하고 "elasticsearch-8.15.3-windows-x86_64.zip"파일을 다운 받고 압축을 해제합니다.
Select the Windows option and download and unzip the file "elasticsearch-8.15.3-windows-x86_64.zip".
우선 로컬 환경에서 실행되는 것을 확인하기 위해서, 압축해제 후 생성된 폴더의 config\elasticsearch.yml파일을 열어주고 xpac.security.enabled 값을 false로 바꿔줍니다.
First, to check it's running on your local environment, enter the config file(config\elasticsearch.yml) with the command below and change xpack.security.enabled from true to false.
다음으로, bin\elasticsearch.bat 파일을 실행합니다. 아래와 같이 실행 로그가 뜨면 정상적으로 실행된 것입니다.
Next, run the bin\elasticsearch.bat file. If you see the execution log as shown below, it ran successfully.
localhost:9200에 접속하면, 위와 같이 잘 실행된 결과를 확인할 수 있습니다. 다음 포스트에는 간단한 사용 예시를 통해서 Elasticsearch를 다루는 법을 알아보도록 하겠습니다.
If you connect to localhost:9200, you'll see the results of the above execution. In the next post, we will learn how to work with Elasticsearch through a simple usage example.
Next Post
https://sundaekugbab.tistory.com/3
Elasticsearch 시작하기(Guide) - 2. Simple examples
이 포스트는 1편의 로컬 환경의 설치에서 이어집니다. This post is a continuation of Part 1's installation on a local environment. https://sundaekugbab.tistory.com/2 Elasticsearch 시작하기(Guide) - 1. installation 이번 포스트에
sundaekugbab.tistory.com
'데이터베이스 DB' 카테고리의 다른 글
Kibana 시작하기(Guide) - 4. Kibana simple example (3) | 2024.11.14 |
---|---|
Kibana 시작하기(Guide) - 3. Kibana tutorial (0) | 2023.11.29 |
Elasticsearch 시작하기(Guide) - 2. Simple examples (0) | 2023.11.19 |