본문 바로가기

Side Project

[Elasticsearch] 1. Build Environment(Elasticsearch, Kibana)

OS: Ubuntu 18.04

 

[Install Elasticsearch]

wget artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.10.0-linux-x86_64.tar.gz

 

* start shell 

$ vi start.sh

bin/elasticsearch -d -p es.pid

* stop shell

$ vi stop.sh

kill `cat es.pid`

 

* start.sh, stop.sh 파일 생성 및 실행 권한 부여

$ echo 'bin/elasticsearch -d -p es.pid' > start.sh

$ echo 'kill `cat es.pid`' > stop.sh

$ chmod 755 start.sh stop.sh

 

- Kibana 설치 : POSTMAN 처럼 쉽게 URL 만들어서 elasticsearch에 api 호출 쿼리를 날리기 위함

[Install Kibana]

$ wget https://artifacts.elastic.co/downloads/kibana/kibana-7.10.0-amd64.deb

$ shasum -a 512 kibana-7.10.0-amd64.deb

$ sudo dpkg -i kibana-7.10.0-amd64.deb

 

[Kibana Execution]

You can start and stop Kibana using the service command:

$ sudo -i service kibana start

$ sudo -i service kibana stop

 

To configure Kibana to start automatically when the system boots up, run the following commands:

$ sudo /bin/systemctl daemon-reload

$ sudo /bin/systemctl enable kibana.service

 

$ sudo systemctl start kibana.service

$ sudo systemctl stop kibana.service