docker安装并运行elasticsearch
拉取镜像:
- [mall@VM_0_7_centos ~]$ sudo docker pull elasticsearch:6.4.
- [sudo] password for mall:
- 6.4.: Pulling from library/elasticsearch
- 256b176beaff: Pull complete
- 6cb472d8b34a: Downloading [=================================================> ] .5MB/.4MB
- 6cb472d8b34a: Pull complete
- 3a4f4d86c1c1: Pull complete
- d185a64a7692: Pull complete
- bc4d63245d6d: Pull complete
- c8e97292a30a: Pull complete
- c1c1a056e791: Pull complete
- 69b6c77c3236: Pull complete
- Digest: sha256:96345f6d73c0d615ddf8b9683848d625f211efacfe3b5b8765debbd1eebc5663
- Status: Downloaded newer image for elasticsearch:6.4.
- docker.io/library/elasticsearch:6.4.
修改vm.max_map_count参数:
- [mall@VM_0_7_centos ~]$ sudo sysctl -w vm.max_map_count=
- [sudo] password for mall:
- vm.max_map_count =
启动容器elasticsearch:
- [mall@VM_0_7_centos ~]$ sudo docker run -p : -p : --name elasticsearch \
- > -e "discovery.type=single-node" \
- > -e "cluster.name=elasticsearch" \
- > -v /mydata/elasticsearch/plugins:/usr/share/elasticsearch/plugins \
- > -v /mydata/elasticsearch/data:/usr/share/elasticsearch/data \
- > -d elasticsearch:6.4.
- 606c0c45aa2693a23bf1a7de7be518b3022c5f107d2c7083f2590cba1589b9d9
进入容器报错,提示启动失败:
- [mall@VM_0_7_centos ~]$ sudo docker exec -it elasticsearch /bin/bash
- Error response from daemon: Container 606c0c45aa2693a23bf1a7de7be518b3022c5f107d2c7083f2590cba1589b9d9 is not running
修改数据文件权限,重启:
- [mall@VM_0_7_centos ~]$ sudo chmod + /mydata/elasticsearch/data
- [mall@VM_0_7_centos ~]$ sudo docker stop elasticsearch
- elasticsearch
- [mall@VM_0_7_centos ~]$ sudo docker start elasticsearch
- elasticsearch
测试一下:
- [mall@VM_0_7_centos ~]$ curl -XGET 'localhost:9200'
- {
- "name" : "4FZrgc-",
- "cluster_name" : "elasticsearch",
- "cluster_uuid" : "6JP7jV8wQhqiVCg680hP-w",
- "version" : {
- "number" : "6.4.0",
- "build_flavor" : "default",
- "build_type" : "tar",
- "build_hash" : "595516e",
- "build_date" : "2018-08-17T23:18:47.308994Z",
- "build_snapshot" : false,
- "lucene_version" : "7.4.0",
- "minimum_wire_compatibility_version" : "5.6.0",
- "minimum_index_compatibility_version" : "5.0.0"
- },
- "tagline" : "You Know, for Search"
- }
docker安装并运行elasticsearch的更多相关文章
- Docker安装以及运行第一个HelloWorld
Docker安装以及运行第一个HelloWorld
- Docker安装+HelloWorld+运行Tomcat
前言 只有光头才能变强. 文本已收录至我的GitHub仓库,欢迎Star:https://github.com/ZhongFuCheng3y/3y 上一篇已经讲解了为什么需要Docker?,相信大家已 ...
- Docker安装并运行mysql5.6数据库
1.在/home目录下新建mysql目录 mysql目录中新建三个目录:conf目录.logs目录.data目录,建这些目录的目的是用来挂载docker中的mysql下的目录的. 结果如下: 1.1. ...
- docker安装并运行kibana
拉镜像: [mall@VM_0_7_centos ~]$ : Pulling from library/kibana 256b176beaff: Already exists 88643bded09c ...
- docker安装并运行redis
拉取镜像: [mall@VM_0_7_centos ~]$ sudo docker pull redis:3.2 [sudo] password for mall: 3.2: Pulling from ...
- docker安装并运行ngnix
拉取nginx最新版本的镜像: [mall@VM_0_7_centos ~]$ sudo docker pull nginx:latest [sudo] password for mall: late ...
- Docker 安装并运行 Redis
说明 在Windows下运行Redis主要有以下几种方式: 使用微软官方构建的Windows版Redis,最新版本是3.0.504,发布于2016-07-01.https://github.com/m ...
- 使用docker安装和运行常用的数据库和中间件
mysql: docker pull mysql: docker run --name mysql -p : -v /usr/share/zoneinfo/Asia/Shanghai:/etc/loc ...
- docker安装并运行mongo
拉镜像: [mall@VM_0_7_centos ~]$ sudo docker pull mongo:3.2 [sudo] password for mall: 3.2: Pulling from ...
随机推荐
- filter-mutate过滤插件
之前的nginx日志使用grok匹配,但是后来发现nginx的日志中每个值之间都使用了分隔符"|",这下就可以使用mutate来分隔出每个字段的含义,同时还减少了运算. 描述 mu ...
- react-native npm install
--create project react-native init myapp --version 0.55.4 cd myapp -- react ui npm i react-native-el ...
- Codeforces I. Inna and Nine(组合)
题目描述: Inna and Nine time limit per test 1 second memory limit per test 256 megabytes input standard ...
- hdu1384Intervals(差分约束)
#include <bits/stdc++.h> using namespace std; ; const int inf = 0x3f3f3f3f; int n, head[maxn], ...
- wordpress调用缩略图/特色图url
调用缩略图的url <a href="<?php the_post_thumbnail_url( 'full' ); ?>"><?php the_po ...
- 【Selenium-WebDriver实战篇】ScreenRecorder的实际输出路径设置(转)
参考:https://www.cnblogs.com/yongfeiuall/p/4134139.html 我们可以用以下方式在Selenium Webdriver中capture video. 基本 ...
- django-带参数路由
路由urls.py from django.conf.urls import url from goods.views import IndexView, DetailView, ListView u ...
- SUID提权
查看tmp目录权限 ll -d /tmp 切换到tmp目录 cd /tmp 创建一个exploit目录 mkdir exploit 查看ping命令带suid权限 ll /bin/ping 创建tar ...
- C#线程池 ThreadPool
什么是线程池 大家都知道,我们在打开一个应用的时候,操作系统是要做很多的事情的,动态链接.装载.分配虚拟空间.等等等等,其实一个应用的打开同时也伴随着一个进程的建立. 进程的建立是需要时间的,在进程上 ...
- CTF入门(一)
ctf入门指南 如何入门?如何组队? capture the flag 夺旗比赛 类型: Web密码学pwn 程序的逻辑分析,漏洞利用windows.linux.小型机等misc 杂项,隐写,数据还原 ...