Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Elasticsearch on Amazon Linux
# as root or with sudo
swapoff -a
sysctl -w vm.swappiness=1
sysctl -w fs.file-max=262144
sysctl -w vm.max_map_count=262144
yum install
yum install mysql-devel redis-devel
amazon-linux-extras install redis4.0
yum install docker
chkconfig docker on
docker network create elastic
docker pull elasticsearch:7.11.1
docker run --rm --detach --env "" \
--env "" \
--env "cluster.initial_master_nodes=es1" \
--env "discovery.seed_hosts=es1" \
--env "cluster.routing.allocation.disk.threshold_enabled=false" \
--env "bootstrap.memory_lock=true" \
--env "ES_JAVA_OPTS=-Xms1g -Xmx1g" \
--env "" \
--env "xpack.license.self_generated.type=basic" \
--env "http.port=9200" \
--ulimit "nofile=65536:65536" \
--ulimit memlock=-1:-1 \
--publish 9200:9200 \
--network=elastic \
--name=elasticsearch \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment