# 3. Elasticsearch 서버 설치 방법



# 서버 접속 방법

 **방법 1. SSH 접속**

[ ![ssh.PNG](https://manual.dabory.com/uploads/images/gallery/2024-11/scaled-1680-/ssh.PNG)](https://manual.dabory.com/uploads/images/gallery/2024-11/ssh.PNG)

- Window : Git Bash 실행, Mac/Linux : 터미널 실행 -&gt; ssh (사용자명)@(서버IP) -p (포트) -&gt; 비밀번호 작성 -&gt; 서버 접속

 **방법 2. 스크립트 파일로 접속 (자동화 스크립트 파일이 있다는 가정)**

[ ![캡처fff.PNG](https://manual.dabory.com/uploads/images/gallery/2024-11/scaled-1680-/QfGfff.PNG)](https://manual.dabory.com/uploads/images/gallery/2024-11/QfGfff.PNG)

- Git Bash 실행, Mac/Linux : 터미널 실행 -&gt; ./(파일 이름) (서버 이름) -&gt; 비밀번호 작성 -&gt; 서버 접속

# 서버 설치 방법

#### **Elasticsearch와 Kibana를 서버에 설치하는 방법**

#### **Elasticsearch**

**[![image.png](https://manual.dabory.com/uploads/images/gallery/2024-11/scaled-1680-/VdSimage.png)](https://manual.dabory.com/uploads/images/gallery/2024-11/VdSimage.png)**

##### **1. Elasticsearch 다운로드**

- **서버에 접속 후 -&gt; wget [https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.x.x-linux-x86\_64.tar.gz](https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.x.x-linux-x86_64.tar.gz)**

##### **2. 압축 해제**

- **tar -xzf elasticsearch-8.x.x-linux-x86\_64.tar.gz**

##### **3. Elasticsearch 실행**

- **cd elasticsearch-8.x.x -&gt; ./bin/elasticsearch**

##### **4. Elasticsearch 상태 확인**

- **curl -X GET "http://서버\_IP:9200"**

#### **Kibana**

[![image.png](https://manual.dabory.com/uploads/images/gallery/2024-11/scaled-1680-/9g3image.png)](https://manual.dabory.com/uploads/images/gallery/2024-11/9g3image.png)

##### **1. Kibana 다운로드**

- **서버에 접속 후 -&gt; wget [https://artifacts.elastic.co/downloads/kibana/kibana-8.x.x-linux-x86\_64.tar.gz](https://artifacts.elastic.co/downloads/kibana/kibana-8.x.x-linux-x86_64.tar.gz)**

##### **2. 압축 해제**

- **tar -xzf kibana-8.x.x-linux-x86\_64.tar.gz**

##### **3. kibana 실행**

- **cd kibana-8.x.x -&gt; ./bin/kibana**

##### **4. Kibana 접속 확인**

- **http://서버\_IP:5601 # 웹 브라우저로 URL을 통해 Kibana에 접속하여 대시보드가 나타나는지 확인**