First, select the version, the mirror pulling
pull elasticsearch Docker: 5.6.9 # do not choose is the latest version
Second, the operation of the container is provided
# -D represents background docker -d -p 9200 RUN: 9200 -p 9300: 9300 -e " discovery.type = SINGLE-Node " --name ES elasticsearch: 5.6.9 # may also be provided to limit memory usage ES_JAVA_OPTS docker -d -p 9200 RUN: 9200 -p 9300: 9300 = -e ES_JAVA_OPTS " -Xms512m -Xmx512m " -e " discovery.type = SINGLE-Node " --name ES elasticsearch: 5.6.9
Third, access es
http://10.0.0.11:9200 # 你自己虚拟机的ip { "name" : "XqXVlyZ", "cluster_name" : "elasticsearch", "cluster_uuid" : "tmh_zDQvSR-jmp7QQz2HPA", "version" : { "number" : "5.6.9", "build_hash" : "877a590", "build_date" : "2018-04-12T16:25:14.838Z", "build_snapshot" : false, "lucene_version" : "6.6.1" }, "tagline" : "You Know, for Search" }
Fourth, the installation visualization plug-ins
pull mobz Docker / elasticsearch-head:. 5 # pulling mirror Docker -d -p 9100 RUN: 9100 mobz / elasticsearch-head:. 5 # Run vessel
# Enter the cross-domain connection is provided within the container es, -it can be connected behind the container or containers name ID Docker Exec -it es / bin / the bash
config cd LS vim elasticsearch.yml # Set cluster.name: " Docker-Cluster " network.host: 0.0.0.0 http.cors.enabled: to true http.cors.allow -origin: " * "
# If not vim, Ubuntu system
APT-GET Update #
# APT-GET install RPM
#centos system # Download wget ftp://ftp.vim.org/ftp/pub/vim/unix/vim-7.4 .tar.bz2 # unpack tar xvf vim-7.4 . tar.bz2 # enter vim74 (after decompression) directory, execute ./configure --disable-SELinux --enable- cscope # compile the make #Install make install
# Install yum wget http://yum.baseurl.org/download/3.2/yum-3.2.28 .tar.gz # unpack tar xvf yum-3.2.28 .tar.gz # installation cd yum-3.2.28 yummain. yum install Py # If the result of an error: CRITICAL: yum.cli: config error: error Accessing #file for config file: /// etc / # may be missing the original configuration file. New in the etc directory below yum.conf file, and run the # line yummain.py install yum again, the successful completion of the installation # update the system yum CHECK- Update yum Update yum Clean All
# Modified vessel after restart es arranged docker restart aeda8db10927
connection succeeded