部署文档 ES740 环境说明:
CentOS8.1.19
version: ES7.4.0
分词、拼音、python 的 elasticsearch 必须和 ES740 版本对应,否则可能存在使用异常情况。
系统依赖 ES 官网系统配置
修改系统参数
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 vm.max_map_count=655360 找到如下内容: soft nproc 1024 修改为 soft nproc 2048 * soft nofile 65536 * hard nofile 65536 sysctl -p ulimit -Hn
简单部署 解压即用,ES7.4 自带 java 环境,无需安装 java 环境。
文件详见 /03-常用工具/01-部署软件/es74.zip
1 2 3 4 wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.4.0-linux-x86_64.tar.gz
服务启停 ES740
的restart.sh
软件
1 2 3 4 5 6 7 8 9 10 source ~/.bash_profileecho ">> Restart Elasticsearch74 starting..." echo "> Stop Es and Kibana ..." ps anx | grep cli | grep -v grep| awk '{print $1}' | xargs kill -15 ps anx | grep elasticsearch | grep -v grep| awk '{print $1}' | xargs kill -15 echo "> Start Es and Kibana ..." su - es -lc "cd /home/es/es/node_noly && bin/elasticsearch -d" su - es -lc "cd /home/es/es/kibana && nohup bin/kibana &" echo ">> Restart Elasticsearch74 end..."
可视化界面展示
1 2 3 4 http://0.0.0.0:9200 http://0.0.0.0:5601
配置文件 ES 的配置文件 elasticsearch.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 bootstrap.system_call_filter: false cluster.name: es74_cluste node.name: node-only node.master: true node.data: true node.max_local_storage_nodes: 3 path.data: /data/data path.logs: /data/logs network.host: 0.0.0.0 http.port: 9200 http.cors.enabled: true http.cors.allow-origin: '*' xpack.security.enabled: false cluster.routing.allocation.awareness.attributes: zone node.attr.zone: zone_two discovery.seed_hosts: ["0.0.0.0" ] cluster.initial_master_nodes: ["node-only" ]
Kibana 的配置文件
1 2 3 server.host: "0.0.0.0" server.port: 5601 elasticsearch.hosts: ["http://0.0.0.0:9200" ]
564 部署文档 环境说明:
CentOS8.1.19
version: ES7.4.0
分词、拼音、python 的 elasticsearch 必须和 ES 版本对应,否则可能存在使用异常情况。
ES5.6.4 x-pack 收费,只能试用一个月
ES5.6.4 和 Es7.4.0 存在较大语法差异,详见 ES 版本差异对比
部署依赖
1 2 wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.4.tar.gz