Docker-学习总结(集群管理-Docker Stack+Portainer图形)

文章目录

  • Docker Stack
    • 概念
    • 命令
  • Docker stack 实践
    • 实践环境
    • 实践过程
      • 部署一个简单服务
    • 添加监控visualizer
    • 滚动更新
    • 资源控制
    • 图形界面portainer
      • 安装前准备
      • 安装portainer

Docker Stack

概念

  • 技术由来:Docker Swarm在大规模场景下的多服务部署和管理是一件很难的事情,为解决此问题,产生了Docker stack,
    Docker Stack基于Docker Swarm之上来完成对多服务进行部署和管理的
  • 实现方式:通过使用与Compose一样的yml文件中定义应用,然后通过 docker stack deploy 命令完成部署和管理
  • 体系结构:Stack 位于 Docker 应用层级的最顶端。Stack 基于服务进行构建,而服务又基于容器
  • Stack与Compose区别:
    • Docker Stack不支持bulid指令,使用的镜像必须是构建好的,而Docker Compose可以使用,相对而言Docker Compose更适合开发使用
    • Docker Stack是集成在Docker引擎中的,直接使用命令即可,而Docker Compose 则是一个Python项目,使用Docker API规范操作容器
    • Docker Stack不支持version 2的yml文件,至少version 3以上。而Docker Compose 对version 2或3都可以处理
    • Docker Stack 更适合处理多服务也能处理单机服务,而Docker Compose 仅能处理单机服务,所以Docker Stack 可以把Docker Compose的工作都处理了,占据了主导地位。

命令

[root@node1 reg.mydocker.com]# docker stack --help
#格式
Usage:	docker stack [OPTIONS] COMMAND
#Docker stack任务管理
Manage Docker stacks
#选项
Options:
      --orchestrator string   Orchestrator to use (swarm|kubernetes|all)|选择协调器是swarm还是k8s或者2者
#子命令
Commands:
  deploy      Deploy a new stack or update an existing stack| 加载一个新的stack任务或者更新某一stack任务
  ls          List stacks|显示所有stack任务的列表
  ps          List the tasks in the stack|列出某一个stack的详细任务
  rm          Remove one or more stacks|删除一个或者多个stack任务
  services    List the services in the stack|列出某一个stack的所有服务

Docker stack 实践

实践环境

主机 IP 作用
node1 192.168.27.11 安装有Docker(18.09.6)、集群管理节点、可访问私有仓库
node2 192.168.27.12 安装有Docker(18.09.6)、集群工作节点、可访问私有仓库
node3 192.168.27.13 安装有Docker(18.09.6)、集群工作节点、可访问私有仓库
repository 192.168.27.12 搭建有harbor私有仓库,作为集群操作中的镜像使用仓库

实践过程

部署一个简单服务

官方compose文件模板:https://docs.docker.com/compose/compose-file/

  1. 制作一个yml文件,开启一个web服务,使用nginx容器,生成3个副本,自定义卷与网络
[root@node1 stack]# vim docker-stack.yml
version: '3'
services:
  web:
    image: library/nginx
    ports:
      - "80:80"
    volumes:
      - web-data:/usr/share/nginx/html
    networks:
      - vm_net
    deploy:
      replicas: 3
volumes:
  web-data:
networks:
  vm_net:
  1. stack 运行、查看、测试
[root@node1 stack]# docker stack deploy -c docker-stack.yml my_cluster
prots Additional property prots is not allowed
[root@node1 stack]# vim docker-stack.yml
[root@node1 stack]# docker stack deploy -c docker-stack.yml my_cluster
Creating network my_cluster_vm_net
Creating service my_cluster_web
[root@node1 stack]# docker service ls
ID                  NAME                MODE                REPLICAS            IMAGE               PORTS
e0eo4mb2xnxa        my_cluster_web      replicated          3/3                 nginx:latest        *:80->80/tcp
[root@node1 stack]# docker service ps my_cluster_web
ID                  NAME                IMAGE               NODE                DESIRED STATE       CURRENT STATE       ERROR               PORTS
uvq3ayobwam1        my_cluster_web.1    nginx:latest        node1               Running             Running 17 seconds ago
ar53a9v7o94t        my_cluster_web.2    nginx:latest        node3               Running             Running 16 seconds ago
ulji2jzh25qq        my_cluster_web.3    nginx:latest        node2               Running             Running 16 seconds ago
[root@node1 stack]# curl 192.168.27.11
<!DOCTYPE html>


