centos 7.0安装elasticsearch 6.x

周末开始学习啦

下载 elasticsearch 安装包

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

配置 elasticsearch.yml文件

## 应用名
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

配置jvm.options 文件

由于博主是阿里云的服务器,配置不咋的,设置一下内存、默认是1g

#-Xms1g
#-Xmx1g
-Xms256m
-Xmx256m

创建用户组

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

配置 /etc/security/limits.conf 文件

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

配置 /etc/sysctl.conf 文件

# elasticsearch
vm.max_map_count=655360

启动 elasticsearch

su elasticsearch
进入bin文件夹,启动
./elasticsearch

访问地址 localhost:9200

在这里插入图片描述

ES比传统关系型数据库,对一些概念上的理解:

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

启动报错的几个解决方式:
https://www.cnblogs.com/linzepeng/p/12084734.html
https://www.cnblogs.com/jingping/p/9448099.html

猜你喜欢

转载自blog.csdn.net/qq_38893133/article/details/104450029