elasticsearch6.x 클러스터 환경 배포

2656 단어 eselasticsearch

elasticsearch 집단 배치


jdk 설치

chmod 755 jdk-8u161-linux-x64.tar.gz
tar -zxvf jdk-8u161-linux-x64.tar.gz
cp jdk1.8.0_161 /data/install

elasticsearch 실행 사용자 만들기

useradd elastic
mkdir /data/install/elastic
chmod -R 777 /data/install/elastic

elasticsearch-head 플러그인 설치

yum -y install nodejs
yum -y install yum-utils
yum -y install openssl
yum -y update openssl
yum-config-manager --enable cr
yum update

mkdir /data/install/nodejs
npm config set prefix "/data/install/nodejs"
npm install -g grunt
cp /data/ftp/elasticsearch-head-master.zip /data/install/elastic
unzip /data/install/elastic/elasticsearch-head-master.zip
cd /data/install/elastic/elasticsearch-head-master
npm install

 
grunt server &

elasticsearch 설치

cp /data/ftp/elasticsearch-6.2.4.tar.gz /data/install/elastic
su elastic
cd /data/install/elastic
tar -zxvf elasticsearch-6.2.4.tar.gz

1. master node
	cluster.name: qsearch
	node.name: qsearch-master
	node.data: false
	node.master: true
	path.data: /data/install/elastic/data
	path.logs: /data/install/elastic/logs
	network.host:  ip
	#  ip ip, , , , #  
	discovery.zen.ping.unicast.hosts: ['host1', 'host2', ...]
	#  
	discovery.zen.minimum_master_nodes: number of master-nodes / 2 + 1

2. client node
	cluster.name: qsearch
	node.name: qsearch-client
	node.data: false
	node.master: false
	path.data: /data/install/elastic/data
	path.logs: /data/install/elastic/logs
	network.host:  ip
	discovery.zen.ping.unicast.hosts: ['host1', 'host2', ...]

3. data node
	cluster.name: qsearch
	node.name: qsearch-data
	node.data: false
	node.master: false
	path.data: /data/install/elastic/data
	path.logs: /data/install/elastic/logs
	network.host:  ip
	discovery.zen.ping.unicast.hosts: ['host1', 'host2', ...]
	bootstrap.mlockall: true

시스템 구성

 data node , :https://blog.csdn.net/iorichang/article/details/53840824

vim /etc/security/limits.conf
	elastic soft nofile 65536
	elastic hard nofile 65536
	elastic soft memlock unlimited
	elastic hard memlock unlimited

vim /etc/sysctl.conf
	vm.swappiness=1 #   swapping
	net.core.somaxconn=65535 #  
	vm.max_map_count=262144
	fs.file-max=518144

분사 + 병음 플러그인 설치

 :
1. maven
2. 
elasticsearch-analysis-ik-6.2.4.source.zip
elasticsearch-analysis-pinyin-master.source.zip
3. , mvn clean package  
4. :/target/releases/XXXX.zip
5. :elasticsearch-plugin install /target/releases/xxxx.zip

 zip , 

좋은 웹페이지 즐겨찾기