安装 ElasticSearch https://www.elastic.co/guide/cn/index.html
[root@localhost ~]# docker pull elasticsearch Using default tag: latest latest: Pulling from library/elasticsearch 05d1a5232b46: Pull complete 5cee356eda6b: Pull complete 89d3385f0fd3: Pull complete 65dd87f6620b: Pull complete 78a183a01190: Pull complete 1a4499c85f97: Pull complete 2c9d39b4bfc1: Pull complete 1b1cec2222c9: Pull complete 59ff4ce9df68: Pull complete 1976bc3ee432: Pull complete 5af49e8af381: Pull complete 42c8b75ff7af: Pull complete 7e6902915254: Pull complete 99853874fa54: Pull complete 596fbad6fcff: Pull complete Digest: sha256:a8081d995ef3443dc6d077093172a5931e02cdb8ffddbf05c67e01d348a9770e Status: Downloaded newer image for elasticsearch:latest [root@localhost ~]# docker imsages docker: 'imsages' is not a docker command. See 'docker --help' [root@localhost ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE tomcat9 latest f1338fd7a813 13 days ago 712MB mysql 5.7 84164b03fa2e 2 weeks ago 456MB centos latest 470671670cac 2 months ago 237MB elasticsearch latest 5acf0e8da90b 18 months ago 486MB daocloud.io/library/redis 3.2.9 3459037fcc3a 2 years ago 98.9MB [root@localhost ~]# docker run -e ES_JAVA_OPTS="-Xms256m -Xmx256m" -d -p 9200:9200 -p 9300:9300 --name ES7.6.1 5acf0e8da90b c01873abf0571224dd9094db14f509faa0e95551a38a7f73bec60d297629bd0d [root@localhost ~]#
ElasticSearch 启动需要2G内存,机器配置不够,所以修改JAVA_OPTS
浏览器打开,说明安装成功