참고 문서
https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html
https://discuss.elastic.co/t/elasticsearch-only-accessible-from-localhost/65782/4
Elasticsearch PGP Key를 Import한다
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
apt repo를 add한다
sudo apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
sudo apt-get update && sudo apt-get install elasticsearch
ps -p 1
elasticsearch를 start&stop하는 방법은 SysV에 따라 갈린다
필자의 경우 systemd이다
systemd의 경우 아래 커맨드로 elasticsearch가 부팅시마다 자동으로 실행되게 할수있다
sudo /bin/systemctl daemon-reload sudo /bin/systemctl enable elasticsearch.service
start&stop은 아래 커맨드로 할수있다 (start를 해주면 드디어 elasticsearch가 실행된다. 그리고 시작하는데에 약간 시간이 걸린다)
sudo systemctl start elasticsearch.service sudo systemctl stop elasticsearch.service sudo systemctl status elasticsearch.service sudo systemctl restart elasticsearch.service
완전히 시작될 때까지 기다린 후 아래 커맨드로 잘 실행되었는지 확인해보자
curl -XGET localhost:9200
default setting은 localhost로 bind되어있으므로, /etc/elasticsearch/elasticsearch.yml에서 network.host를 0.0.0.0으로 설정해주자
그리고 restart
------------- 추가 ---------
GUI Client, 라이브러리, 플러그인 등의 호환을 위해
elasticsearch5 이하 설치 추천
아래 커맨드도 사용할수 있다
sudo /etc/init.d/elasticsearch status
플러그인은? ...
'Linux' 카테고리의 다른 글
[Linux] vsftpd anonymous public default location (0) | 2018.02.22 |
---|---|
[Linux] Disk 관련 커맨드 (0) | 2018.02.21 |
[Linux] Nginx config (0) | 2018.02.18 |
[Linux] Nginx syntax highlight install (0) | 2018.02.18 |
[Linux] apt-get auto-completion (0) | 2018.02.18 |
WRITTEN BY
- hojongs
블로그 옮겼습니다 https://hojongs.github.io/