[Docker系列·11]搭建ZooKeeper伺服器
搭建ZooKeeper伺服器
1 Docker-Ubuntu-Zookeeper
工作目錄:/home/erichan/docker-room/ubuntu-zookeeper
1.1 製作映象
erichan@ubuntu14_04_1-pd:~/docker-room/ubuntu-zookeeper$ nano Dockerfile
# Version: 0.0.1
FROM feuyeux/ubuntu-java7
MAINTAINER Eric Han "feuyeux@gmail.com"
RUN apt-get update && apt-get install -y wget
RUN wget http://apache.fayea.com/apache-mirror/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz
RUN tar -xzf zookeeper-3.4.6.tar.gz -C /opt
RUN cp /opt/zookeeper-3.4.6/conf/zoo_sample.cfg /opt/zookeeper-3.4.6/conf/zoo.cfg
RUN mkdir -p /tmp/zookeeper
ENV JAVA_HOME /usr/lib/jvm/java-7-openjdk-amd64
EXPOSE 2181 2888 3888
WORKDIR /opt/zookeeper-3.4.6
VOLUME ["/opt/zookeeper-3.4.6/conf", "/tmp/zookeeper"]
ENTRYPOINT ["/opt/zookeeper-3.4.6/bin/zkServer.sh"]
CMD ["start-foreground"]
1.2 建立映象
erichan@ubuntu14_04_1-pd:~/docker-room/ubuntu-zookeeper$ d build -t feuyeux/zookeeper:3.4.6 .
1.3 測試映象
erichan@ubuntu14_04_1-pd:~/docker-room$ d run --name zk346 -d feuyeux/zookeeper:3.4.6
eab5250575338e52ef6232020deec5b8ef175caf63f1547fdc02413c4a29a5f8
erichan@ubuntu14_04_1-pd:~/docker-room$ d ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
eab525057533 feuyeux/zookeeper:3.4.6 "/opt/zookeeper-3.4. 5 seconds ago Up 4 seconds 3888/tcp, 2181/tcp, 22/tcp, 2888/tcp zk346
erichan@ubuntu14_04_1-pd:~/docker-room$ d logs zk346
JMX enabled by default
Using config: /opt/zookeeper-3.4.6/bin/../conf/zoo.cfg
2014-08-24 11:52:30,063 [myid:] - INFO [main:QuorumPeerConfig@103] - Reading configuration from: /opt/zookeeper-3.4.6/bin/../conf/zoo.cfg
2014-08-24 11:52:30,067 [myid:] - INFO [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3
2014-08-24 11:52:30,067 [myid:] - INFO [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0
2014-08-24 11:52:30,067 [myid:] - INFO [main:DatadirCleanupManager@101] - Purge task is not scheduled.
2014-08-24 11:52:30,067 [myid:] - WARN [main:QuorumPeerMain@113] - Either no config or no quorum defined in config, running in standalone mode
2014-08-24 11:52:30,082 [myid:] - INFO [main:QuorumPeerConfig@103] - Reading configuration from: /opt/zookeeper-3.4.6/bin/../conf/zoo.cfg
2014-08-24 11:52:30,083 [myid:] - INFO [main:ZooKeeperServerMain@95] - Starting server
2014-08-24 11:52:30,088 [myid:] - INFO [main:Environment@100] - Server environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
2014-08-24 11:52:30,088 [myid:] - INFO [main:Environment@100] - Server environment:host.name=eab525057533
2014-08-24 11:52:30,089 [myid:] - INFO [main:Environment@100] - Server environment:java.version=1.7.0_55
2014-08-24 11:52:30,089 [myid:] - INFO [main:Environment@100] - Server environment:java.vendor=Oracle Corporation
2014-08-24 11:52:30,089 [myid:] - INFO [main:Environment@100] - Server environment:java.home=/usr/lib/jvm/java-7-openjdk-amd64/jre
2014-08-24 11:52:30,089 [myid:] - INFO [main:Environment@100] - Server environment:java.class.path=/opt/zookeeper-3.4.6/bin/../build/classes:/opt/zookeeper-3.4.6/bin/../build/lib/*.jar:/opt/zookeeper-3.4.6/bin/../lib/slf4j-log4j12-1.6.1.jar:/opt/zookeeper-3.4.6/bin/../lib/slf4j-api-1.6.1.jar:/opt/zookeeper-3.4.6/bin/../lib/netty-3.7.0.Final.jar:/opt/zookeeper-3.4.6/bin/../lib/log4j-1.2.16.jar:/opt/zookeeper-3.4.6/bin/../lib/jline-0.9.94.jar:/opt/zookeeper-3.4.6/bin/../zookeeper-3.4.6.jar:/opt/zookeeper-3.4.6/bin/../src/java/lib/*.jar:/opt/zookeeper-3.4.6/bin/../conf:
2014-08-24 11:52:30,089 [myid:] - INFO [main:Environment@100] - Server environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
2014-08-24 11:52:30,089 [myid:] - INFO [main:Environment@100] - Server environment:java.io.tmpdir=/tmp
2014-08-24 11:52:30,089 [myid:] - INFO [main:Environment@100] - Server environment:java.compiler=<NA>
2014-08-24 11:52:30,091 [myid:] - INFO [main:Environment@100] - Server environment:os.name=Linux
2014-08-24 11:52:30,091 [myid:] - INFO [main:Environment@100] - Server environment:os.arch=amd64
2014-08-24 11:52:30,091 [myid:] - INFO [main:Environment@100] - Server environment:os.version=3.13.0-34-generic
2014-08-24 11:52:30,091 [myid:] - INFO [main:Environment@100] - Server environment:user.name=root
2014-08-24 11:52:30,091 [myid:] - INFO [main:Environment@100] - Server environment:user.home=/root
2014-08-24 11:52:30,092 [myid:] - INFO [main:Environment@100] - Server environment:user.dir=/opt/zookeeper-3.4.6
2014-08-24 11:52:30,096 [myid:] - INFO [main:ZooKeeperServer@755] - tickTime set to 2000
2014-08-24 11:52:30,096 [myid:] - INFO [main:ZooKeeperServer@764] - minSessionTimeout set to -1
2014-08-24 11:52:30,096 [myid:] - INFO [main:ZooKeeperServer@773] - maxSessionTimeout set to -1
2014-08-24 11:52:30,114 [myid:] - INFO [main:NIOServerCnxnFactory@94] - binding to port 0.0.0.0/0.0.0.0:2181
erichan@ubuntu14_04_1-pd:~/docker-room$
2 ZK Cluster
使用不同Docker網路模型搭建Zookeeper叢集 作者: 微垣
相關文章
- [Docker系列·2]搭建基於Docker的Nginx伺服器DockerNginx伺服器
- Mesos+Zookeeper+Marathon+Docker環境搭建Docker
- ZooKeeper 系列(二)—— Zookeeper單機環境和叢集環境搭建
- Mac 使用 docker 搭建 kafka 叢集 + Zookeeper + kafka-managerMacDockerKafka
- 使用 Docker 一步搞定 ZooKeeper 叢集的搭建Docker
- 部署伺服器系列二:Linux環境結合Docker搭建node伺服器LinuxDocker
- zookeeper的搭建
- [Docker系列·6]搭建基於Docker的NPM私服SinopiaDockerNPM
- docker安裝zookeeperDocker
- docker使用nginx搭建靜伺服器DockerNginx伺服器
- 使用docker搭建公司redmine伺服器Docker伺服器
- Elasticsearch使用系列-Docker搭建Elasticsearch叢集ElasticsearchDocker
- 部署伺服器系列三:Linux環境結合Docker搭建前端環境伺服器LinuxDocker前端
- zookeeper 叢集搭建
- Zookeeper叢集搭建
- 搭建 zookeeper 叢集
- ZooKeeper環境搭建
- HBase+zookeeper搭建
- Docker下搭建ewomail郵件伺服器DockerAI伺服器
- ZooKeeper 系列(一)—— ZooKeeper核心概念詳解
- Zookeeper系列一:Zookeeper基礎命令操作
- 部署伺服器系列一:Linux環境結合Docker搭建資料庫服務伺服器LinuxDocker資料庫
- Hyperf - windows11 使用docker搭建hyperf框架WindowsDocker框架
- zookeeper 單機版 docker部署Docker
- kafka zookeeper docker容器互聯KafkaDocker
- ZooKeeper 搭建 solr 叢集Solr
- zookeeper叢集的搭建
- ZooKeeper系列(4):ZooKeeper的配置檔案詳解
- ZooKeeper系列(2):ZooKeeper命令列工具zkCli.sh命令列
- 使用 docker 搭建一個 gitea 的 Git 伺服器DockerGit伺服器
- [Prometheus+Grafana系列]基於docker-compose搭建PrometheusGrafanaDocker
- Docker教程之十一安裝 ZookeeperDocker
- Zookeeper Java 客戶端搭建Java客戶端
- zookeeper 高可用叢集搭建
- Zookeeper 叢集環境搭建
- Zookeeper — 本地完全分散式 搭建分散式
- zookeeper偽叢集模式搭建模式
- 使用docker和nginx搭建一個下載伺服器DockerNginx伺服器