본문 바로가기

꼰대개발자/OS

Ubuntu 24.04.4 LTS에 ElasticSearch 9 설치

쉽죠? 아주 쉬워요~

$ wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg
$ echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/9.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-9.x.list
deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/9.x/apt stable main
$ sudo apt update
기존:1 https://download.docker.com/linux/ubuntu noble InRelease
기존:2 http://kr.archive.ubuntu.com/ubuntu noble InRelease
기존:3 http://kr.archive.ubuntu.com/ubuntu noble-updates InRelease
기존:4 http://security.ubuntu.com/ubuntu noble-security InRelease
기존:5 http://kr.archive.ubuntu.com/ubuntu noble-backports InRelease
받기:6 https://artifacts.elastic.co/packages/9.x/apt stable InRelease [3,249 B]
기존:7 https://dl.google.com/linux/chrome/deb stable InRelease
기존:8 https://dl.google.com/linux/chrome-stable/deb stable InRelease
받기:9 https://artifacts.elastic.co/packages/9.x/apt stable/main amd64 Packages [44.5 kB]
기존:10 https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble InRelease
내려받기 47.8 k바이트, 소요시간 2초 (30.7 k바이트/초)
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다... 완료
상태 정보를 읽는 중입니다... 완료
2 패키지를 업그레이드할 수 있습니다. 확인하려면 'apt list --upgradable'를 실행하십시오.
$ sudo apt install elasticsearch -y
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다... 완료
상태 정보를 읽는 중입니다... 완료
다음 패키지가 자동으로 설치되었지만 더 이상 필요하지 않습니다:
  amd64-microcode bpfcc-tools bpftrace ieee-data intel-microcode iucode-tool libbpfcc libclang-cpp18 libclang1-18 libllvm18 libslirp0 python3-bpfcc python3-netaddr slirp4netns thermald
  ubuntu-kernel-accessories
'sudo apt autoremove'를 이용하여 제거하십시오.
다음 새 패키지를 설치할 것입니다:
  elasticsearch
0개 업그레이드, 1개 새로 설치, 0개 제거 및 2개 업그레이드 안 함.
814 M바이트 아카이브를 받아야 합니다.
이 작업 후 1,468 M바이트의 디스크 공간을 더 사용하게 됩니다.
받기:1 https://artifacts.elastic.co/packages/9.x/apt stable/main amd64 elasticsearch amd64 9.4.2 [814 MB]
내려받기 814 M바이트, 소요시간 1분 48초 (7,543 k바이트/초)
Selecting previously unselected package elasticsearch.
(데이터베이스 읽는중 ...현재 166665개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack .../elasticsearch_9.4.2_amd64.deb ...
Creating elasticsearch group... OK
Creating elasticsearch user... OK
Unpacking elasticsearch (9.4.2) ...
elasticsearch (9.4.2) 설정하는 중입니다 ...
--------------------------- Security autoconfiguration information ------------------------------

Authentication and authorization are enabled.
TLS for the transport and HTTP layers is enabled and configured.

The generated password for the elastic built-in superuser is : [여기에 superuser 초기 패스워드가 찍힘]

If this node should join an existing cluster, you can reconfigure this with
'/usr/share/elasticsearch/bin/elasticsearch-reconfigure-node --enrollment-token <token-here>'
after creating an enrollment token on your existing cluster.

You can complete the following actions at any time:

Reset the password of the elastic built-in superuser with
'/usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic'.

Generate an enrollment token for Kibana instances with
 '/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana'.

Generate an enrollment token for Elasticsearch nodes with
'/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s node'.

-------------------------------------------------------------------------------------------------
### NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd
 sudo systemctl daemon-reload
 sudo systemctl enable elasticsearch.service
### You can start elasticsearch service by executing
 sudo systemctl start elasticsearch.service

$ sudo systemctl daemon-reload
$ sudo systemctl enable elasticsearch.service
$ sudo systemctl start elasticsearch.service
$ curl -k -u elastic https://localhost:9200
Enter host password for user 'elastic': [superuser 패스워드 입력]
{
  "name" : "ubuntu-01",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "TsxxxxxxTQiid6_oxxxxxx",
  "version" : {
    "number" : "9.4.2",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "c402c2b36d9xxxxxxc0182f86bd9050fd0xxxxxx",
    "build_date" : "2026-05-25T22:10:36.017759931Z",
    "build_snapshot" : false,
    "lucene_version" : "10.4.0",
    "minimum_wire_compatibility_version" : "8.19.0",
    "minimum_index_compatibility_version" : "8.0.0"
  },
  "tagline" : "You Know, for Search"
}

 

 

반응형