Welcome to nginx<span class="token operator">!</span><<span class="token operator">/</span>title>
<style>
    body <span class="token punctuation">{</span>
        width: 35em<span class="token punctuation">;</span>
        margin: 0 auto<span class="token punctuation">;</span>
        font<span class="token operator">-</span>family: Tahoma<span class="token punctuation">,</span> Verdana<span class="token punctuation">,</span> Arial<span class="token punctuation">,</span> sans<span class="token operator">-</span>serif<span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<<span class="token operator">/</span>style>
<<span class="token operator">/</span>head>
<body>
<h1>Welcome to nginx<span class="token operator">!</span><<span class="token operator">/</span>h1>
<p><span class="token keyword">If</span> you see this page<span class="token punctuation">,</span> the nginx web server is successfully installed and
working<span class="token punctuation">.</span> Further configuration is required<span class="token punctuation">.</span><<span class="token operator">/</span>p>

<p><span class="token keyword">For</span> online documentation and support please refer to
<a href=<span class="token string">"http://nginx.org/"</span>>nginx<span class="token punctuation">.</span>org<<span class="token operator">/</span>a><span class="token punctuation">.</span><br<span class="token operator">/</span>>
Commercial support is available at
<a href=<span class="token string">"http://nginx.com/"</span>>nginx<span class="token punctuation">.</span>com<<span class="token operator">/</span>a><span class="token punctuation">.</span><<span class="token operator">/</span>p>

<p><em>Thank you <span class="token keyword">for</span> <span class="token keyword">using</span> nginx<span class="token punctuation">.</span><<span class="token operator">/</span>em><<span class="token operator">/</span>p>
<<span class="token operator">/</span>body>
<<span class="token operator">/</span>html>
</code></pre> 
  <h2>添加监控visualizer</h2> 
  <ol> 
   <li>修改yml文件</li> 
  </ol> 
  <pre><code class="prism language-powershell">version: <span class="token string">'3'</span>
services:
  web:
    image: library<span class="token operator">/</span>nginx
    ports:
      <span class="token operator">-</span> <span class="token string">"80:80"</span>
    volumes:
      <span class="token operator">-</span> web<span class="token operator">-</span><span class="token keyword">data</span>:<span class="token operator">/</span>usr<span class="token operator">/</span>share<span class="token operator">/</span>nginx<span class="token operator">/</span>html
    networks:
      <span class="token operator">-</span> vm_net
    deploy:
      replicas: 6										<span class="token comment">#副本扩容为6</span>
  visualizer:											<span class="token comment">#添加监控visualizer,docker官方模板</span>
    image: dockersamples<span class="token operator">/</span>visualizer
    ports:
      <span class="token operator">-</span> <span class="token string">"8080:8080"</span>
    stop_grace_period: 1m30s
    volumes:
      <span class="token operator">-</span> <span class="token string">"/var/run/docker.sock:/var/run/docker.sock"</span>
    deploy:
      placement:
        constraints: <span class="token namespace">[node.role == manager]</span>
volumes:
  web<span class="token operator">-</span><span class="token keyword">data</span>:
networks:
  vm_net:
</code></pre> 
  <ol start="2"> 
   <li>stack重载运行,查看</li> 
  </ol> 
  <pre><code class="prism language-powershell"><span class="token namespace">[root@node1 stack]</span><span class="token comment"># docker stack deploy -c docker-stack.yml my_cluster</span>
Creating network my_cluster_default
Updating service my_cluster_web <span class="token punctuation">(</span>id: e0eo4mb2xnxagz9tfj323yye1<span class="token punctuation">)</span>
Creating service my_cluster_visualizer
<span class="token comment"># 更新成功</span>
<span class="token namespace">[root@node1 stack]</span><span class="token comment"># docker service ls</span>
ID                  NAME                    MODE                REPLICAS            IMAGEPORTS
vh66myojbstz        my_cluster_visualizer   replicated          1<span class="token operator">/</span>1                 dockersamples<span class="token operator">/</span>visualizer:latest<span class="token operator">*</span>:8080<span class="token operator">-</span>>8080<span class="token operator">/</span>tcp
e0eo4mb2xnxa        my_cluster_web          replicated          6<span class="token operator">/</span>6                 nginx:latest<span class="token operator">*</span>:80<span class="token operator">-</span>>80<span class="token operator">/</span>tcp
<span class="token comment"># 开启2个服务</span>
<span class="token namespace">[root@node1 stack]</span><span class="token comment"># docker service ps my_cluster_web</span>
ID                  NAME                IMAGE               NODE                DESIRED STATE       CURRENT STATE       ERROR               PORTS
uvq3ayobwam1        my_cluster_web<span class="token punctuation">.</span>1    nginx:latest        node1               Running             Running 14 minutes ago
ar53a9v7o94t        my_cluster_web<span class="token punctuation">.</span>2    nginx:latest        node3               Running             Running 14 minutes ago
ulji2jzh25qq        my_cluster_web<span class="token punctuation">.</span>3    nginx:latest        node2               Running             Running 14 minutes ago
w0vgln16y86q        my_cluster_web<span class="token punctuation">.</span>4    nginx:latest        node1               Running             Running 2 minutesago
i8zdnfyamheh        my_cluster_web<span class="token punctuation">.</span>5    nginx:latest        node3               Running             Running 2 minutesago
j5pjbv1yqnso        my_cluster_web<span class="token punctuation">.</span>6    nginx:latest        node2               Running             Running 2 minutesago
<span class="token comment">#副本数量为6</span>
</code></pre> 
  <ol start="3"> 
   <li>查看web页面<br> <a href="http://img.e-com-net.com/image/info8/89c563b7ffb94c199201ca54f9a5dc4e.jpg" target="_blank"><img src="http://img.e-com-net.com/image/info8/89c563b7ffb94c199201ca54f9a5dc4e.jpg" alt="Docker-学习总结(集群管理-Docker Stack+Portainer图形)_第1张图片" width="477" height="479" style="border:1px solid black;"></a></li> 
  </ol> 
  <h2>滚动更新</h2> 
  <ol> 
   <li>修改yml文件,更新内容由容器nginx变为httpd</li> 
  </ol> 
  <pre><code class="prism language-powershell">version: <span class="token string">'3'</span>
services:
  web:
    image: library<span class="token operator">/</span>httpd						<span class="token comment">#容器变更</span>
    ports:
      <span class="token operator">-</span> <span class="token string">"80:80"</span>
    volumes:
      <span class="token operator">-</span> web<span class="token operator">-</span><span class="token keyword">data</span>:<span class="token operator">/</span>usr<span class="token operator">/</span>local<span class="token operator">/</span>apache2<span class="token operator">/</span>htdocs		<span class="token comment">#挂载地址改变</span>
    networks:
      <span class="token operator">-</span> vm_net
    deploy:
      replicas: 6
      update_config:							<span class="token comment">#升级规则</span>
        parallelism: 2							<span class="token comment">#每次更新2个副本</span>
        delay: 5s								<span class="token comment">#每批次间隔5秒</span>
      restart_policy:							<span class="token comment">#副本重启规则</span>
        condition: on<span class="token operator">-</span>failure
  visualizer:
    image: dockersamples<span class="token operator">/</span>visualizer
    ports:
      <span class="token operator">-</span> <span class="token string">"8080:8080"</span>
    stop_grace_period: 1m30s
    volumes:
      <span class="token operator">-</span> <span class="token string">"/var/run/docker.sock:/var/run/docker.sock"</span>
    deploy:
      placement:
        constraints: <span class="token namespace">[node.role == manager]</span>
volumes:
  web<span class="token operator">-</span><span class="token keyword">data</span>:
networks:
  vm_net:
</code></pre> 
  <ol start="2"> 
   <li>查看变革效果</li> 
  </ol> 
  <pre><code class="prism language-powershell"><span class="token namespace">[root@node1 stack]</span><span class="token comment"># docker stack deploy -c docker-stack.yml my_cluster</span>
Updating service my_cluster_web <span class="token punctuation">(</span>id: e0eo4mb2xnxagz9tfj323yye1<span class="token punctuation">)</span>
Updating service my_cluster_visualizer <span class="token punctuation">(</span>id: vh66myojbstzpkzqb7w1idoqf<span class="token punctuation">)</span>
<span class="token comment">#stack更新成功</span>
<span class="token namespace">[root@node1 stack]</span><span class="token comment"># docker service ls</span>
ID                  NAME                    MODE                REPLICAS            IMAGEPORTS
vh66myojbstz        my_cluster_visualizer   replicated          1<span class="token operator">/</span>1                 dockersamples<span class="token operator">/</span>visualizer:latest<span class="token operator">*</span>:8080<span class="token operator">-</span>>8080<span class="token operator">/</span>tcp
e0eo4mb2xnxa        my_cluster_web          replicated          6<span class="token operator">/</span>6                 httpd:latest<span class="token operator">*</span>:80<span class="token operator">-</span>>80<span class="token operator">/</span>tcp
<span class="token namespace">[root@node1 stack]</span><span class="token comment"># docker service ps my_cluster_web</span>
ID                  NAME                   IMAGE               NODE                DESIRED STATE       CURRENT STATE          ERROR               PORTS
t3kkv9bnatzb        my_cluster_web<span class="token punctuation">.</span>1       httpd:latest        node1               Running             Running 2 minutes ago
uvq3ayobwam1         \_ my_cluster_web<span class="token punctuation">.</span>1   nginx:latest        node1               Shutdown            Shutdown 2 minutes ago
4jipeibbrhvx        my_cluster_web<span class="token punctuation">.</span>2       httpd:latest        node3               Running             Running 2 minutes ago
ar53a9v7o94t         \_ my_cluster_web<span class="token punctuation">.</span>2   nginx:latest        node3               Shutdown            Shutdown 2 minutes ago
i10n4vu3ml6a        my_cluster_web<span class="token punctuation">.</span>3       httpd:latest        node2               Running             Running 2 minutes ago
ulji2jzh25qq         \_ my_cluster_web<span class="token punctuation">.</span>3   nginx:latest        node2               Shutdown            Shutdown 2 minutes ago
zftgr62l49ae        my_cluster_web<span class="token punctuation">.</span>4       httpd:latest        node1               Running             Running 2 minutes ago
w0vgln16y86q         \_ my_cluster_web<span class="token punctuation">.</span>4   nginx:latest        node1               Shutdown            Shutdown 2 minutes ago
bcc84ui7qb7o        my_cluster_web<span class="token punctuation">.</span>5       httpd:latest        node3               Running             Running 2 minutes ago
i8zdnfyamheh         \_ my_cluster_web<span class="token punctuation">.</span>5   nginx:latest        node3               Shutdown            Shutdown 2 minutes ago
9qxvk8z43yg4        my_cluster_web<span class="token punctuation">.</span>6       httpd:latest        node2               Running             Running 2 minutes ago
j5pjbv1yqnso         \_ my_cluster_web<span class="token punctuation">.</span>6   nginx:latest        node2               Shutdown            Shutdown 2 minutes ago
</code></pre> 
  <ol start="3"> 
   <li>查看web页面显示变更成功<br> <a href="http://img.e-com-net.com/image/info8/a42772bd614a4794b39c0b703c3bb856.jpg" target="_blank"><img src="http://img.e-com-net.com/image/info8/a42772bd614a4794b39c0b703c3bb856.jpg" alt="Docker-学习总结(集群管理-Docker Stack+Portainer图形)_第2张图片" width="438" height="459" style="border:1px solid black;"></a></li> 
  </ol> 
  <h2>资源控制</h2> 
  <p><mark>官方文档中:RESOURCES部分</mark></p> 
  <ol> 
   <li>查看没有限制时的状态</li> 
  </ol> 
  <pre><code class="prism language-powershell"><span class="token namespace">[root@node1 stack]</span><span class="token comment"># docker ps -a</span>
CONTAINER ID        IMAGE                             COMMAND                  CREATED             STATUS
cd8318ca5acc        httpd:latest                      <span class="token string">"httpd-foreground"</span>       10 minutes ago      Up 10 minute
0541ae18272d        httpd:latest                      <span class="token string">"httpd-foreground"</span>       10 minutes ago      Up 10 minute
860e5f8ca1ea        dockersamples<span class="token operator">/</span>visualizer:latest   <span class="token string">"npm start"</span>              26 minutes ago      Up 25 minute
33713d5af03b        dockersamples<span class="token operator">/</span>visualizer:latest   <span class="token string">"npm start"</span>              27 minutes ago      Exited <span class="token punctuation">(</span>0<span class="token punctuation">)</span> 2
f234441e886b        nginx:latest                      <span class="token string">"nginx -g 'daemon of…"</span>   39 minutes ago      Exited <span class="token punctuation">(</span>0<span class="token punctuation">)</span> 1
0db5d8d7ed5c        nginx:latest                      <span class="token string">"nginx -g 'daemon of…"</span>   About an hour ago   Exited <span class="token punctuation">(</span>0<span class="token punctuation">)</span> 1
<span class="token comment">#选择查看容器cd8318ca5acc</span>
<span class="token namespace">[root@node1 stack]</span><span class="token comment"># cd /sys/fs/cgroup/memory/docker/</span>
<span class="token comment">#进入cgroup文件下内存</span>
<span class="token namespace">[root@node1 docker]</span><span class="token comment"># cd cd8318ca5acc823e25d2fe5ddb2b4a01cc0635f0587cd1e6ec324e55718f5679/</span>
<span class="token namespace">[root@node1 cd8318ca5acc823e25d2fe5ddb2b4a01cc0635f0587cd1e6ec324e55718f5679]</span><span class="token comment"># cat memory.limit_in_bytes</span>
9223372036854771712
<span class="token comment">#查看容器上限</span>
</code></pre> 
  <ol start="2"> 
   <li>修改yml文件,添加资源限制,stack重新加载</li> 
  </ol> 
  <pre><code class="prism language-powershell">version: <span class="token string">'3'</span>
services:
  web:
    image: library<span class="token operator">/</span>httpd
    ports:
      <span class="token operator">-</span> <span class="token string">"80:80"</span>
    volumes:
      <span class="token operator">-</span> web<span class="token operator">-</span><span class="token keyword">data</span>:<span class="token operator">/</span>usr<span class="token operator">/</span>local<span class="token operator">/</span>apache2<span class="token operator">/</span>htdocs
    networks:
      <span class="token operator">-</span> vm_net
    deploy:
      replicas: 6
      update_config:
        parallelism: 2
        delay: 5s
      restart_policy:
        condition: on<span class="token operator">-</span>failure
      resources:										<span class="token comment">#资源限制模块</span>
        limits:
          cpus: <span class="token string">'0.50'</span>									<span class="token comment">#cpu使用为50%</span>
          memory: 50M									<span class="token comment">#限制内容为50M</span>
  visualizer:
    image: dockersamples<span class="token operator">/</span>visualizer
    ports:
      <span class="token operator">-</span> <span class="token string">"8080:8080"</span>
    stop_grace_period: 1m30s
    volumes:
      <span class="token operator">-</span> <span class="token string">"/var/run/docker.sock:/var/run/docker.sock"</span>
    deploy:
      placement:
        constraints: <span class="token namespace">[node.role == manager]</span>
volumes:
  web<span class="token operator">-</span><span class="token keyword">data</span>:
networks:
  vm_net:
  
<span class="token namespace">[root@node1 stack]</span><span class="token comment"># docker stack deploy -c docker-stack.yml my_cluster</span>
Updating service my_cluster_web <span class="token punctuation">(</span>id: e0eo4mb2xnxagz9tfj323yye1<span class="token punctuation">)</span>
Updating service my_cluster_visualizer <span class="token punctuation">(</span>id: vh66myojbstzpkzqb7w1idoqf<span class="token punctuation">)</span>
<span class="token comment">#重新加载</span>
</code></pre> 
  <ol start="3"> 
   <li>查看限制后的状态<br> <mark>因为更新了容器,所以查看容器ID也会变</mark></li> 
  </ol> 
  <pre><code class="prism language-powershell"><span class="token namespace">[root@node1 stack]</span><span class="token comment"># docker ps -a</span>
CONTAINER ID        IMAGE                             COMMAND                  CREATED             STATUS
8d6002aee00f        httpd:latest                      <span class="token string">"httpd-foreground"</span>       4 minutes ago       Up 4 minutes
b98bf43f34e3        httpd:latest                      <span class="token string">"httpd-foreground"</span>       4 minutes ago       Up 4 minutes
cd8318ca5acc        httpd:latest                      <span class="token string">"httpd-foreground"</span>       17 minutes ago      Exited <span class="token punctuation">(</span>0<span class="token punctuation">)</span> 4
0541ae18272d        httpd:latest                      <span class="token string">"httpd-foreground"</span>       17 minutes ago      Exited <span class="token punctuation">(</span>0<span class="token punctuation">)</span> 4
860e5f8ca1ea        dockersamples<span class="token operator">/</span>visualizer:latest   <span class="token string">"npm start"</span>              33 minutes ago      Up 33 minute
33713d5af03b        dockersamples<span class="token operator">/</span>visualizer:latest   <span class="token string">"npm start"</span>              34 minutes ago      Exited <span class="token punctuation">(</span>0<span class="token punctuation">)</span> 3
f234441e886b        nginx:latest                      <span class="token string">"nginx -g 'daemon of…"</span>   About an hour ago   Exited <span class="token punctuation">(</span>0<span class="token punctuation">)</span> 1
0db5d8d7ed5c        nginx:latest                      <span class="token string">"nginx -g 'daemon of…"</span>   About an hour ago   Exited <span class="token punctuation">(</span>0<span class="token punctuation">)</span> 1
<span class="token comment">#查看新生成的容器是不是都是50M,容器是8d6002aee00f和b98bf43f34e3</span>
<span class="token namespace">[root@node1 ~]</span><span class="token comment"># cd /sys/fs/cgroup/memory/docker/</span>
<span class="token namespace">[root@node1 docker]</span><span class="token comment"># ls</span>
860e5f8ca1ea7a2d5de91bd856340792ad037ce8f7f4faac224024daad11760b  memory<span class="token punctuation">.</span>failcnt                  memory<span class="token punctuation">.</span>kmem<span class="token punctuation">.</span>t
8d6002aee00f5ed539fa022899eb3c0dd14968e277ef569e739473cf7a48ca57  memory<span class="token punctuation">.</span>force_empty              memory<span class="token punctuation">.</span>kmem<span class="token punctuation">.</span>t
b98bf43f34e3e5f5b3d1a6e9246c273991938c500828cd5dd474ec0188087d10  memory<span class="token punctuation">.</span>kmem<span class="token punctuation">.</span>failcnt             memory<span class="token punctuation">.</span>kmem<span class="token punctuation">.</span>t
cgroup<span class="token punctuation">.</span>clone_children                                             memory<span class="token punctuation">.</span>kmem<span class="token punctuation">.</span>limit_in_bytes      memory<span class="token punctuation">.</span>kmem<span class="token punctuation">.</span>t
cgroup<span class="token punctuation">.</span>event_control                                              memory<span class="token punctuation">.</span>kmem<span class="token punctuation">.</span>max_usage_in_bytes  memory<span class="token punctuation">.</span>kmem<span class="token punctuation">.</span>u
cgroup<span class="token punctuation">.</span>procs                                                      memory<span class="token punctuation">.</span>kmem<span class="token punctuation">.</span>slabinfo            memory<span class="token punctuation">.</span>limit_
<span class="token namespace">[root@node1 docker]</span><span class="token comment"># cd 8d6002aee00f5ed539fa022899eb3c0dd14968e277ef569e739473cf7a48ca57/</span>
<span class="token namespace">[root@node1 8d6002aee00f5ed539fa022899eb3c0dd14968e277ef569e739473cf7a48ca57]</span><span class="token comment"># cat memory.limit_in_bytes</span>
52428800
<span class="token namespace">[root@node1 8d6002aee00f5ed539fa022899eb3c0dd14968e277ef569e739473cf7a48ca57]</span><span class="token comment"># cd ..</span>
<span class="token namespace">[root@node1 docker]</span><span class="token comment"># cd b98bf43f34e3e5f5b3d1a6e9246c273991938c500828cd5dd474ec0188087d10/</span>
<span class="token namespace">[root@node1 b98bf43f34e3e5f5b3d1a6e9246c273991938c500828cd5dd474ec0188087d10]</span><span class="token comment"># cat memory.limit_in_bytes</span>
52428800
<span class="token comment">#显示2个容器均改为了50M</span>
</code></pre> 
  <h2>图形界面portainer</h2> 
  <ul> 
   <li>官方网站:https://www.portainer.io/</li> 
  </ul> 
  <h3>安装前准备</h3> 
  <ol> 
   <li>portainer运行文件:https://downloads.portainer.io/portainer-agent-stack.yml</li> 
   <li>portainer软件:portainer/portainer 和portainer/agent,在公有DockerHUB中可以下载,存放在本地harbor仓库中</li> 
  </ol> 
  <h3>安装portainer</h3> 
  <pre><code class="prism language-powershell"><span class="token namespace">[root@node1 opt]</span><span class="token comment"># docker stack deploy -c portainer-agent-stack.yml portainer</span>
Creating network portainer_agent_network
Creating service portainer_agent
Creating service portainer_portainer
<span class="token namespace">[root@node1 opt]</span><span class="token comment"># docker service ls</span>
ID                  NAME                  MODE                REPLICAS            IMAGE                        PORTS
87yizm4zhk2k        portainer_agent       global              3<span class="token operator">/</span>3                 portainer<span class="token operator">/</span>agent:latest
g63njdqrld84        portainer_portainer   replicated          1<span class="token operator">/</span>1                 portainer<span class="token operator">/</span>portainer:latest   <span class="token operator">*</span>:8000<span class="token operator">-</span>>8000<span class="token operator">/</span>tcp<span class="token punctuation">,</span> <span class="token operator">*</span>:9000<span class="token operator">-</span>>9000<span class="token operator">/</span>tcp
<span class="token namespace">[root@node1 opt]</span><span class="token comment"># docker service ls</span>
ID                  NAME                  MODE                REPLICAS            IMAGE                        PORTS
87yizm4zhk2k        portainer_agent       global              3<span class="token operator">/</span>3                 portainer<span class="token operator">/</span>agent:latest
g63njdqrld84        portainer_portainer   replicated          1<span class="token operator">/</span>1                 portainer<span class="token operator">/</span>portainer:latest   <span class="token operator">*</span>:8000<span class="token operator">-</span>>8000<span class="token operator">/</span>tcp<span class="token punctuation">,</span> <span class="token operator">*</span>:9000<span class="token operator">-</span>>9000<span class="token operator">/</span>tcp

</code></pre> 
  <ol start="3"> 
   <li>web页面查看IP地址:9000端口<br> <mark>第一次登录,设置8位数密码,没截到图</mark><br> <a href="http://img.e-com-net.com/image/info8/70be715a7f36405593c256f9be4bf4f3.jpg" target="_blank"><img src="http://img.e-com-net.com/image/info8/70be715a7f36405593c256f9be4bf4f3.jpg" alt="Docker-学习总结(集群管理-Docker Stack+Portainer图形)_第3张图片" width="650" height="194" style="border:1px solid black;"></a></li> 
  </ol> 
 </div> 
</div>
                            </div>
                        </div>
                    </div>
                    <!--PC和WAP自适应版-->
                    <div id="SOHUCS" sid="1275113684464582656"></div>
                    <script type="text/javascript" src="/views/front/js/chanyan.js"></script>
                    <!-- 文章页-底部 动态广告位 -->
                    <div class="youdao-fixed-ad" id="detail_ad_bottom"></div>
                </div>
                <div class="col-md-3">
                    <div class="row" id="ad">
                        <!-- 文章页-右侧1 动态广告位 -->
                        <div id="right-1" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad">
                            <div class="youdao-fixed-ad" id="detail_ad_1"> </div>
                        </div>
                        <!-- 文章页-右侧2 动态广告位 -->
                        <div id="right-2" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad">
                            <div class="youdao-fixed-ad" id="detail_ad_2"></div>
                        </div>
                        <!-- 文章页-右侧3 动态广告位 -->
                        <div id="right-3" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad">
                            <div class="youdao-fixed-ad" id="detail_ad_3"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="container">
        <h4 class="pt20 mb15 mt0 border-top">你可能感兴趣的:(Linux运维-企业实战,Docker)</h4>
        <div id="paradigm-article-related">
            <div class="recommend-post mb30">
                <ul class="widget-links">
                    <li><a href="/article/1835502578050363392.htm"
                           title="PHP环境搭建详细教程" target="_blank">PHP环境搭建详细教程</a>
                        <span class="text-muted">好看资源平台</span>
<a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/php/1.htm">php</a>
                        <div>PHP是一个流行的服务器端脚本语言,广泛用于Web开发。为了使PHP能够在本地或服务器上运行,我们需要搭建一个合适的PHP环境。本教程将结合最新资料,介绍在不同操作系统上搭建PHP开发环境的多种方法,包括Windows、macOS和Linux系统的安装步骤,以及本地和Docker环境的配置。1.PHP环境搭建概述PHP环境的搭建主要分为以下几类:集成开发环境:例如XAMPP、WAMP、MAMP,这</div>
                    </li>
                    <li><a href="/article/1835485429059645440.htm"
                           title="docker" target="_blank">docker</a>
                        <span class="text-muted">igotyback</span>
<a class="tag" taget="_blank" href="/search/eureka/1.htm">eureka</a><a class="tag" taget="_blank" href="/search/%E4%BA%91%E5%8E%9F%E7%94%9F/1.htm">云原生</a>
                        <div>Docker容器的文件系统是隔离的,但是可以通过挂载卷(Volumes)或绑定挂载(BindMounts)将宿主机的文件系统目录映射到容器内部。要查看Docker容器的映射路径,可以使用以下方法:查看容器配置:使用dockerinspect命令可以查看容器的详细配置信息,包括挂载的卷。例如:bashdockerinspect在输出的JSON格式中,查找"Mounts"部分,这里会列出所有的挂载信息</div>
                    </li>
                    <li><a href="/article/1835447859219099648.htm"
                           title="06选课支付模块之基于消息队列发送支付通知消息" target="_blank">06选课支付模块之基于消息队列发送支付通知消息</a>
                        <span class="text-muted">echo 云清</span>
<a class="tag" taget="_blank" href="/search/%E5%AD%A6%E6%88%90%E5%9C%A8%E7%BA%BF/1.htm">学成在线</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/rabbitmq/1.htm">rabbitmq</a><a class="tag" taget="_blank" href="/search/%E6%B6%88%E6%81%AF%E9%98%9F%E5%88%97/1.htm">消息队列</a><a class="tag" taget="_blank" href="/search/%E6%94%AF%E4%BB%98%E9%80%9A%E7%9F%A5/1.htm">支付通知</a><a class="tag" taget="_blank" href="/search/%E5%AD%A6%E6%88%90%E5%9C%A8%E7%BA%BF/1.htm">学成在线</a>
                        <div>消息队列发送支付通知消息需求分析订单服务作为通用服务,在订单支付成功后需要将支付结果异步通知给其他对接的微服务,微服务收到支付结果根据订单的类型去更新自己的业务数据技术方案使用消息队列进行异步通知需要保证消息的可靠性即生产端将消息成功通知到服务端:消息发送到交换机-->由交换机发送到队列-->消费者监听队列,收到消息进行处理,参考文章02-使用Docker安装RabbitMQ-CSDN博客生产者确</div>
                    </li>
                    <li><a href="/article/1835408447806468096.htm"
                           title="Ubuntu18.04 Docker部署Kinship(Django)项目过程" target="_blank">Ubuntu18.04 Docker部署Kinship(Django)项目过程</a>
                        <span class="text-muted">Dante617</span>

                        <div>1Docker的安装https://blog.csdn.net/weixin_41735055/article/details/1003551792下载镜像dockerpullprogramize/python3.6.8-dlib下载的镜像里包含python3.6.8和dlib19.17.03启动镜像dockerrun-it--namekinship-p7777:80-p3307:3306-p55</div>
                    </li>
                    <li><a href="/article/1835399957885054976.htm"
                           title="docker from指令的含义_多个FROM-含义" target="_blank">docker from指令的含义_多个FROM-含义</a>
                        <span class="text-muted">weixin_39722188</span>
<a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/from%E6%8C%87%E4%BB%A4%E7%9A%84%E5%90%AB%E4%B9%89/1.htm">from指令的含义</a>
                        <div>小编典典什么是基本图片?一组文件,加上EXPOSE端口ENTRYPOINT和CMD。您可以添加文件并基于该基础图像构建新图像,Dockerfile并以FROM指令开头:后面提到的图像FROM是新图像的“基础图像”。这是否意味着如果我neo4j/neo4j在FROM指令中声明,则在运行映像时,neo数据库将自动运行并且可在端口7474的容器中使用?仅当您不覆盖CMD和时ENTRYPOINT。但是图像</div>
                    </li>
                    <li><a href="/article/1835399831116410880.htm"
                           title="Dockerfile FROM 两个" target="_blank">Dockerfile FROM 两个</a>
                        <span class="text-muted">redDelta</span>

                        <div>Docker相关视频讲解:什么是容器Docker介绍实现"DockerfileFROM两个"的步骤步骤表格步骤操作1创建一个Dockerfile文件2写入FROM指令3构建第一个镜像4创建第二个Dockerfile文件5写入FROM指令6构建第二个镜像7合并两个镜像操作步骤说明步骤1:创建一个Dockerfile文件使用任意文本编辑器创建一个名为Dockerfile的文件。登录后复制#Docker</div>
                    </li>
                    <li><a href="/article/1835395039572881408.htm"
                           title="Dockerfile命令详解之 FROM" target="_blank">Dockerfile命令详解之 FROM</a>
                        <span class="text-muted">清风怎不知意</span>
<a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8%E5%8C%96/1.htm">容器化</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a>
                        <div>许多同学不知道Dockerfile应该如何写,不清楚Dockerfile中的指令分别有什么意义,能达到什么样的目的,接下来我将在容器化专栏中详细的为大家解释每一个指令的含义以及用法。专栏订阅传送门https://blog.csdn.net/qq_38220908/category_11989778.html指令不区分大小写。但是,按照惯例,它们应该是大写的,以便更容易地将它们与参数区分开来。(引用</div>
                    </li>
                    <li><a href="/article/1835394786899619840.htm"
                           title="Dockerfile(1) - FROM 指令详解" target="_blank">Dockerfile(1) - FROM 指令详解</a>
                        <span class="text-muted">小菠萝测试笔记</span>
<a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/cmd/1.htm">cmd</a><a class="tag" taget="_blank" href="/search/%E5%A4%A7%E6%95%B0%E6%8D%AE/1.htm">大数据</a>
                        <div>FROM指明当前的镜像基于哪个镜像构建dockerfile必须以FROM开头,除了ARG命令可以在FROM前面FROM[--platform=][AS]FROM[--platform=][:][AS]FROM[--platform=][@][AS]小栗子FROMalpine:latest一个dockerfile可以有多个FROM可以有多个FROM来创建多个镜像,或区分构建阶段,将一个构建阶段作为另</div>
                    </li>
                    <li><a href="/article/1835379662918873088.htm"
                           title="【从问题中去学习k8s】k8s中的常见面试题(夯实理论基础)(二十八)" target="_blank">【从问题中去学习k8s】k8s中的常见面试题(夯实理论基础)(二十八)</a>
                        <span class="text-muted">向往风的男子</span>
<a class="tag" taget="_blank" href="/search/k8s/1.htm">k8s</a><a class="tag" taget="_blank" href="/search/%E5%AD%A6%E4%B9%A0/1.htm">学习</a><a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a>
                        <div>本站以分享各种运维经验和运维所需要的技能为主《python零基础入门》:python零基础入门学习《python运维脚本》:python运维脚本实践《shell》:shell学习《terraform》持续更新中:terraform_Aws学习零基础入门到最佳实战《k8》从问题中去学习k8s《docker学习》暂未更新《ceph学习》ceph日常问题解决分享《日志收集》ELK+各种中间件《运维日常》</div>
                    </li>
                    <li><a href="/article/1835331377520799744.htm"
                           title="【K8s】专题十一:Kubernetes 集群证书过期处理方法" target="_blank">【K8s】专题十一:Kubernetes 集群证书过期处理方法</a>
                        <span class="text-muted">行者Sun1989</span>
<a class="tag" taget="_blank" href="/search/Kubernetes/1.htm">Kubernetes</a><a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/%E4%BA%91%E5%8E%9F%E7%94%9F/1.htm">云原生</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a>
                        <div>本文内容均来自个人笔记并重新梳理,如有错误欢迎指正!如果对您有帮助,烦请点赞、关注、转发、订阅专栏!专栏订阅入口Linux专栏|Docker专栏|Kubernetes专栏往期精彩文章【Docker】(全网首发)KylinV10下MySQL容器内存占用异常的解决方法【Docker】(全网首发)KylinV10下MySQL容器内存占用异常的解决方法(续)【Docker】MySQL源码构建Docker镜</div>
                    </li>
                    <li><a href="/article/1835269935358636032.htm"
                           title="Docker学习十一:Kubernetes概述" target="_blank">Docker学习十一:Kubernetes概述</a>
                        <span class="text-muted">爱打羽球的程序猿</span>
<a class="tag" taget="_blank" href="/search/Docker%E5%AD%A6%E4%B9%A0%E7%B3%BB%E5%88%97/1.htm">Docker学习系列</a><a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/%E5%AD%A6%E4%B9%A0/1.htm">学习</a>
                        <div>一、Kubernetes简介2006年,Google提出了云计算的概念,当时的云计算领域还是以虚拟机为代表的云平台。2013年,Docker横空出世,Docker提出了镜像、仓库等核心概念,规范了服务的交付标准,使得复杂服务的落地变得更加简单,之后Docker又定义了OCI标准,Docker在容器领域称为事实的标准。但是,Docker诞生只是帮助定义了开发和交付标准,如果想要在生产环境中大批量的使</div>
                    </li>
                    <li><a href="/article/1835267918531751936.htm"
                           title="安装 `privoxy` 将 Socks5 转换为 HTTP 代理" target="_blank">安装 `privoxy` 将 Socks5 转换为 HTTP 代理</a>
                        <span class="text-muted">MonkeyKing.sun</span>
<a class="tag" taget="_blank" href="/search/%E7%BD%91%E7%BB%9C/1.htm">网络</a>
                        <div>(base)shgbitai@shgbitai-C9X299-PGF:~/tools$curl-xhttp://127.0.0.1:1080https://registry-1.docker.io/v2/curl:(56)ProxyCONNECTaborted(base)shgbitai@shgbitai-C9X299-PGF:~/tools$curl-xhttps://127.0.0.1:108</div>
                    </li>
                    <li><a href="/article/1835267665455837184.htm"
                           title="Halo 开发者指南——容器私有化部署" target="_blank">Halo 开发者指南——容器私有化部署</a>
                        <span class="text-muted">SHENHUANJIE</span>
<a class="tag" taget="_blank" href="/search/Docker/1.htm">Docker</a><a class="tag" taget="_blank" href="/search/Halo/1.htm">Halo</a><a class="tag" taget="_blank" href="/search/%E5%8D%8E%E4%B8%BA%E4%BA%91/1.htm">华为云</a><a class="tag" taget="_blank" href="/search/SWR/1.htm">SWR</a><a class="tag" taget="_blank" href="/search/Registry/1.htm">Registry</a>
                        <div>华为云SWR私有化部署镜像构建dockerbuild-thalo-dev/halo:2.20.0.上传镜像镜像标签sudodockertag{镜像名称}:{版本名称}swr.cn-south-1.myhuaweicloud.com/{组织名称}/{镜像名称}:{版本名称}sudodockertaghalo-dev/halo:2.20.0swr.cn-south-1.myhuaweicloud.co</div>
                    </li>
                    <li><a href="/article/1835262244313722880.htm"
                           title="SpringBoot整合ES搜索引擎 实现网站热搜词及热度计算" target="_blank">SpringBoot整合ES搜索引擎 实现网站热搜词及热度计算</a>
                        <span class="text-muted">码踏云端</span>
<a class="tag" taget="_blank" href="/search/springboot/1.htm">springboot</a><a class="tag" taget="_blank" href="/search/Elasticsearch/1.htm">Elasticsearch</a><a class="tag" taget="_blank" href="/search/spring/1.htm">spring</a><a class="tag" taget="_blank" href="/search/boot/1.htm">boot</a><a class="tag" taget="_blank" href="/search/elasticsearch/1.htm">elasticsearch</a><a class="tag" taget="_blank" href="/search/%E5%90%8E%E7%AB%AF/1.htm">后端</a><a class="tag" taget="_blank" href="/search/%E7%83%AD%E6%90%9C%E8%AF%8D/1.htm">热搜词</a><a class="tag" taget="_blank" href="/search/%E7%83%AD%E5%BA%A6%E8%AE%A1%E7%AE%97/1.htm">热度计算</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a>
                        <div>博主简介:历代文学网(PC端可以访问:https://literature.sinhy.com/#/literature?__c=1000,移动端可微信小程序搜索“历代文学”)总架构师,15年工作经验,精通Java编程,高并发设计,Springboot和微服务,熟悉Linux,ESXI虚拟化以及云原生Docker和K8s,热衷于探索科技的边界,并将理论知识转化为实际应用。保持对新技术的好奇心,乐于</div>
                    </li>
                    <li><a href="/article/1835259716809355264.htm"
                           title="小白 | 华为云docker设置镜像加速器" target="_blank">小白 | 华为云docker设置镜像加速器</a>
                        <span class="text-muted">伏一</span>
<a class="tag" taget="_blank" href="/search/%E5%B7%A5%E5%85%B7%E5%AE%89%E8%A3%85/1.htm">工具安装</a><a class="tag" taget="_blank" href="/search/%E5%8D%8E%E4%B8%BA%E4%BA%91/1.htm">华为云</a><a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a>
                        <div>一、操作场景通过dockerpull命令下载镜像中心的公有镜像时,往往会因为网络原因而需要很长时间,甚至可能因超时而下载失败。为此,容器镜像服务提供了镜像下载加速功能,帮助您获得更快的下载体验。二、约束与限制构建镜像的客户端所安装的容器引擎(Docker)版本必须为1.11.2及以上。“华北-乌兰察布一”、“亚太-雅加达”、“拉美-墨西哥城一”、“拉美-墨西哥城二”和“拉美-圣保罗一”区域不支持该</div>
                    </li>
                    <li><a href="/article/1835245099416645632.htm"
                           title="docker改容器IP的两种方法" target="_blank">docker改容器IP的两种方法</a>
                        <span class="text-muted">redmond88</span>
<a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/tcp%2Fip/1.htm">tcp/ip</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a>
                        <div>最简单实用的方法:docker默认的内网网段为172.17.0.0/16,如果公司内网网段也是172.17.x.x的话,就会发生路由冲突。解决办法改路由比较办法,可以一开始就将docker配置的bip改成169.254.0.1/24,可以避免冲突。在daemon配置文件里加个"bip":“169.254.0.1/24”,重启docker就可以了1234[root@st-dev6~]#vim/etc</div>
                    </li>
                    <li><a href="/article/1835199093819928576.htm"
                           title="docker 安装、运行nginx shell脚本" target="_blank">docker 安装、运行nginx shell脚本</a>
                        <span class="text-muted">三希</span>
<a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/nginx/1.htm">nginx</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a>
                        <div>以下是一个简单的用于安装和运行DockerNginx的shell脚本:bash#!/bin/bash#安装Docker(如果还未安装)#请根据实际情况调整安装命令#拉取Nginx镜像dockerpullnginx#运行Nginx容器dockerrun-d--namemynginx-p80:80nginx</div>
                    </li>
                    <li><a href="/article/1835189633021997056.htm"
                           title="docker项目切换(nginx)、重启shell 脚本" target="_blank">docker项目切换(nginx)、重启shell 脚本</a>
                        <span class="text-muted">懒惰的小蜗牛</span>
<a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/nginx/1.htm">nginx</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a>
                        <div>docker项目切换、重启脚本背景具体操作nginx配置配置文件1配置文件2编写nginx替换脚本(用来执行端口替换)编写启动脚本dockerfile文件正常编写给脚本授权执行./start脚本背景项目部署docker中,更新项目时,需要将原原来的容器停止,再启动新的容器,这样会有一个空窗期,导致不可用解决方案:映射不同的端口并启动新的容器,将nginx转发到新容器,停止旧容器具体操作说明ngin</div>
                    </li>
                    <li><a href="/article/1835187991388188672.htm"
                           title="FastCGI结合docker下的Nginx执行shell脚本" target="_blank">FastCGI结合docker下的Nginx执行shell脚本</a>
                        <span class="text-muted">南波波</span>
<a class="tag" taget="_blank" href="/search/nginx/1.htm">nginx</a><a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a>
                        <div>1使用docker下载Nginx下面展示一些内联代码片。a.#dockerpullnginx#dockerrun--namerunoob-php-nginx-p8088:80-d\-v~/nginx/www:/usr/share/nginx/html:ro\-v~/nginx/conf/conf.d:/etc/nginx/conf.d:ro\nginxb.在~/nginx/conf/conf.d创</div>
                    </li>
                    <li><a href="/article/1835159463812755456.htm"
                           title="【docker npm】npm 私库" target="_blank">【docker npm】npm 私库</a>
                        <span class="text-muted">琴 韵</span>
<a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/npm/1.htm">npm</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a>
                        <div>1.部署环境window11x64DockerDesktop4.34.1(166053)DockerEnginev27.2.01.1.Docker镜像源1.1.1.DockerEngine配置{"builder":{"features":{"buildkit":true},"gc":{"defaultKeepStorage":"32GB","enabled":true}},"experimenta</div>
                    </li>
                    <li><a href="/article/1835131862654218240.htm"
                           title="Docker安装Kafka和Kafka-Manager" target="_blank">Docker安装Kafka和Kafka-Manager</a>
                        <span class="text-muted">阿靖哦</span>

                        <div>本文介绍如何通过Docker安装kafka与kafka界面管理界面一、拉取zookeeper由于kafka需要依赖于zookeeper,因此这里先运行zookeeper1、拉取镜像dockerpullwurstmeister/zookeeper2、启动dockerrun-d--namezookeeper-p2181:2181-eTZ="Asia/Shanghai"--restartalwayswu</div>
                    </li>
                    <li><a href="/article/1835130592988065792.htm"
                           title="主流行架构" target="_blank">主流行架构</a>
                        <span class="text-muted">rainbowcheng</span>
<a class="tag" taget="_blank" href="/search/%E6%9E%B6%E6%9E%84/1.htm">架构</a><a class="tag" taget="_blank" href="/search/%E6%9E%B6%E6%9E%84/1.htm">架构</a>
                        <div>nexus,gitlab,svn,jenkins,sonar,docker,apollo,catteambition,axure,蓝湖,禅道,WCP;redis,kafka,es,zookeeper,dubbo,shardingjdbc,mysql,InfluxDB,Telegraf,Grafana,Nginx,xxl-job,Neo4j,NebulaGraph是一个高性能的,NOSQL图形数据库</div>
                    </li>
                    <li><a href="/article/1835075002773368832.htm"
                           title="单节点canal的介绍和搭建(对接mysql和rocketMQ)" target="_blank">单节点canal的介绍和搭建(对接mysql和rocketMQ)</a>
                        <span class="text-muted">汀风</span>
<a class="tag" taget="_blank" href="/search/%E4%B8%AD%E9%97%B4%E4%BB%B6/1.htm">中间件</a><a class="tag" taget="_blank" href="/search/%E9%98%BF%E9%87%8C%E4%BA%91/1.htm">阿里云</a><a class="tag" taget="_blank" href="/search/mysql/1.htm">mysql</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a>
                        <div>单节点canal-server+canal-admin的介绍和搭建(对接mysql和rocketMQ)一、简介1、Canal1、工作原理2、MySQL主从复制实现3、canal架构4、binarylog1、新增binlog2、更新binglog3、增加字段bin-log4、删除字段bin-log5、修改字段bin-log二、使用2.1安装1、本地安装2、docker安装canal-admincan</div>
                    </li>
                    <li><a href="/article/1835070967521570816.htm"
                           title="【大模型】triton inference server" target="_blank">【大模型】triton inference server</a>
                        <span class="text-muted">idiotyi</span>
<a class="tag" taget="_blank" href="/search/%E5%A4%A7%E6%A8%A1%E5%9E%8B/1.htm">大模型</a><a class="tag" taget="_blank" href="/search/%E8%87%AA%E7%84%B6%E8%AF%AD%E8%A8%80%E5%A4%84%E7%90%86/1.htm">自然语言处理</a><a class="tag" taget="_blank" href="/search/%E8%AF%AD%E8%A8%80%E6%A8%A1%E5%9E%8B/1.htm">语言模型</a><a class="tag" taget="_blank" href="/search/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/1.htm">人工智能</a>
                        <div>前言:tritoninferenceserver常用于大模型部署,可以采用http或GRPC调用,支持大部分的backend,单GPU、多GPU都可以支持,CPU也支持。本文主要是使用tritoninferenceserver部署大模型的简单流程示例。目录1.整体流程2.搭建本地仓库3.服务端代码4.启动服务5.客户端调用1.整体流程搭建模型仓库模型配置服务端调用代码docker启动服务客户端调用</div>
                    </li>
                    <li><a href="/article/1835050027517571072.htm"
                           title="基于Prometheus和Grafana的现代服务器监控体系构建" target="_blank">基于Prometheus和Grafana的现代服务器监控体系构建</a>
                        <span class="text-muted">golove666</span>
<a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4/1.htm">运维</a><a class="tag" taget="_blank" href="/search/prometheus/1.htm">prometheus</a><a class="tag" taget="_blank" href="/search/grafana/1.htm">grafana</a><a class="tag" taget="_blank" href="/search/%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">服务器</a>
                        <div>构建一个基于Prometheus和Grafana的现代服务器监控体系涉及多个步骤。以下是大体的流程和步骤说明:1.Prometheus监控系统Prometheus是一个开源的系统监控和报警工具,专门设计用于抓取时间序列数据。1.1Prometheus的安装Docker安装Prometheusdockerrun-d--name=prometheus-p9090:9090prom/prometheus</div>
                    </li>
                    <li><a href="/article/1835036167091875840.htm"
                           title="手把手教你企业微信SCRM源码下载和私有化部署教程" target="_blank">手把手教你企业微信SCRM源码下载和私有化部署教程</a>
                        <span class="text-muted">MoChat-1号</span>
<a class="tag" taget="_blank" href="/search/php/1.htm">php</a><a class="tag" taget="_blank" href="/search/%E5%BE%AE%E4%BF%A1/1.htm">微信</a><a class="tag" taget="_blank" href="/search/%E5%BE%AE%E4%BF%A1%E5%85%AC%E4%BC%97%E5%B9%B3%E5%8F%B0/1.htm">微信公众平台</a><a class="tag" taget="_blank" href="/search/%E5%BE%AE%E4%BF%A1%E5%BC%80%E6%94%BE%E5%B9%B3%E5%8F%B0/1.htm">微信开放平台</a>
                        <div>服务器要求MoChat对系统环境有一些要求,仅可运行于Linux和Mac环境下,但由于Docker虚拟化技术的发展,在Windows下也可以通过DockerforWindows来作为运行环境,通常来说Mac环境下,我们更推荐本地环境部署,以避免Docker共享磁盘缓慢导致MoChat启动速度慢的问题。提示MoChat基于Docker-compose方式的安装视频https://www.bilibi</div>
                    </li>
                    <li><a href="/article/1835004014241083392.htm"
                           title="Docker 常用命令" target="_blank">Docker 常用命令</a>
                        <span class="text-muted">C语言扫地僧</span>
<a class="tag" taget="_blank" href="/search/Linux%E4%B8%93%E6%A0%8F/1.htm">Linux专栏</a><a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a>
                        <div>1Docker镜像命令1.1dockerimages#语法dockerimages[OPTIONS][REPOSITORY[:TAG]]#别名dockerimagels,dockerimagelist功能列出本地镜像。关键参数-a:列出本地所有的镜像(含中间映像层,默认情况下,过滤掉中间映像层);--digests:显示镜像的摘要信息;-f:显示满足条件的镜像;--format:指定返回值的模板文</div>
                    </li>
                    <li><a href="/article/1834987624352280576.htm"
                           title="Docker 安装配置和基本命令详解以及案例示范" target="_blank">Docker 安装配置和基本命令详解以及案例示范</a>
                        <span class="text-muted">J老熊</span>
<a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4/1.htm">运维</a><a class="tag" taget="_blank" href="/search/%E9%9D%A2%E8%AF%95/1.htm">面试</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a>
                        <div>1.引言容器化技术的快速发展给软件开发和运维带来了革命性的变化,Docker作为这一领域的领军者,已经成为软件开发和部署流程中的重要工具。Docker的轻量化、快速启动和高效资源利用让开发者能够在不同的环境中实现一致的开发体验。本篇文章将详细讲解如何在CentOS系统中安装Docker,如何配置阿里云镜像加速,Docker的基本命令和语法,以及通过实际的电商交易系统案例来演示如何在Docker环境</div>
                    </li>
                    <li><a href="/article/1834983967036633088.htm"
                           title="docker镜像的批量备份和加载" target="_blank">docker镜像的批量备份和加载</a>
                        <span class="text-muted">小卡车555</span>
<a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a>
                        <div>随着微服务的不断发展,docker在微服务的部署中也占着不可缺少的角色,有这样一种场景,需要将服务器上的若干个最新的镜像打成tar.gz做一个备份或者异地部署。针对此问题尝试写了如下shell脚本#vimsaveImages.sh脚本内容如下:#当前需要打包的版本号version=xxx.0.0.1-RELEASE#仓库rep=defaultRep#名称name=defaultNameforiin</div>
                    </li>
                    <li><a href="/article/1834930632522821632.htm"
                           title="docker Pulling fs layer 含义" target="_blank">docker Pulling fs layer 含义</a>
                        <span class="text-muted">潇锐killer</span>
<a class="tag" taget="_blank" href="/search/eureka/1.htm">eureka</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/spring/1.htm">spring</a><a class="tag" taget="_blank" href="/search/cloud/1.htm">cloud</a>
                        <div>在使用Docker时,当你执行dockerpull命令来获取一个新的镜像,控制台输出中可能会出现"Pullingfslayer"的信息。这是Docker拉取镜像过程中的一个步骤,下面是对这一过程的解释:Docker镜像是由一系列的层(layers)组成的。每个层代表了镜像构建过程中的一个步骤,比如安装一个软件包或复制一些文件。这种层式结构使得Docker镜像既轻便又高效,因为它允许多个镜像共享相同</div>
                    </li>
                                <li><a href="/article/107.htm"
                                       title="web报表工具FineReport常见的数据集报错错误代码和解释" target="_blank">web报表工具FineReport常见的数据集报错错误代码和解释</a>
                                    <span class="text-muted">老A不折腾</span>
<a class="tag" taget="_blank" href="/search/web%E6%8A%A5%E8%A1%A8/1.htm">web报表</a><a class="tag" taget="_blank" href="/search/finereport/1.htm">finereport</a><a class="tag" taget="_blank" href="/search/%E4%BB%A3%E7%A0%81/1.htm">代码</a><a class="tag" taget="_blank" href="/search/%E5%8F%AF%E8%A7%86%E5%8C%96%E5%B7%A5%E5%85%B7/1.htm">可视化工具</a>
                                    <div>在使用finereport制作报表,若预览发生错误,很多朋友便手忙脚乱不知所措了,其实没什么,只要看懂报错代码和含义,可以很快的排除错误,这里我就分享一下finereport的数据集报错错误代码和解释,如果有说的不准确的地方,也请各位小伙伴纠正一下。 
  
NS-war-remote=错误代码\:1117 压缩部署不支持远程设计 
NS_LayerReport_MultiDs=错误代码</div>
                                </li>
                                <li><a href="/article/234.htm"
                                       title="Java的WeakReference与WeakHashMap" target="_blank">Java的WeakReference与WeakHashMap</a>
                                    <span class="text-muted">bylijinnan</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E5%BC%B1%E5%BC%95%E7%94%A8/1.htm">弱引用</a>
                                    <div>首先看看 WeakReference 
 
wiki 上 Weak reference 的一个例子: 
 
 

	public class ReferenceTest {
	public static void main(String[] args) throws InterruptedException {
 
            WeakReference r = new Wea</div>
                                </li>
                                <li><a href="/article/361.htm"
                                       title="Linux——(hostname)主机名与ip的映射" target="_blank">Linux——(hostname)主机名与ip的映射</a>
                                    <span class="text-muted">eksliang</span>
<a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/hostname/1.htm">hostname</a>
                                    <div>一、 什么是主机名 
无论在局域网还是INTERNET上,每台主机都有一个IP地址,是为了区分此台主机和彼台主机,也就是说IP地址就是主机的门牌号。但IP地址不方便记忆,所以又有了域名。域名只是在公网(INtERNET)中存在,每个域名都对应一个IP地址,但一个IP地址可有对应多个域名。域名类型 linuxsir.org 这样的; 
主机名是用于什么的呢? 
答:在一个局域网中,每台机器都有一个主</div>
                                </li>
                                <li><a href="/article/488.htm"
                                       title="oracle 常用技巧" target="_blank">oracle 常用技巧</a>
                                    <span class="text-muted">18289753290</span>

                                    <div>oracle常用技巧   ①复制表结构和数据     create table  temp_clientloginUser   as     select distinct userid from tbusrtloginlog   ②仅复制数据   如果表结构一样   insert into  mytable  select  * &nb</div>
                                </li>
                                <li><a href="/article/615.htm"
                                       title="使用c3p0数据库连接池时出现com.mchange.v2.resourcepool.TimeoutException" target="_blank">使用c3p0数据库连接池时出现com.mchange.v2.resourcepool.TimeoutException</a>
                                    <span class="text-muted">酷的飞上天空</span>
<a class="tag" taget="_blank" href="/search/exception/1.htm">exception</a>
                                    <div>有一个线上环境使用的是c3p0数据库,为外部提供接口服务。最近访问压力增大后台tomcat的日志里面频繁出现 
com.mchange.v2.resourcepool.TimeoutException: A client timed out while waiting to acquire a resource from com.mchange.v2.resourcepool.BasicResou</div>
                                </li>
                                <li><a href="/article/742.htm"
                                       title="IT系统分析师如何学习大数据" target="_blank">IT系统分析师如何学习大数据</a>
                                    <span class="text-muted">蓝儿唯美</span>
<a class="tag" taget="_blank" href="/search/%E5%A4%A7%E6%95%B0%E6%8D%AE/1.htm">大数据</a>
                                    <div>我是一名从事大数据项目的IT系统分析师。在深入这个项目前需要了解些什么呢?学习大数据的最佳方法就是先从了解信息系统是如何工作着手,尤其是数据库和基础设施。同样在开始前还需要了解大数据工具,如Cloudera、Hadoop、Spark、Hive、Pig、Flume、Sqoop与Mesos。系 统分析师需要明白如何组织、管理和保护数据。在市面上有几十款数据管理产品可以用于管理数据。你的大数据数据库可能</div>
                                </li>
                                <li><a href="/article/869.htm"
                                       title="spring学习——简介" target="_blank">spring学习——简介</a>
                                    <span class="text-muted">a-john</span>
<a class="tag" taget="_blank" href="/search/spring/1.htm">spring</a>
                                    <div>Spring是一个开源框架,是为了解决企业应用开发的复杂性而创建的。Spring使用基本的JavaBean来完成以前只能由EJB完成的事情。然而Spring的用途不仅限于服务器端的开发,从简单性,可测试性和松耦合的角度而言,任何Java应用都可以从Spring中受益。其主要特征是依赖注入、AOP、持久化、事务、SpringMVC以及Acegi Security 
 
为了降低Java开发的复杂性,</div>
                                </li>
                                <li><a href="/article/996.htm"
                                       title="自定义颜色的xml文件" target="_blank">自定义颜色的xml文件</a>
                                    <span class="text-muted">aijuans</span>
<a class="tag" taget="_blank" href="/search/xml/1.htm">xml</a>
                                    <div><?xml version="1.0" encoding="utf-8"?> <resources> <color name="white">#FFFFFF</color> <color name="black">#000000</color> &</div>
                                </li>
                                <li><a href="/article/1123.htm"
                                       title="运营到底是做什么的?" target="_blank">运营到底是做什么的?</a>
                                    <span class="text-muted">aoyouzi</span>
<a class="tag" taget="_blank" href="/search/%E8%BF%90%E8%90%A5%E5%88%B0%E5%BA%95%E6%98%AF%E5%81%9A%E4%BB%80%E4%B9%88%E7%9A%84%EF%BC%9F/1.htm">运营到底是做什么的?</a>
                                    <div>文章来源:夏叔叔(微信号:woshixiashushu),欢迎大家关注!很久没有动笔写点东西,近些日子,由于爱狗团产品上线,不断面试,经常会被问道一个问题。问:爱狗团的运营主要做什么?答:带着用户一起嗨。为什么是带着用户玩起来呢?究竟什么是运营?运营到底是做什么的?那么,我们先来回答一个更简单的问题——互联网公司对运营考核什么?以爱狗团为例,绝大部分的移动互联网公司,对运营部门的考核分为三块——用</div>
                                </li>
                                <li><a href="/article/1250.htm"
                                       title="js面向对象类和对象" target="_blank">js面向对象类和对象</a>
                                    <span class="text-muted">百合不是茶</span>
<a class="tag" taget="_blank" href="/search/js/1.htm">js</a><a class="tag" taget="_blank" href="/search/%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1/1.htm">面向对象</a><a class="tag" taget="_blank" href="/search/%E5%87%BD%E6%95%B0%E5%88%9B%E5%BB%BA%E7%B1%BB%E5%92%8C%E5%AF%B9%E8%B1%A1/1.htm">函数创建类和对象</a>
                                    <div>接触js已经有几个月了,但是对js的面向对象的一些概念根本就是模糊的,js是一种面向对象的语言 但又不像java一样有class,js不是严格的面向对象语言 ,js在java web开发的地位和java不相上下  ,其中web的数据的反馈现在主流的使用json,json的语法和js的类和属性的创建相似 
  
下面介绍一些js的类和对象的创建的技术 
  
一:类和对</div>
                                </li>
                                <li><a href="/article/1377.htm"
                                       title="web.xml之资源管理对象配置 resource-env-ref" target="_blank">web.xml之资源管理对象配置 resource-env-ref</a>
                                    <span class="text-muted">bijian1013</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/web.xml/1.htm">web.xml</a><a class="tag" taget="_blank" href="/search/servlet/1.htm">servlet</a>
                                    <div>resource-env-ref元素来指定对管理对象的servlet引用的声明,该对象与servlet环境中的资源相关联 
<resource-env-ref>
    <resource-env-ref-name>资源名</resource-env-ref-name>
    <resource-env-ref-type>查找资源时返回的资源类</div>
                                </li>
                                <li><a href="/article/1504.htm"
                                       title="Create a composite component with a custom namespace" target="_blank">Create a composite component with a custom namespace</a>
                                    <span class="text-muted">sunjing</span>

                                    <div>https://weblogs.java.net/blog/mriem/archive/2013/11/22/jsf-tip-45-create-composite-component-custom-namespace 
  
When you developed a composite component the namespace you would be seeing would </div>
                                </li>
                                <li><a href="/article/1631.htm"
                                       title="【MongoDB学习笔记十二】Mongo副本集服务器角色之Arbiter" target="_blank">【MongoDB学习笔记十二】Mongo副本集服务器角色之Arbiter</a>
                                    <span class="text-muted">bit1129</span>
<a class="tag" taget="_blank" href="/search/mongodb/1.htm">mongodb</a>
                                    <div> 一、复本集为什么要加入Arbiter这个角色   回答这个问题,要从复本集的存活条件和Aribter服务器的特性两方面来说。   什么是Artiber?   An arbiter does 
not have a copy of data set and 
cannot become a primary. Replica sets may have arbiters to add a </div>
                                </li>
                                <li><a href="/article/1758.htm"
                                       title="Javascript开发笔记" target="_blank">Javascript开发笔记</a>
                                    <span class="text-muted">白糖_</span>
<a class="tag" taget="_blank" href="/search/JavaScript/1.htm">JavaScript</a>
                                    <div> 
 获取iframe内的元素 
 
通常我们使用window.frames["frameId"].document.getElementById("divId").innerHTML这样的形式来获取iframe内的元素,这种写法在IE、safari、chrome下都是通过的,唯独在fireforx下不通过。其实jquery的contents方法提供了对if</div>
                                </li>
                                <li><a href="/article/1885.htm"
                                       title="Web浏览器Chrome打开一段时间后,运行alert无效" target="_blank">Web浏览器Chrome打开一段时间后,运行alert无效</a>
                                    <span class="text-muted">bozch</span>
<a class="tag" taget="_blank" href="/search/Web/1.htm">Web</a><a class="tag" taget="_blank" href="/search/chorme/1.htm">chorme</a><a class="tag" taget="_blank" href="/search/alert/1.htm">alert</a><a class="tag" taget="_blank" href="/search/%E6%97%A0%E6%95%88/1.htm">无效</a>
                                    <div>今天在开发的时候,突然间发现alert在chrome浏览器就没法弹出了,很是怪异。 
试了试其他浏览器,发现都是没有问题的。 
开始想以为是chorme浏览器有啥机制导致的,就开始尝试各种代码让alert出来。尝试结果是仍然没有显示出来。 
这样开发的结果,如果客户在使用的时候没有提示,那会带来致命的体验。哎,没啥办法了 就关闭浏览器重启。 
  
结果就好了,这也太怪异了。难道是cho</div>
                                </li>
                                <li><a href="/article/2012.htm"
                                       title="编程之美-高效地安排会议 图着色问题 贪心算法" target="_blank">编程之美-高效地安排会议 图着色问题 贪心算法</a>
                                    <span class="text-muted">bylijinnan</span>
<a class="tag" taget="_blank" href="/search/%E7%BC%96%E7%A8%8B%E4%B9%8B%E7%BE%8E/1.htm">编程之美</a>
                                    <div>

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Random;

public class GraphColoringProblem {

	/**编程之美 高效地安排会议 图着色问题 贪心算法
	 * 假设要用很多个教室对一组</div>
                                </li>
                                <li><a href="/article/2139.htm"
                                       title="机器学习相关概念和开发工具" target="_blank">机器学习相关概念和开发工具</a>
                                    <span class="text-muted">chenbowen00</span>
<a class="tag" taget="_blank" href="/search/%E7%AE%97%E6%B3%95/1.htm">算法</a><a class="tag" taget="_blank" href="/search/matlab/1.htm">matlab</a><a class="tag" taget="_blank" href="/search/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/1.htm">机器学习</a>
                                    <div>基本概念: 
机器学习(Machine Learning, ML)是一门多领域交叉学科,涉及概率论、统计学、逼近论、凸分析、算法复杂度理论等多门学科。专门研究计算机怎样模拟或实现人类的学习行为,以获取新的知识或技能,重新组织已有的知识结构使之不断改善自身的性能。 
它是人工智能的核心,是使计算机具有智能的根本途径,其应用遍及人工智能的各个领域,它主要使用归纳、综合而不是演绎。 
 
开发工具 
M</div>
                                </li>
                                <li><a href="/article/2266.htm"
                                       title="[宇宙经济学]关于在太空建立永久定居点的可能性" target="_blank">[宇宙经济学]关于在太空建立永久定居点的可能性</a>
                                    <span class="text-muted">comsci</span>
<a class="tag" taget="_blank" href="/search/%E7%BB%8F%E6%B5%8E/1.htm">经济</a>
                                    <div> 
       大家都知道,地球上的房地产都比较昂贵,而且土地证经常会因为新的政府的意志而变幻文本格式........ 
 
       所以,在地球议会尚不具有在太空行使法律和权力的力量之前,我们外太阳系统的友好联盟可以考虑在地月系的某些引力平衡点上面,修建规模较大的定居点</div>
                                </li>
                                <li><a href="/article/2393.htm"
                                       title="oracle 11g database control 证书错误" target="_blank">oracle 11g database control 证书错误</a>
                                    <span class="text-muted">daizj</span>
<a class="tag" taget="_blank" href="/search/oracle/1.htm">oracle</a><a class="tag" taget="_blank" href="/search/%E8%AF%81%E4%B9%A6%E9%94%99%E8%AF%AF/1.htm">证书错误</a><a class="tag" taget="_blank" href="/search/oracle+11G+%E5%AE%89%E8%A3%85/1.htm">oracle 11G 安装</a>
                                    <div>oracle 11g database control 证书错误  
 
win7 安装完oracle11后打开 Database control 后,会打开em管理页面,提示证书错误,点“继续浏览此网站”,还是会继续停留在证书错误页面 
 
解决办法: 
 
是 KB2661254 这个更新补丁引起的,它限制了 RSA 密钥位长度少于 1024 位的证书的使用。具体可以看微软官方公告:</div>
                                </li>
                                <li><a href="/article/2520.htm"
                                       title="Java I/O之用FilenameFilter实现根据文件扩展名删除文件" target="_blank">Java I/O之用FilenameFilter实现根据文件扩展名删除文件</a>
                                    <span class="text-muted">游其是你</span>
<a class="tag" taget="_blank" href="/search/FilenameFilter/1.htm">FilenameFilter</a>
                                    <div>在Java中,你可以通过实现FilenameFilter类并重写accept(File dir, String name) 方法实现文件过滤功能。 
在这个例子中,我们向你展示在“c:\\folder”路径下列出所有“.txt”格式的文件并删除。        1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16 </div>
                                </li>
                                <li><a href="/article/2647.htm"
                                       title="C语言数组的简单以及一维数组的简单排序算法示例,二维数组简单示例" target="_blank">C语言数组的简单以及一维数组的简单排序算法示例,二维数组简单示例</a>
                                    <span class="text-muted">dcj3sjt126com</span>
<a class="tag" taget="_blank" href="/search/c/1.htm">c</a><a class="tag" taget="_blank" href="/search/array/1.htm">array</a>
                                    <div># include <stdio.h>

int main(void)
{
	
	int a[5] = {1, 2, 3, 4, 5};
		//a 是数组的名字 5是表示数组元素的个数,并且这五个元素分别用a[0], a[1]...a[4]
	
	int i;

	for (i=0; i<5; ++i)
		printf("%d\n",</div>
                                </li>
                                <li><a href="/article/2774.htm"
                                       title="PRIMARY, INDEX, UNIQUE 这3种是一类 PRIMARY 主键。 就是 唯一 且 不能为空。 INDEX 索引,普通的 UNIQUE 唯一索引" target="_blank">PRIMARY, INDEX, UNIQUE 这3种是一类 PRIMARY 主键。 就是 唯一 且 不能为空。 INDEX 索引,普通的 UNIQUE 唯一索引</a>
                                    <span class="text-muted">dcj3sjt126com</span>
<a class="tag" taget="_blank" href="/search/primary/1.htm">primary</a>
                                    <div>PRIMARY, INDEX, UNIQUE 这3种是一类PRIMARY 主键。 就是 唯一 且 不能为空。INDEX 索引,普通的UNIQUE 唯一索引。 不允许有重复。FULLTEXT 是全文索引,用于在一篇文章中,检索文本信息的。举个例子来说,比如你在为某商场做一个会员卡的系统。这个系统有一个会员表有下列字段:会员编号   INT会员姓名  </div>
                                </li>
                                <li><a href="/article/2901.htm"
                                       title="java集合辅助类 Collections、Arrays" target="_blank">java集合辅助类 Collections、Arrays</a>
                                    <span class="text-muted">shuizhaosi888</span>
<a class="tag" taget="_blank" href="/search/Collections/1.htm">Collections</a><a class="tag" taget="_blank" href="/search/Arrays/1.htm">Arrays</a><a class="tag" taget="_blank" href="/search/HashCode/1.htm">HashCode</a>
                                    <div>  
Arrays、Collections 
  
1 )数组集合之间转换 
    public static <T> List<T> asList(T... a) {
        return new ArrayList<>(a);
    } 
     a)Arrays.asL</div>
                                </li>
                                <li><a href="/article/3028.htm"
                                       title="Spring Security(10)——退出登录logout" target="_blank">Spring Security(10)——退出登录logout</a>
                                    <span class="text-muted">234390216</span>
<a class="tag" taget="_blank" href="/search/logout/1.htm">logout</a><a class="tag" taget="_blank" href="/search/Spring+Security/1.htm">Spring Security</a><a class="tag" taget="_blank" href="/search/%E9%80%80%E5%87%BA%E7%99%BB%E5%BD%95/1.htm">退出登录</a><a class="tag" taget="_blank" href="/search/logout-url/1.htm">logout-url</a><a class="tag" taget="_blank" href="/search/LogoutFilter/1.htm">LogoutFilter</a>
                                    <div>       要实现退出登录的功能我们需要在http元素下定义logout元素,这样Spring Security将自动为我们添加用于处理退出登录的过滤器LogoutFilter到FilterChain。当我们指定了http元素的auto-config属性为true时logout定义是会自动配置的,此时我们默认退出登录的URL为“/j_spring_secu</div>
                                </li>
                                <li><a href="/article/3155.htm"
                                       title="透过源码学前端 之 Backbone 三 Model" target="_blank">透过源码学前端 之 Backbone 三 Model</a>
                                    <span class="text-muted">逐行分析JS源代码</span>
<a class="tag" taget="_blank" href="/search/backbone/1.htm">backbone</a><a class="tag" taget="_blank" href="/search/%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90/1.htm">源码分析</a><a class="tag" taget="_blank" href="/search/js%E5%AD%A6%E4%B9%A0/1.htm">js学习</a>
                                    <div>Backbone 分析第三部分  Model 
概述: Model 提供了数据存储,将数据以JSON的形式保存在 Model的 attributes里, 
但重点功能在于其提供了一套功能强大,使用简单的存、取、删、改数据方法,并在不同的操作里加了相应的监听事件, 
如每次修改添加里都会触发 change,这在据模型变动来修改视图时很常用,并且与collection建立了关联。 </div>
                                </li>
                                <li><a href="/article/3282.htm"
                                       title="SpringMVC源码总结(七)mvc:annotation-driven中的HttpMessageConverter" target="_blank">SpringMVC源码总结(七)mvc:annotation-driven中的HttpMessageConverter</a>
                                    <span class="text-muted">乒乓狂魔</span>
<a class="tag" taget="_blank" href="/search/springMVC/1.htm">springMVC</a>
                                    <div>这一篇文章主要介绍下HttpMessageConverter整个注册过程包含自定义的HttpMessageConverter,然后对一些HttpMessageConverter进行具体介绍。 
 
HttpMessageConverter接口介绍: 
 

public interface HttpMessageConverter<T> {

	/**
	 * Indicate</div>
                                </li>
                                <li><a href="/article/3409.htm"
                                       title="分布式基础知识和算法理论" target="_blank">分布式基础知识和算法理论</a>
                                    <span class="text-muted">bluky999</span>
<a class="tag" taget="_blank" href="/search/%E7%AE%97%E6%B3%95/1.htm">算法</a><a class="tag" taget="_blank" href="/search/zookeeper/1.htm">zookeeper</a><a class="tag" taget="_blank" href="/search/%E5%88%86%E5%B8%83%E5%BC%8F/1.htm">分布式</a><a class="tag" taget="_blank" href="/search/%E4%B8%80%E8%87%B4%E6%80%A7%E5%93%88%E5%B8%8C/1.htm">一致性哈希</a><a class="tag" taget="_blank" href="/search/paxos/1.htm">paxos</a>
                                    <div>   
分布式基础知识和算法理论 
BY NODEXY@2014.8.12 
本文永久链接:http://nodex.iteye.com/blog/2103218 
  
在大数据的背景下,不管是做存储,做搜索,做数据分析,或者做产品或服务本身,面向互联网和移动互联网用户,已经不可避免地要面对分布式环境。笔者在此收录一些分布式相关的基础知识和算法理论介绍,在完善自我知识体系的同</div>
                                </li>
                                <li><a href="/article/3536.htm"
                                       title="Android Studio的.gitignore以及gitignore无效的解决" target="_blank">Android Studio的.gitignore以及gitignore无效的解决</a>
                                    <span class="text-muted">bell0901</span>
<a class="tag" taget="_blank" href="/search/android/1.htm">android</a><a class="tag" taget="_blank" href="/search/gitignore/1.htm">gitignore</a>
                                    <div>  github上.gitignore模板合集,里面有各种.gitignore : https://github.com/github/gitignore 
  自己用的Android Studio下项目的.gitignore文件,对github上的android.gitignore添加了 
      # OSX files      //mac os下      .DS_Store </div>
                                </li>
                                <li><a href="/article/3663.htm"
                                       title="成为高级程序员的10个步骤" target="_blank">成为高级程序员的10个步骤</a>
                                    <span class="text-muted">tomcat_oracle</span>
<a class="tag" taget="_blank" href="/search/%E7%BC%96%E7%A8%8B/1.htm">编程</a>
                                    <div>What 
软件工程师的职业生涯要历经以下几个阶段:初级、中级,最后才是高级。这篇文章主要是讲如何通过 10 个步骤助你成为一名高级软件工程师。 
  
Why 
 
  得到更多的报酬!因为你的薪水会随着你水平的提高而增加  
  提升你的职业生涯。成为了高级软件工程师之后,就可以朝着架构师、团队负责人、CTO 等职位前进  
  历经更大的挑战。随着你的成长,各种影响力也会提高。  </div>
                                </li>
                                <li><a href="/article/3790.htm"
                                       title="mongdb在linux下的安装" target="_blank">mongdb在linux下的安装</a>
                                    <span class="text-muted">xtuhcy</span>
<a class="tag" taget="_blank" href="/search/mongodb/1.htm">mongodb</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a>
                                    <div>一、查询linux版本号: 
lsb_release -a  
LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noa</div>
                                </li>
                </ul>
            </div>
        </div>
    </div>

<div>
    <div class="container">
        <div class="indexes">
            <strong>按字母分类:</strong>
            <a href="/tags/A/1.htm" target="_blank">A</a><a href="/tags/B/1.htm" target="_blank">B</a><a href="/tags/C/1.htm" target="_blank">C</a><a
                href="/tags/D/1.htm" target="_blank">D</a><a href="/tags/E/1.htm" target="_blank">E</a><a href="/tags/F/1.htm" target="_blank">F</a><a
                href="/tags/G/1.htm" target="_blank">G</a><a href="/tags/H/1.htm" target="_blank">H</a><a href="/tags/I/1.htm" target="_blank">I</a><a
                href="/tags/J/1.htm" target="_blank">J</a><a href="/tags/K/1.htm" target="_blank">K</a><a href="/tags/L/1.htm" target="_blank">L</a><a
                href="/tags/M/1.htm" target="_blank">M</a><a href="/tags/N/1.htm" target="_blank">N</a><a href="/tags/O/1.htm" target="_blank">O</a><a
                href="/tags/P/1.htm" target="_blank">P</a><a href="/tags/Q/1.htm" target="_blank">Q</a><a href="/tags/R/1.htm" target="_blank">R</a><a
                href="/tags/S/1.htm" target="_blank">S</a><a href="/tags/T/1.htm" target="_blank">T</a><a href="/tags/U/1.htm" target="_blank">U</a><a
                href="/tags/V/1.htm" target="_blank">V</a><a href="/tags/W/1.htm" target="_blank">W</a><a href="/tags/X/1.htm" target="_blank">X</a><a
                href="/tags/Y/1.htm" target="_blank">Y</a><a href="/tags/Z/1.htm" target="_blank">Z</a><a href="/tags/0/1.htm" target="_blank">其他</a>
        </div>
    </div>
</div>
<footer id="footer" class="mb30 mt30">
    <div class="container">
        <div class="footBglm">
            <a target="_blank" href="/">首页</a> -
            <a target="_blank" href="/custom/about.htm">关于我们</a> -
            <a target="_blank" href="/search/Java/1.htm">站内搜索</a> -
            <a target="_blank" href="/sitemap.txt">Sitemap</a> -
            <a target="_blank" href="/custom/delete.htm">侵权投诉</a>
        </div>
        <div class="copyright">版权所有 IT知识库 CopyRight © 2000-2050 E-COM-NET.COM , All Rights Reserved.
<!--            <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">京ICP备09083238号</a><br>-->
        </div>
    </div>
</footer>
<!-- 代码高亮 -->
<script type="text/javascript" src="/static/syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="/static/syntaxhighlighter/scripts/shLegacy.js"></script>
<script type="text/javascript" src="/static/syntaxhighlighter/scripts/shAutoloader.js"></script>
<link type="text/css" rel="stylesheet" href="/static/syntaxhighlighter/styles/shCoreDefault.css"/>
<script type="text/javascript" src="/static/syntaxhighlighter/src/my_start_1.js"></script>





</body>

</html>