본문 바로가기

IT/linux

리눅스(linux) centos7 elasticsearch 설치2

sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
mkdir /usr/local/elasticsearch
cd /usr/local/elasticsearch
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.3.2-linux-x86_64.tar.gz
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.3.2-linux-x86_64.tar.gz.sha512
shasum -a 512 -c elasticsearch-7.3.2-linux-x86_64.tar.gz.sha512 
tar -xzf elasticsearch-7.3.2-linux-x86_64.tar.gz
cd elasticsearch-7.3.2/ 

 

# vi config/elasticsearch.yml

node.name: node-1

network.host: 0.0.0.0

http.port: 9200

action.destructive_requires_name: false

 

# vi config/jvm.options

-Xms128m
-Xmx128m

-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=75
-XX:+UseCMSInitiatingOccupancyOnly

 

엘라스틱 서치 소유자 변경을 통한 접근

# chown -R admin:admin /usr/local/elasticsearch/elasticsearch-7.3.2ls -l

# ls -l

 

# sudo sysctl -w vm.max_map_count=262144

# vi /etc/security/limits.conf.

@student        -       maxlogins     4
*       soef    nofile  204800
*       hard    nofile  204800
*       soft    nproc   65536
*       hard    nproc   65536
admin   soft    nproc   65536
admin   hard    nproc   65536

root 계정으로 엘라스틱 실행 불가함 다른 계정으로 권한을 부여해서 실행시킴

ps -ef | grep elastic

kill -9 pid

-----------------------

chown 명령어(사용자 및 그룹 소유자 변경)
# test.txt 파일의 소유 사용자와 그룹을 doran:doranGroup으로 변경
 → chown doran:doranGroup test.txt

# test 디렉터리 이하 모든 파일 및 디렉터리에 대하여 소유자 변경
 → chown -R doran test/


chmod [options] 기호 files

# 8진수를 이용한 방법
# 사용자는 읽기(r), 쓰기(w) 권한 부여, 그룹과 기타는 읽기(4) 권한만 부여
 → chmod 644 test.txt

# 권한 전부 부여
chmod 777 test.txt