yakirChen / container-config

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker compose

同步系统时间

yum install ntpdate ntpdate -u edu.ntp.org.cn

Canal

  • canal maven build
mvn clean package -DskipTests -U -Denv=release

Elasticsearch

Important

{"nodes":{"9dFKHlwoQFSNzaInhuUM2g":{"process":{"max_file_descriptors":1048576}},"BOjAhFPyT-SSxV5p6PSOpg":{"process":{"max_file_descriptors":1048576}}}}
  • macOS -XX:-MaxFDLimit
  • Linux sudo vim /etc/security/limits.conf
    * soft nofile 262144
    * hard nofile 262144
    * soft nproc 65535
    * hard nproc 65535
    * soft memlock unlimited
    * hard memlock unlimited
    sudo systemctl daemon-reload
  • Virtual memory sudo vim /etc/sysctl.conf

    vm.max_map_count=1048576

    sudo reboot(be careful)
    检查sysctl -p

  • DNS cache settings

-Des.networkaddress.cache.ttl=60
-Des.networkaddress.cache.negative.ttl=10
  • Java Native Access (JNA)
# 默认挂载 /tmp
-Djna.tmpdir=<path>
-Djna.nosys=true # 待研究这个参数
  • Single-node discovery & Discovery configuration check
discovery.type=single-node

# 强制 bootstrap checks
# conf/elasticsearch.yml
es.enforce.bootstrap.checks: true
# jvm options
-Des.enforce.bootstrap.checks=true
# conf/elasticsearch.yml
discovery.seed_hosts
discovery.seed_providers
cluster.initial_master_nodes
  • 分片分配(Shard Allocation)
# all, primaries, new_primaries, none
cluster.routing.allocation.enable: all


# all, primaries, replicas, none
cluster.routing.rebalance.enable: all
# always, indices_primaries_active, indices_all_active
cluster.routing.allocation.allow_rebalance: always

Node

  • Master Eligible Nodeedit 没设置x-pack
node.master: true 
node.data: false 
node.ingest: false 
cluster.remote.connect: false

设置了x-pack

About


Languages

Language:Awk 100.0%