Linux 환경에서 elasticsearch를 설치하고 구동하는 법을 작성한다. ES 버전 7.9.2 기준
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.9.2-x86_64.rpm
sudo rpm --install elasticsearch-7.9.2-x86_64.rpm
cd /etc/yum.repos.d/ sudo vi elasticsearch.repo
** 아래 내용 추가 후 저장 [elasticsearch-7.x] name=Elasticsearch repository for 7.x packages baseurl=https://artifacts.elastic.co/packages/7.x/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md
sudo vi /usr/share/elasticsearch/bin/elasticsearch-env export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64 export PATH=$JAVA_HOME/bin:$PATH
sudo chown -Rf jenkins:jenkins /usr/share/elasticsearch
sudo chown -Rf jenkins:jenkins /etc/elasticsearch
sudo su jenkins mkdir /log/elasticsearch exit
sudo chown -Rf jenkins:jenkins /etc/sysconfig/elasticsearch
sudo vi /usr/lib/systemd/system/elasticsearch.service User=jenkins Group=jenkins
sudo systemctl daemon-reload
ES 분산환경 설정 참조
sudo systemctl start elasticsearch