centos 7.0 install elasticsearch 6.x

Start studying this weekend

Download the elasticsearch installation package

$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.2.tar.gz
## 解压
tar -xvf elasticsearch-6.3.2.tar.gz 

Configure the elasticsearch.yml file

## 应用名
cluster.name: my-application
## data存放目录
path.data: /usr/local/elasticsearch-6.3.2/data
## 日志存放目录
path.logs: /usr/local/elasticsearch-6.3.2/logs
## bootstrap 
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
## 设置都可以访问
network.host: 0.0.0.0
## 设置端口
http.port: 9200

Configure the jvm.options file

Since the blogger is an Alibaba Cloud server, the configuration is not good, set the memory, the default is 1g

#-Xms1g
#-Xmx1g
-Xms256m
-Xmx256m

Create user group

groupadd elasticsearch
useradd elasticsearch -g elasticsearch
passwd elasticsearch
#  elasticsearch  强制限制不能以root用户启动,设置权限
					用户:用户所在组	
chown -R  elasticsearch:elasticsearch /usr/local/elasticsearch-6.3.2  

Configure the /etc/security/limits.conf file

vim /etc/security/limits.conf

# End of file
root soft nofile 65536
root hard nofile 65536
* soft nofile 65536
* hard nofile 65536
#  elasticsearch
* soft nproc 2048
* hard nproc 4096

Configure the /etc/sysctl.conf file

# elasticsearch
vm.max_map_count=655360

Start elasticsearch

su elasticsearch
into the bin folder and start
./elasticsearch

Access address localhost:9200

Insert picture description here

ES has an understanding of some concepts than traditional relational databases:

Relational DB -> Databases -> Tables -> Rows -> Columns
Elasticsearch -> Indices -> Types -> Documents -> Fiel

Several solutions for startup errors:
https://www.cnblogs.com/linzepeng/p/12084734.html
https://www.cnblogs.com/jingping/p/9448099.html

Guess you like

Origin blog.csdn.net/qq_38893133/article/details/104450029