ES7.5.1安装

ES安装

  • 官网下载解压
curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.1-linux-x86_64.tar.gz
tar -xzvf elasticsearch-7.5.1-linux-x86_64.tar.gz
cd elasticsearch-7.5.1
./bin/elasticsearch
  • 启动报错异常
ERROR: [3] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[3]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
[2019-12-31T10:28:14,537][INFO ][o.e.n.Node               ] [hadoop001] stopping ...
[2019-12-31T10:28:14,552][INFO ][o.e.n.Node               ] [hadoop001] stopped
[2019-12-31T10:28:14,553][INFO ][o.e.n.Node               ] [hadoop001] closing ...
[2019-12-31T10:28:14,569][INFO ][o.e.n.Node               ] [hadoop001] closed
  • 配置文件的修改
[hadoop@hadoop001 config]$ pwd
/home/hadoop/app/elasticsearch/config
[hadoop@hadoop001 config]$ vi elasticsearch.yml

# 设置为0.0.0.0可以让任何计算机节点访问
network.host: 0.0.0.0
#
# Set a custom port for HTTP:
#
## 如下配置是为了解决 Elasticsearch可视化工具 跨域问题
http.port: 9200
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers: Authorization, X-Requested-With,Content-Length,Content-Type

# 集群个数
cluster.initial_master_nodes: ["node-1"]

# 切换用户 root 修改文件数 以及虚拟内存大小
[root@hadoop001 ~]# cd /etc/security/
[root@hadoop001 security]# vi limits.conf 
 <domain> <type>  <item>  <value>
    *     soft    nofile  65536
    *     hard    nofile  65536
    *     soft    nproc   65536
    *     hard    nproc   65000
[root@hadoop001 etc]# vi sysctl.conf
vm.max_map_count=655360
#载入配置 生效
sysctl -p
  • 查看UI 启动成功
{
  "name" : "node-1",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "8dXs5NrVQcSBvBoRJzD-qQ",
  "version" : {
    "number" : "7.5.1",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "3ae9ac9a93c95bd0cdc054951cf95d88e1e18d96",
    "build_date" : "2019-12-16T22:57:37.835892Z",
    "build_snapshot" : false,
    "lucene_version" : "8.3.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值