【云原生】第三篇--使用容器运行Nginx应用及Docker命令

使用容器运行Nginx应用及Docker命令

  • 一、使用容器运行Nginx应用
    • 1.1 使用docker run命令运行Nginx应用
      • 1.1.1 观察下载容器镜像过程
      • 1.1.2 观察容器运行情况
    • 1.2 访问容器中运行的Nginx服务
      • 1.2.1 确认容器IP地址
      • 1.2.2 容器网络说明
      • 1.2.3 使用curl命令访问
  • 二、Docker命令
    • 2.1 Docker命令获取帮助方法
    • 2.2 Docker官网提供的命令说明
    • 2.3 docker命令应用
      • 2.3.1 docker run
      • 2.3.2 docker ps
      • 2.3.3 docker inspect
      • 2.3.4 docker exec
      • 2.3.5 docker attach
      • 2.3.6 docker stop
      • 2.3.7 docker start
      • 2.3.8 docker top
      • 2.3.9 docker rm
        • 2.3.9.1 指定删除容器
        • 2.3.9.2 批量删除容器

一、使用容器运行Nginx应用

1.1 使用docker run命令运行Nginx应用

1.1.1 观察下载容器镜像过程

查找本地容器镜像文件

执行命令过程一:下载容器镜像
# docker run -d nginx:latest
Unable to find image 'nginx:latest' locally
latest: Pulling from library/nginx
a2abf6c4d29d: Downloading  1.966MB/31.36MB 下载中
a9edb18cadd1: Downloading  1.572MB/25.35MB
589b7251471a: Download complete 下载完成
186b1aaa4aa6: Download complete
b4df32aa5a72: Waiting 等待下载
a0bcbecc962e: Waiting
执行命令过程二:下载容器镜像
[root@localhost ~]# docker run -d nginx:latest
Unable to find image 'nginx:latest' locally
latest: Pulling from library/nginx
a2abf6c4d29d: Downloading  22.87MB/31.36MB
a9edb18cadd1: Downloading  22.78MB/25.35MB
589b7251471a: Waiting
186b1aaa4aa6: Waiting
b4df32aa5a72: Waiting
执行命令过程三:下载容器镜像
[root@localhost ~]# docker run -d nginx:latest
Unable to find image 'nginx:latest' locally
latest: Pulling from library/nginx
a2abf6c4d29d: Pull complete 下载完成
a9edb18cadd1: Pull complete
589b7251471a: Pull complete
186b1aaa4aa6: Pull complete
b4df32aa5a72: Waiting 等待下载

1.1.2 观察容器运行情况

# docker run -d nginx:latest
9834c8c18a7c7c89ab0ea4119d11bafe9c18313c8006bc02ce57ff54d9a1cc0c
命令解释
docker run 启动一个容器
-d 把容器镜像中需要执行的命令以daemon(守护进程)的方式运行
nginx 应用容器镜像的名称,通常表示该镜像为某一个软件
latest 表示上述容器镜像的版本,表示最新版本,用户可自定义其标识,例如v1或v2等
# docker ps
CONTAINER ID   IMAGE        COMMAND                  CREATED          STATUS        PORTS     NAMES
9834c8c18a7c   nginx:latest "/docker-entrypoint.…"   24 seconds ago   Up 23 seconds 80/tcp condescending_pare
命令解释
docker ps 类似于Linux系统的ps命令,查看正在运行的容器,如果想查看没有运行的容器,需要在此命令后使用--all

输出内容解释

CONTAINERID IMAGE COMMAND CREATED STATUS PORTS NAMES
9834c8c18a7c nginx:latest “/docker-entrypoint.…” 24 seconds ago Up 23 seconds 80/tcp condescending_pare

1.2 访问容器中运行的Nginx服务

1.2.1 确认容器IP地址

实际工作中不需要此步操作。

 # docker inspect 9834
 
 "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "172.17.0.2", 容器IP地址
            "IPPrefixLen": 16,
            "IPv6Gateway": "",
            "MacAddress": "02:42:ac:11:00:02",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "d3de2fdbc30ee36a55c1431ef3ae4578392e552009f00b2019b4720735fe5a60",
                    "EndpointID": "d91f47c9f756ff22dc599a207164f2e9366bd0c530882ce0f08ae2278fb3d50c",
                    "Gateway": "172.17.0.1",
                    "IPAddress": "172.17.0.2",   容器IP地址
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:11:00:02",
                    "DriverOpts": null
                }
            }
        }
    }
]
命令解释
docker inspect 为查看容器结构信息命令
9834 为前面生成的容器ID号前4位,使用这个ID号时,由于其较长,使用时能最短识别即可。

1.2.2 容器网络说明

【云原生】第三篇--使用容器运行Nginx应用及Docker命令_第1张图片

# ip a s
......
docker0网桥,用于为容器提供桥接,转发到主机之外的网络
5: docker0: ,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:d5:c3:d4:cc brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:d5ff:fec3:d4cc/64 scope link
       valid_lft forever preferred_lft forever
       
与容器中的虚拟网络设备在同一个命名空间中,用于把容器中的网络连接到主机
9: veth393dece@if8: ,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default
    link/ether 02:e3:11:58:54:0f brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fe80::e3:11ff:fe58:540f/64 scope link
       valid_lft forever preferred_lft forever

1.2.3 使用curl命令访问

# curl http://172.17.0.2

返回结果,表示访问成功!
<!DOCTYPE html>


Welcome to nginx!<<span class="token operator">/</span>title>
<style>
html <span class="token punctuation">{</span> color-scheme: light dark<span class="token punctuation">;</span> <span class="token punctuation">}</span>
body <span class="token punctuation">{</span> width: 35em<span class="token punctuation">;</span> margin: 0 auto<span class="token punctuation">;</span>
font-family: Tahoma<span class="token punctuation">,</span> Verdana<span class="token punctuation">,</span> Arial<span class="token punctuation">,</span> sans-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>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/>
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> 
  <h1>二、Docker命令</h1> 
  <h2>2.1 Docker命令获取帮助方法</h2> 
  <pre><code class="prism language-powershell"><span class="token comment"># docker -h</span>
Flag shorthand <span class="token operator">-</span>h has been deprecated<span class="token punctuation">,</span> please use <span class="token operator">--</span>help

Usage:  docker <span class="token namespace">[OPTIONS]</span> COMMAND  用法

A self-sufficient runtime <span class="token keyword">for</span> containers 功能介绍

Options: 选项
      <span class="token operator">--</span>config string      Location of client config files <span class="token punctuation">(</span>default <span class="token string">"/root/.docker"</span><span class="token punctuation">)</span>
  <span class="token operator">-</span>c<span class="token punctuation">,</span> <span class="token operator">--</span>context string     Name of the context to use to connect to the daemon <span class="token punctuation">(</span>overrides
                           DOCKER_HOST env <span class="token keyword">var</span> and default context <span class="token function">set</span> with <span class="token string">"docker context use"</span><span class="token punctuation">)</span>
  <span class="token operator">-</span>D<span class="token punctuation">,</span> <span class="token operator">--</span>debug              Enable debug mode
  <span class="token operator">-</span>H<span class="token punctuation">,</span> <span class="token operator">--</span>host list          Daemon socket<span class="token punctuation">(</span>s<span class="token punctuation">)</span> to connect to
  <span class="token operator">-</span>l<span class="token punctuation">,</span> <span class="token operator">--</span>log-level string   <span class="token function">Set</span> the logging level <span class="token punctuation">(</span><span class="token string">"debug"</span><span class="token punctuation">|</span><span class="token string">"info"</span><span class="token punctuation">|</span><span class="token string">"warn"</span><span class="token punctuation">|</span><span class="token string">"error"</span><span class="token punctuation">|</span><span class="token string">"fatal"</span><span class="token punctuation">)</span>
                           <span class="token punctuation">(</span>default <span class="token string">"info"</span><span class="token punctuation">)</span>
      <span class="token operator">--</span>tls                Use TLS<span class="token punctuation">;</span> implied by <span class="token operator">--</span>tlsverify
      <span class="token operator">--</span>tlscacert string   Trust certs signed only by this CA <span class="token punctuation">(</span>default <span class="token string">"/root/.docker/ca.pem"</span><span class="token punctuation">)</span>
      <span class="token operator">--</span>tlscert string     Path to TLS certificate file <span class="token punctuation">(</span>default <span class="token string">"/root/.docker/cert.pem"</span><span class="token punctuation">)</span>
      <span class="token operator">--</span>tlskey string      Path to TLS key file <span class="token punctuation">(</span>default <span class="token string">"/root/.docker/key.pem"</span><span class="token punctuation">)</span>
      <span class="token operator">--</span>tlsverify          Use TLS and verify the remote
  <span class="token operator">-</span>v<span class="token punctuation">,</span> <span class="token operator">--</span>version            Print version information and quit

Management Commands: 管理类命令
  app*        Docker App <span class="token punctuation">(</span>Docker Inc<span class="token punctuation">.</span><span class="token punctuation">,</span> v0<span class="token punctuation">.</span>9<span class="token punctuation">.</span>1-beta3<span class="token punctuation">)</span>
  builder     Manage builds
  buildx*     Docker Buildx <span class="token punctuation">(</span>Docker Inc<span class="token punctuation">.</span><span class="token punctuation">,</span> v0<span class="token punctuation">.</span>7<span class="token punctuation">.</span>1-docker<span class="token punctuation">)</span>
  config      Manage Docker configs
  container   Manage containers
  context     Manage contexts
  image       Manage images
  manifest    Manage Docker image manifests and manifest lists
  network     Manage networks
  node        Manage Swarm nodes
  plugin      Manage plugins
  scan*       Docker Scan <span class="token punctuation">(</span>Docker Inc<span class="token punctuation">.</span><span class="token punctuation">,</span> v0<span class="token punctuation">.</span>12<span class="token punctuation">.</span>0<span class="token punctuation">)</span>
  secret      Manage Docker secrets
  service     Manage services
  stack       Manage Docker stacks
  swarm       Manage Swarm
  system      Manage Docker
  trust       Manage trust on Docker images
  volume      Manage volumes

Commands: 未分组命令
  attach      Attach local standard input<span class="token punctuation">,</span> output<span class="token punctuation">,</span> and error streams to a running container
  build       Build an image <span class="token keyword">from</span> a Dockerfile
  commit      Create a new image <span class="token keyword">from</span> a container<span class="token string">'s changes
  cp          Copy files/folders between a container and the local filesystem
  create      Create a new container
  diff        Inspect changes to files or directories on a container'</span>s filesystem
  events      Get real time events <span class="token keyword">from</span> the server
  exec        Run a command in a running container
  export      Export a container's filesystem as a tar archive
  history     Show the history of an image
  images      List images
  import      Import the contents <span class="token keyword">from</span> a tarball to create a filesystem image
  info        Display system-wide information
  inspect     <span class="token keyword">Return</span> low-level information on Docker objects
  <span class="token function">kill</span>        <span class="token function">Kill</span> one or more running containers
  load        Load an image <span class="token keyword">from</span> a tar archive or STDIN
  login       Log in to a Docker registry
  logout      Log out <span class="token keyword">from</span> a Docker registry
  logs        Fetch the logs of a container
  pause       Pause all processes within one or more containers
  port        List port mappings or a specific mapping <span class="token keyword">for</span> the container
  <span class="token function">ps</span>          List containers
  pull        Pull an image or a repository <span class="token keyword">from</span> a registry
  push        Push an image or a repository to a registry
  rename      Rename a container
  restart     Restart one or more containers
  <span class="token function">rm</span>          Remove one or more containers
  rmi         Remove one or more images
  run         Run a command in a new container
  save        Save one or more images to a tar archive <span class="token punctuation">(</span>streamed to STDOUT by default<span class="token punctuation">)</span>
  search      Search the Docker Hub <span class="token keyword">for</span> images
  <span class="token function">start</span>       <span class="token function">Start</span> one or more stopped containers
  stats       Display a live stream of container<span class="token punctuation">(</span>s<span class="token punctuation">)</span> resource usage statistics
  stop        Stop one or more running containers
  tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
  top         Display the running processes of a container
  unpause     Unpause all processes within one or more containers
  update      Update configuration of one or more containers
  version     Show the Docker version information
  wait        Block <span class="token keyword">until</span> one or more containers stop<span class="token punctuation">,</span> then print their <span class="token keyword">exit</span> codes
</code></pre> 
  <h2>2.2 Docker官网提供的命令说明</h2> 
  <p>网址链接:https://docs.docker.com/reference/<br> <a href="http://img.e-com-net.com/image/info8/086fd139089743d087593c7b171a030b.jpg" target="_blank"><img src="http://img.e-com-net.com/image/info8/086fd139089743d087593c7b171a030b.jpg" alt="【云原生】第三篇--使用容器运行Nginx应用及Docker命令_第2张图片" width="650" height="352" style="border:1px solid black;"></a><br> <a href="http://img.e-com-net.com/image/info8/0d108219f45c45749f2fc12b3c3528e5.jpg" target="_blank"><img src="http://img.e-com-net.com/image/info8/0d108219f45c45749f2fc12b3c3528e5.jpg" alt="【云原生】第三篇--使用容器运行Nginx应用及Docker命令_第3张图片" width="650" height="350" style="border:1px solid black;"></a><br> <a href="http://img.e-com-net.com/image/info8/530ead93721d40e7ab27fe1293616a40.jpg" target="_blank"><img src="http://img.e-com-net.com/image/info8/530ead93721d40e7ab27fe1293616a40.jpg" alt="【云原生】第三篇--使用容器运行Nginx应用及Docker命令_第4张图片" width="650" height="442" style="border:1px solid black;"></a></p> 
  <h2>2.3 docker命令应用</h2> 
  <h3>2.3.1 docker run</h3> 
  <pre><code class="prism language-powershell"><span class="token comment"># docker run -i -t --name c1 centos:latest bash</span>
<span class="token namespace">[root@948f234e22a1 /]</span><span class="token comment">#</span>
</code></pre> 
  <pre><code class="prism language-powershell">命令解释
docker run 运行一个命令在容器中,命令是主体,没有命令容器就会消亡
<span class="token operator">-</span>i 交互式
<span class="token operator">-</span>t 提供终端
<span class="token operator">--</span>name c1 把将运行的容器命名为c1
centos:latest 使用centos最新版本容器镜像
bash 在容器中执行的命令
</code></pre> 
  <pre><code class="prism language-powershell">查看主机名
<span class="token namespace">[root@948f234e22a1 /]</span><span class="token comment">#</span>
</code></pre> 
  <pre><code class="prism language-powershell">查看网络信息
<span class="token namespace">[root@948f234e22a1 /]</span><span class="token comment"># ip a s</span>
1: lo: <LOOPBACK<span class="token punctuation">,</span>UP<span class="token punctuation">,</span>LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN <span class="token function">group</span> default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>1/8 scope host lo
       valid_lft forever preferred_lft forever
12: eth0@if13: <BROADCAST<span class="token punctuation">,</span>MULTICAST<span class="token punctuation">,</span>UP<span class="token punctuation">,</span>LOWER_UP> mtu 1500 qdisc noqueue state UP <span class="token function">group</span> default
    link/ether 02:42:<span class="token function">ac</span>:11:00:03 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 172<span class="token punctuation">.</span>17<span class="token punctuation">.</span>0<span class="token punctuation">.</span>3/16 brd 172<span class="token punctuation">.</span>17<span class="token punctuation">.</span>255<span class="token punctuation">.</span>255 scope global eth0
       valid_lft forever preferred_lft forever
</code></pre> 
  <pre><code class="prism language-powershell">查看进程
<span class="token namespace">[root@948f234e22a1 /]</span><span class="token comment"># ps aux</span>
USER        PID <span class="token operator">%</span>CPU <span class="token operator">%</span>MEM    VSZ   RSS TTY      STAT <span class="token function">START</span>   TIME COMMAND
root          1  0<span class="token punctuation">.</span>0  0<span class="token punctuation">.</span>1  12036  2172 pts/0    Ss   09:58   0:00 bash
root         16  0<span class="token punctuation">.</span>0  0<span class="token punctuation">.</span>0  44652  1784 pts/0    R+   10:02   0:00 <span class="token function">ps</span> aux
</code></pre> 
  <pre><code class="prism language-powershell">查看用户
<span class="token namespace">[root@948f234e22a1 /]</span><span class="token comment"># cat /etc/passwd</span>
root:x:0:0:root:<span class="token operator">/</span>root:<span class="token operator">/</span>bin/bash
bin:x:1:1:bin:<span class="token operator">/</span>bin:<span class="token operator">/</span>sbin/nologin
daemon:x:2:2:daemon:<span class="token operator">/</span>sbin:<span class="token operator">/</span>sbin/nologin
adm:x:3:4:adm:<span class="token operator">/</span><span class="token keyword">var</span><span class="token operator">/</span>adm:<span class="token operator">/</span>sbin/nologin
<span class="token function">lp</span>:x:4:7:<span class="token function">lp</span>:<span class="token operator">/</span><span class="token keyword">var</span><span class="token operator">/</span>spool/lpd:<span class="token operator">/</span>sbin/nologin
sync:x:5:0:sync:<span class="token operator">/</span>sbin:<span class="token operator">/</span>bin/sync
shutdown:x:6:0:shutdown:<span class="token operator">/</span>sbin:<span class="token operator">/</span>sbin/shutdown
halt:x:7:0:halt:<span class="token operator">/</span>sbin:<span class="token operator">/</span>sbin/halt
mail:x:8:12:mail:<span class="token operator">/</span><span class="token keyword">var</span><span class="token operator">/</span>spool/mail:<span class="token operator">/</span>sbin/nologin
operator:x:11:0:operator:<span class="token operator">/</span>root:<span class="token operator">/</span>sbin/nologin
games:x:12:100:games:<span class="token operator">/</span>usr/games:<span class="token operator">/</span>sbin/nologin
ftp:x:14:50:FTP User:<span class="token operator">/</span><span class="token keyword">var</span><span class="token operator">/</span>ftp:<span class="token operator">/</span>sbin/nologin
nobody:x:65534:65534:Kernel Overflow User:<span class="token operator">/</span>:<span class="token operator">/</span>sbin/nologin
dbus:x:81:81:System message bus:<span class="token operator">/</span>:<span class="token operator">/</span>sbin/nologin
systemd-coredump:x:999:997:systemd Core Dumper:<span class="token operator">/</span>:<span class="token operator">/</span>sbin/nologin
systemd-resolve:x:193:193:systemd Resolver:<span class="token operator">/</span>:<span class="token operator">/</span>sbin/nologin
</code></pre> 
  <pre><code class="prism language-powershell">查看目录
<span class="token namespace">[root@948f234e22a1 /]</span><span class="token comment"># pwd</span>
<span class="token operator">/</span>
<span class="token namespace">[root@948f234e22a1 /]</span><span class="token comment"># ls</span>
bin  etc   lib    lost+found  mnt  proc  run   srv  tmp  <span class="token keyword">var</span>
dev  home  lib64  media       opt  root  sbin  sys  usr
</code></pre> 
  <pre><code class="prism language-powershell">退出命令执行,观察容器运行情况
<span class="token namespace">[root@948f234e22a1 /]</span><span class="token comment"># exit</span>
<span class="token keyword">exit</span>
<span class="token namespace">[root@localhost ~]</span><span class="token comment">#</span>
</code></pre> 
  <h3>2.3.2 docker ps</h3> 
  <pre><code class="prism language-powershell"><span class="token comment"># docker ps</span>
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
</code></pre> 
  <pre><code class="prism language-powershell">命令解释
docker <span class="token function">ps</span> 查看正在运行的容器,本案例由于没有命令在容器中运行,因此容器被停止了,所以本次查看没有结果。
</code></pre> 
  <pre><code class="prism language-powershell"><span class="token comment"># docker ps --all</span>
CONTAINER ID   IMAGE           COMMAND     CREATED             STATUS                         PORTS     NAMES
948f234e22a1   centos:latest   <span class="token string">"bash"</span>    10 minutes ago      Exited <span class="token punctuation">(</span>0<span class="token punctuation">)</span> 2 minutes ago                    c1
</code></pre> 
  <table> 
   <thead> 
    <tr> 
     <th>CONTAINERID</th> 
     <th>IMAGE</th> 
     <th>COMMAND</th> 
     <th>CREATED</th> 
     <th>STATUS</th> 
     <th>PORTS</th> 
     <th>NAMES</th> 
    </tr> 
   </thead> 
   <tbody> 
    <tr> 
     <td>948f234e22a1</td> 
     <td>centos:latest</td> 
     <td>“bash”</td> 
     <td>10 minutes ago</td> 
     <td>Exited (0) 2 minutes ago</td> 
     <td></td> 
     <td>c1</td> 
    </tr> 
   </tbody> 
  </table> 
  <pre><code class="prism language-powershell">命令解释
docker <span class="token function">ps</span> <span class="token operator">--</span>all 可以查看正在运行的和停止运行的容器
</code></pre> 
  <h3>2.3.3 docker inspect</h3> 
  <pre><code class="prism language-powershell"><span class="token comment"># docker run -it --name c2 centos:latest bash</span>
<span class="token namespace">[root@9f2eea16da4c /]</span><span class="token comment"># </span>
</code></pre> 
  <pre><code class="prism language-powershell">操作说明
在上述提示符处按住ctrl键,再按p键与q键,可以退出交互式的容器,容器会处于运行状态。
</code></pre> 
  <pre><code class="prism language-powershell"><span class="token comment"># docker ps</span>
CONTAINER ID   IMAGE           COMMAND   CREATED          STATUS          PORTS     NAMES
9f2eea16da4c   centos:latest   <span class="token string">"bash"</span>    37 seconds ago   Up 35 seconds             c2
</code></pre> 
  <pre><code class="prism language-powershell">命令解释
可以看到容器处于运行状态
</code></pre> 
  <pre><code class="prism language-powershell"><span class="token comment"># docker inspect c2</span>

<span class="token string">"Networks"</span>: <span class="token punctuation">{</span>
                <span class="token string">"bridge"</span>: <span class="token punctuation">{</span>
                    <span class="token string">"IPAMConfig"</span>: null<span class="token punctuation">,</span>
                    <span class="token string">"Links"</span>: null<span class="token punctuation">,</span>
                    <span class="token string">"Aliases"</span>: null<span class="token punctuation">,</span>
                    <span class="token string">"NetworkID"</span>: <span class="token string">"d3de2fdbc30ee36a55c1431ef3ae4578392e552009f00b2019b4720735fe5a60"</span><span class="token punctuation">,</span>
                    <span class="token string">"EndpointID"</span>: <span class="token string">"d1a2b7609f2f73a6cac67229a4395eef293f695c0ac4fd6c9c9e6913c9c85c1c"</span><span class="token punctuation">,</span>
                    <span class="token string">"Gateway"</span>: <span class="token string">"172.17.0.1"</span><span class="token punctuation">,</span>
                    <span class="token string">"IPAddress"</span>: <span class="token string">"172.17.0.2"</span><span class="token punctuation">,</span>
                    <span class="token string">"IPPrefixLen"</span>: 16<span class="token punctuation">,</span>
                    <span class="token string">"IPv6Gateway"</span>: <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token string">"GlobalIPv6Address"</span>: <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token string">"GlobalIPv6PrefixLen"</span>: 0<span class="token punctuation">,</span>
                    <span class="token string">"MacAddress"</span>: <span class="token string">"02:42:ac:11:00:02"</span><span class="token punctuation">,</span>
                    <span class="token string">"DriverOpts"</span>: null
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">]</span>

</code></pre> 
  <pre><code class="prism language-powershell">命令解释
docker inpect 查看容器详细信息
</code></pre> 
  <h3>2.3.4 docker exec</h3> 
  <pre><code class="prism language-powershell"><span class="token comment"># docker exec -it c2 ls /root</span>
anaconda-ks<span class="token punctuation">.</span>cfg  anaconda-post<span class="token punctuation">.</span>log  original-ks<span class="token punctuation">.</span>cfg
</code></pre> 
  <pre><code class="prism language-powershell">命令解释
docker exec 在容器外实现与容器交互执行某命令
<span class="token operator">-</span>it 交互式
c2 正在运行的容器名称
<span class="token function">ls</span> <span class="token operator">/</span>root 在正在运行的容器中运行相关的命令
</code></pre> 
  <pre><code class="prism language-powershell">下面命令与上面命令执行效果一致
<span class="token comment"># docker exec c2 ls /root</span>
anaconda-ks<span class="token punctuation">.</span>cfg
anaconda-post<span class="token punctuation">.</span>log
original-ks<span class="token punctuation">.</span>cfg
</code></pre> 
  <h3>2.3.5 docker attach</h3> 
  <pre><code class="prism language-powershell">查看正在运行的容器
<span class="token comment"># docker ps</span>
CONTAINER ID   IMAGE           COMMAND   CREATED          STATUS          PORTS     NAMES
9f2eea16da4c   centos:latest   <span class="token string">"bash"</span>    13 minutes ago   Up 13 minutes             c2
</code></pre> 
  <pre><code class="prism language-powershell"><span class="token namespace">[root@localhost ~]</span><span class="token comment"># docker attach c2</span>
<span class="token namespace">[root@9f2eea16da4c /]</span><span class="token comment">#</span>
</code></pre> 
  <pre><code class="prism language-powershell">命令解释
docker attach 类似于ssh命令,可以进入到容器中
c2 正在运行的容器名称
</code></pre> 
  <pre><code class="prism language-powershell">说明
docker attach 退出容器时,如不需要容器再运行,可直接使用<span class="token keyword">exit</span>退出;如需要容器继续运行,可使用ctrl+p+q
</code></pre> 
  <h3>2.3.6 docker stop</h3> 
  <pre><code class="prism language-powershell"><span class="token comment"># docker ps</span>
CONTAINER ID   IMAGE           COMMAND   CREATED          STATUS          PORTS     NAMES
9f2eea16da4c   centos:latest   <span class="token string">"bash"</span>    22 minutes ago   Up 22 minutes             c2
</code></pre> 
  <pre><code class="prism language-powershell"><span class="token comment"># docker stop 9f2eea</span>
9f2eea
</code></pre> 
  <pre><code class="prism language-powershell"><span class="token comment"># docker ps --all</span>
CONTAINER ID   IMAGE           COMMAND                  CREATED          STATUS                       PORTS     NAMES
9f2eea16da4c   centos:latest   <span class="token string">"bash"</span>                   22 minutes ago   Exited <span class="token punctuation">(</span>137<span class="token punctuation">)</span> 4 seconds ago             c2
</code></pre> 
  <h3>2.3.7 docker start</h3> 
  <pre><code class="prism language-powershell"><span class="token comment"># docker ps --all</span>
CONTAINER ID   IMAGE           COMMAND     CREATED          STATUS                       PORTS     NAMES
9f2eea16da4c   centos:latest   <span class="token string">"bash"</span>      22 minutes ago   Exited <span class="token punctuation">(</span>137<span class="token punctuation">)</span> 4 seconds ago              c2
</code></pre> 
  <pre><code class="prism language-powershell"><span class="token comment"># docker start 9f2eea</span>
9f2eea
</code></pre> 
  <pre><code class="prism language-powershell"><span class="token comment"># docker ps</span>
CONTAINER ID   IMAGE           COMMAND   CREATED          STATUS          PORTS     NAMES
9f2eea16da4c   centos:latest   <span class="token string">"bash"</span>    24 minutes ago   Up 16 seconds             c2
</code></pre> 
  <h3>2.3.8 docker top</h3> 
  <blockquote> 
   <p>在Docker Host查看容器中运行的进程信息</p> 
  </blockquote> 
  <pre><code class="prism language-powershell"><span class="token comment"># docker top c2</span>
UID    PID     PPID      C      STIME        TTY              TIME                CMD
root  69040   69020      0      18:37       pts/0           00:00:00              bash
</code></pre> 
  <table> 
   <thead> 
    <tr> 
     <th>UID</th> 
     <th>PID</th> 
     <th>PPID</th> 
     <th>C</th> 
     <th>STIME</th> 
     <th>TTY</th> 
     <th>TIME</th> 
     <th>CMD</th> 
    </tr> 
   </thead> 
   <tbody> 
    <tr> 
     <td>root</td> 
     <td>69040</td> 
     <td>69020</td> 
     <td>0</td> 
     <td>18:37</td> 
     <td>pts/0</td> 
     <td>00:00:00</td> 
     <td>bash</td> 
    </tr> 
   </tbody> 
  </table> 
  <pre><code class="prism language-powershell">命令解释
docker top 查看container内进程信息,指在docker host上查看,与docker exec <span class="token operator">-</span>it c2 <span class="token function">ps</span> <span class="token operator">-</span>ef不同。
</code></pre> 
  <pre><code class="prism language-powershell">输出说明
UID 容器中运行的命令用户ID
PID 容器中运行的命令PID
PPID 容器中运行的命令父PID,由于PPID是一个容器,此可指为容器在Docker Host中进程ID
C     占用CPU百分比
STIME 启动时间
TTY   运行所在的终端
TIME  运行时间
CMD   执行的命令
</code></pre> 
  <h3>2.3.9 docker rm</h3> 
  <blockquote> 
   <p>如果容器已停止,使用此命令可以直接删除;如果容器处于运行状态,则需要提前关闭容器后,再删除容器。下面演示容器正在运行关闭后删除的方法。</p> 
  </blockquote> 
  <h4>2.3.9.1 指定删除容器</h4> 
  <pre><code class="prism language-powershell"><span class="token comment"># docker ps</span>
CONTAINER ID   IMAGE           COMMAND   CREATED      STATUS         PORTS     NAMES
9f2eea16da4c   centos:latest   <span class="token string">"bash"</span>    2 days ago   Up 3 seconds             c2
</code></pre> 
  <pre><code class="prism language-powershell"><span class="token comment"># docker stop c2</span>
或
<span class="token comment"># docker stop 9f2eea16da4c</span>
</code></pre> 
  <pre><code class="prism language-powershell"><span class="token comment"># docker rm c2</span>
或
<span class="token comment"># docker rm 9f2eea16da4c</span>
</code></pre> 
  <h4>2.3.9.2 批量删除容器</h4> 
  <pre><code class="prism language-powershell"><span class="token comment"># docker ps --all</span>
CONTAINER ID   IMAGE           COMMAND          CREATED      STATUS                  PORTS    NAMES
948f234e22a1   centos:latest   <span class="token string">"bash"</span>           2 days ago   Exited <span class="token punctuation">(</span>0<span class="token punctuation">)</span> 2 days ago            c1
01cb3e01273c   centos:latest   <span class="token string">"bash"</span>           2 days ago   Exited <span class="token punctuation">(</span>0<span class="token punctuation">)</span> 2 days ago            systemimage1
46d950fdfb33   nginx:latest    <span class="token string">"/docker-ent..."</span> 2 days ago   Exited <span class="token punctuation">(</span>0<span class="token punctuation">)</span> 2 days ago            upbeat_goldberg
</code></pre> 
  <pre><code class="prism language-powershell"><span class="token comment"># docker ps --all | awk '{if (NR>=2){print $1}}' | xargs docker rm</span>
</code></pre> 
 </div> 
</div>
                            </div>
                        </div>
                    </div>
                    <!--PC和WAP自适应版-->
                    <div id="SOHUCS" sid="1536923625033068544"></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">你可能感兴趣的:(云原生,docker,容器,linux,云原生)</h4>
        <div id="paradigm-article-related">
            <div class="recommend-post mb30">
                <ul class="widget-links">
                    <li><a href="/article/1835513699826233344.htm"
                           title="android系统selinux中添加新属性property" target="_blank">android系统selinux中添加新属性property</a>
                        <span class="text-muted">辉色投像</span>

                        <div>1.定位/android/system/sepolicy/private/property_contexts声明属性开头:persist.charge声明属性类型:u:object_r:system_prop:s0图12.定位到android/system/sepolicy/public/domain.te删除neverallow{domain-init}default_prop:property</div>
                    </li>
                    <li><a href="/article/1835509391361667072.htm"
                           title="Linux下QT开发的动态库界面弹出操作(SDL2)" target="_blank">Linux下QT开发的动态库界面弹出操作(SDL2)</a>
                        <span class="text-muted">13jjyao</span>
<a class="tag" taget="_blank" href="/search/QT%E7%B1%BB/1.htm">QT类</a><a class="tag" taget="_blank" href="/search/qt/1.htm">qt</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a><a class="tag" taget="_blank" href="/search/sdl2/1.htm">sdl2</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a>
                        <div>需求:操作系统为linux,开发框架为qt,做成需带界面的qt动态库,调用方为java等非qt程序难点:调用方为java等非qt程序,也就是说调用方肯定不带QApplication::exec(),缺少了这个,QTimer等事件和QT创建的窗口将不能弹出(包括opencv也是不能弹出);这与qt调用本身qt库是有本质的区别的思路:1.调用方缺QApplication::exec(),那么我们在接口</div>
                    </li>
                    <li><a href="/article/1835505228137459712.htm"
                           title="腾讯云技术深度探索:构建高效云原生微服务架构" target="_blank">腾讯云技术深度探索:构建高效云原生微服务架构</a>
                        <span class="text-muted">我的运维人生</span>
<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/%E6%9E%B6%E6%9E%84/1.htm">架构</a><a class="tag" taget="_blank" href="/search/%E8%85%BE%E8%AE%AF%E4%BA%91/1.htm">腾讯云</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4%E5%BC%80%E5%8F%91/1.htm">运维开发</a><a class="tag" taget="_blank" href="/search/%E6%8A%80%E6%9C%AF%E5%85%B1%E4%BA%AB/1.htm">技术共享</a>
                        <div>腾讯云技术深度探索:构建高效云原生微服务架构在当今快速发展的技术环境中,云原生技术已成为企业数字化转型的关键驱动力。腾讯云作为行业领先的云服务提供商,不断推出创新的产品和技术,助力企业构建高效、可扩展的云原生微服务架构。本文将深入探讨腾讯云在微服务领域的最新进展,并通过一个实际案例展示如何在腾讯云平台上构建云原生应用。腾讯云微服务架构概览腾讯云微服务架构基于云原生理念,旨在帮助企业快速实现应用的容</div>
                    </li>
                    <li><a href="/article/1835504596898902016.htm"
                           title="linux sdl windows.h,Windows下的SDL安装" target="_blank">linux sdl windows.h,Windows下的SDL安装</a>
                        <span class="text-muted">奔跑吧linux内核</span>
<a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/sdl/1.htm">sdl</a><a class="tag" taget="_blank" href="/search/windows.h/1.htm">windows.h</a>
                        <div>首先你要下载并安装SDL开发包。如果装在C盘下,路径为C:\SDL1.2.5如果在WINDOWS下。你可以按以下步骤:1.打开VC++,点击"Tools",Options2,点击directories选项3.选择"Includefiles"增加一个新的路径。"C:\SDL1.2.5\include"4,现在选择"Libaryfiles“增加"C:\SDL1.2.5\lib"现在你可以开始编写你的第</div>
                    </li>
                    <li><a href="/article/1835503712899002368.htm"
                           title="linux中sdl的使用教程,sdl使用入门" target="_blank">linux中sdl的使用教程,sdl使用入门</a>
                        <span class="text-muted">Melissa Corvinus</span>
<a class="tag" taget="_blank" href="/search/linux%E4%B8%ADsdl%E7%9A%84%E4%BD%BF%E7%94%A8%E6%95%99%E7%A8%8B/1.htm">linux中sdl的使用教程</a>
                        <div>本文通过一个简单示例讲解SDL的基本使用流程。示例中展示一个窗口,窗口里面有个随机颜色快随机移动。当我们鼠标点击关闭按钮时间窗口关闭。基本步骤如下:1.初始化SDL并创建一个窗口。SDL_Init()初始化SDL_CreateWindow()创建窗口2.纹理渲染存储RGB和存储纹理的区别:比如一个从左到右由红色渐变到蓝色的矩形,用存储RGB的话就需要把矩形中每个点的具体颜色值存储下来;而纹理只是一</div>
                    </li>
                    <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/1835501948011376640.htm"
                           title="使用 FinalShell 进行远程连接(ssh 远程连接 Linux 服务器)" target="_blank">使用 FinalShell 进行远程连接(ssh 远程连接 Linux 服务器)</a>
                        <span class="text-muted">编程经验分享</span>
<a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7/1.htm">开发工具</a><a class="tag" taget="_blank" href="/search/%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">服务器</a><a class="tag" taget="_blank" href="/search/ssh/1.htm">ssh</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a>
                        <div>目录前言基本使用教程新建远程连接连接主机自定义命令路由追踪前言后端开发,必然需要和服务器打交道,部署应用,排查问题,查看运行日志等等。一般服务器都是集中部署在机房中,也有一些直接是云服务器,总而言之,程序员不可能直接和服务器直接操作,一般都是通过ssh连接来登录服务器。刚接触远程连接时,使用的是XSHELL来远程连接服务器,连接上就能够操作远程服务器了,但是仅用XSHELL并没有上传下载文件的功能</div>
                    </li>
                    <li><a href="/article/1835495770502033408.htm"
                           title="Day17笔记-高阶函数" target="_blank">Day17笔记-高阶函数</a>
                        <span class="text-muted">~在杰难逃~</span>
<a class="tag" taget="_blank" href="/search/Python/1.htm">Python</a><a class="tag" taget="_blank" href="/search/%E7%AC%94%E8%AE%B0/1.htm">笔记</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a><a class="tag" taget="_blank" href="/search/pycharm/1.htm">pycharm</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90/1.htm">数据分析</a>
                        <div>高阶函数【重点掌握】函数的本质:函数是一个变量,函数名是一个变量名,一个函数可以作为另一个函数的参数或返回值使用如果A函数作为B函数的参数,B函数调用完成之后,会得到一个结果,则B函数被称为高阶函数常用的高阶函数:map(),reduce(),filter(),sorted()1.map()map(func,iterable),返回值是一个iterator【容器,迭代器】func:函数iterab</div>
                    </li>
                    <li><a href="/article/1835493373906087936.htm"
                           title="libyuv之linux编译" target="_blank">libyuv之linux编译</a>
                        <span class="text-muted">jaronho</span>
<a class="tag" taget="_blank" href="/search/Linux/1.htm">Linux</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4/1.htm">运维</a><a class="tag" taget="_blank" href="/search/%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">服务器</a>
                        <div>文章目录一、下载源码二、编译源码三、注意事项1、银河麒麟系统(aarch64)(1)解决armv8-a+dotprod+i8mm指令集支持问题(2)解决armv9-a+sve2指令集支持问题一、下载源码到GitHub网站下载https://github.com/lemenkov/libyuv源码,或者用直接用git克隆到本地,如:gitclonehttps://github.com/lemenko</div>
                    </li>
                    <li><a href="/article/1835489588169240576.htm"
                           title="ARM驱动学习之5 LEDS驱动" target="_blank">ARM驱动学习之5 LEDS驱动</a>
                        <span class="text-muted">JT灬新一</span>
<a class="tag" taget="_blank" href="/search/%E5%B5%8C%E5%85%A5%E5%BC%8F/1.htm">嵌入式</a><a class="tag" taget="_blank" href="/search/C/1.htm">C</a><a class="tag" taget="_blank" href="/search/%E5%BA%95%E5%B1%82/1.htm">底层</a><a class="tag" taget="_blank" href="/search/arm%E5%BC%80%E5%8F%91/1.htm">arm开发</a><a class="tag" taget="_blank" href="/search/%E5%AD%A6%E4%B9%A0/1.htm">学习</a><a class="tag" taget="_blank" href="/search/%E5%8D%95%E7%89%87%E6%9C%BA/1.htm">单片机</a>
                        <div>ARM驱动学习之5LEDS驱动知识点:•linuxGPIO申请函数和赋值函数–gpio_request–gpio_set_value•三星平台配置GPIO函数–s3c_gpio_cfgpin•GPIO配置输出模式的宏变量–S3C_GPIO_OUTPUT注意点:DRIVER_NAME和DEVICE_NAME匹配。实现步骤:1.加入需要的头文件://Linux平台的gpio头文件#include//三</div>
                    </li>
                    <li><a href="/article/1835485681187647488.htm"
                           title="【华为OD技术面试真题精选 - 非技术题】 -HR面,综合面_华为od hr面" target="_blank">【华为OD技术面试真题精选 - 非技术题】 -HR面,综合面_华为od hr面</a>
                        <span class="text-muted">一个射手座的程序媛</span>
<a class="tag" taget="_blank" href="/search/%E7%A8%8B%E5%BA%8F%E5%91%98/1.htm">程序员</a><a class="tag" taget="_blank" href="/search/%E5%8D%8E%E4%B8%BAod/1.htm">华为od</a><a class="tag" taget="_blank" href="/search/%E9%9D%A2%E8%AF%95/1.htm">面试</a><a class="tag" taget="_blank" href="/search/%E8%81%8C%E5%9C%BA%E5%92%8C%E5%8F%91%E5%B1%95/1.htm">职场和发展</a>
                        <div>最后的话最近很多小伙伴找我要Linux学习资料,于是我翻箱倒柜,整理了一些优质资源,涵盖视频、电子书、PPT等共享给大家!资料预览给大家整理的视频资料:给大家整理的电子书资料:如果本文对你有帮助,欢迎点赞、收藏、转发给朋友,让我有持续创作的动力!网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。需要这份系统化的资料的朋友,可以点击这里获</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/1835482277870661632.htm"
                           title="简介Shell、zsh、bash" target="_blank">简介Shell、zsh、bash</a>
                        <span class="text-muted">zhaosuningsn</span>
<a class="tag" taget="_blank" href="/search/Shell/1.htm">Shell</a><a class="tag" taget="_blank" href="/search/zsh/1.htm">zsh</a><a class="tag" taget="_blank" href="/search/bash/1.htm">bash</a><a class="tag" taget="_blank" href="/search/shell/1.htm">shell</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/bash/1.htm">bash</a>
                        <div>Shell是Linux和Unix的外壳,类似衣服,负责外界与Linux和Unix内核的交互联系。例如接收终端用户及各种应用程序的命令,把接收的命令翻译成内核能理解的语言,传递给内核,并把内核处理接收的命令的结果返回给外界,即Shell是外界和内核沟通的桥梁或大门。Linux和Unix提供了多种Shell,其中有种bash,当然还有其他好多种。Mac电脑中不但有bash,还有一个zsh,预装的,据说</div>
                    </li>
                    <li><a href="/article/1835479000600899584.htm"
                           title="Linux MariaDB使用OpenSSL安装SSL证书" target="_blank">Linux MariaDB使用OpenSSL安装SSL证书</a>
                        <span class="text-muted">Meta39</span>
<a class="tag" taget="_blank" href="/search/MySQL/1.htm">MySQL</a><a class="tag" taget="_blank" href="/search/Oracle/1.htm">Oracle</a><a class="tag" taget="_blank" href="/search/MariaDB/1.htm">MariaDB</a><a class="tag" taget="_blank" href="/search/Linux/1.htm">Linux</a><a class="tag" taget="_blank" href="/search/Windows/1.htm">Windows</a><a class="tag" taget="_blank" href="/search/ssl/1.htm">ssl</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/mariadb/1.htm">mariadb</a>
                        <div>进入到证书存放目录,批量删除.pem证书警告:确保已经进入到证书存放目录find.-typef-iname\*.pem-delete查看是否安装OpenSSLopensslversion没有则安装yuminstallopensslopenssl-devel开启SSL编辑/etc/my.cnf文件(没有的话就创建,但是要注意,在/etc/my.cnf.d/server.cnf配置了datadir的,</div>
                    </li>
                    <li><a href="/article/1835469294436184064.htm"
                           title="【从浅识到熟知Linux】Linux发展史" target="_blank">【从浅识到熟知Linux】Linux发展史</a>
                        <span class="text-muted">Jammingpro</span>
<a class="tag" taget="_blank" href="/search/%E4%BB%8E%E6%B5%85%E5%AD%A6%E5%88%B0%E7%86%9F%E7%9F%A5Linux/1.htm">从浅学到熟知Linux</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4/1.htm">运维</a><a class="tag" taget="_blank" href="/search/%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">服务器</a>
                        <div>归属专栏:从浅学到熟知Linux个人主页:Jammingpro每日努力一点点,技术变化看得见文章前言:本篇文章记录Linux发展的历史,因在介绍Linux过程中涉及的其他操作系统及人物,本文对相关内容也有所介绍。文章目录Unix发展史Linux发展史开源Linux官网企业应用情况发行版本在学习Linux前,我们可能都会问Linux从哪里来?它是如何发展的。但在介绍Linux之前,需要先介绍一下Un</div>
                    </li>
                    <li><a href="/article/1835467782687387648.htm"
                           title="linux 发展史" target="_blank">linux 发展史</a>
                        <span class="text-muted">种树的猴子</span>
<a class="tag" taget="_blank" href="/search/%E5%86%85%E6%A0%B8/1.htm">内核</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/1.htm">操作系统</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/%E5%A4%A7%E6%95%B0%E6%8D%AE/1.htm">大数据</a>
                        <div>linux发展史说明此前对linux认识模糊一知半解,近期通过学习将自己对于linux的发展总结一下方便大家日后的学习。那Linux是目前一款非常火热的开源操作系统,可是linux是什么时候出现的,又是因为什么样的原因被开发出来的呢。以下将对linux的发展历程进行详细的讲解。目录一、Linux发展背景二、UINIX的诞生三、UNIX的重要分支-BSD的诞生四、Minix的诞生五、GNU与Free</div>
                    </li>
                    <li><a href="/article/1835466523163062272.htm"
                           title="Linux sh命令" target="_blank">Linux sh命令</a>
                        <span class="text-muted">fengyehongWorld</span>
<a class="tag" taget="_blank" href="/search/Linux/1.htm">Linux</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a>
                        <div>目录一.基本语法二.选项2.1-c字符串中读取内容,并执行2.1.1基本用法2.1.2获取当前目录下失效的超链接2.2-x每个命令执行之前,将其打印出来2.3结合Here文档使用一.基本语法⏹Linux和Unix系统中用于执行shell脚本或运行命令的命令。sh[选项][脚本文件][参数...]⏹选项-c:从字符串中读取内容,并执行。-x:在每个命令执行之前,将其打印出来。-s:从标准流中读取内容</div>
                    </li>
                    <li><a href="/article/1835466270955368448.htm"
                           title="Linux vi常用命令" target="_blank">Linux vi常用命令</a>
                        <span class="text-muted">fengyehongWorld</span>
<a class="tag" taget="_blank" href="/search/Linux/1.htm">Linux</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a>
                        <div>参考资料viコマンド(vimコマンド)リファレンス目录一.保存系命令二.删除系命令三.移动系命令四.复制粘贴系命令一.保存系命令⏹保存并退出:wq⏹强制保存并退出:wq!⏹退出(文件未编辑):q⏹强制退出(忽略已编辑内容):q!⏹另存为:w新文件名二.删除系命令⏹删除当前行dd⏹清空整个文档gg:移动到文档顶部dG:删除到最后一行ggdG三.移动系命令⏹移动到文档顶部gg⏹移动到文档底部#方式1G</div>
                    </li>
                    <li><a href="/article/1835457442260021248.htm"
                           title="ArrayList 源码解析" target="_blank">ArrayList 源码解析</a>
                        <span class="text-muted">程序猿进阶</span>
<a class="tag" taget="_blank" href="/search/Java%E5%9F%BA%E7%A1%80/1.htm">Java基础</a><a class="tag" taget="_blank" href="/search/ArrayList/1.htm">ArrayList</a><a class="tag" taget="_blank" href="/search/List/1.htm">List</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E9%9D%A2%E8%AF%95/1.htm">面试</a><a class="tag" taget="_blank" href="/search/%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96/1.htm">性能优化</a><a class="tag" taget="_blank" href="/search/%E6%9E%B6%E6%9E%84%E8%AE%BE%E8%AE%A1/1.htm">架构设计</a><a class="tag" taget="_blank" href="/search/idea/1.htm">idea</a>
                        <div>ArrayList是Java集合框架中的一个动态数组实现,提供了可变大小的数组功能。它继承自AbstractList并实现了List接口,是顺序容器,即元素存放的数据与放进去的顺序相同,允许放入null元素,底层通过数组实现。除该类未实现同步外,其余跟Vector大致相同。每个ArrayList都有一个容量capacity,表示底层数组的实际大小,容器内存储元素的个数不能多于当前容量。当向容器中添</div>
                    </li>
                    <li><a href="/article/1835452402178813952.htm"
                           title="Linux查看服务器日志" target="_blank">Linux查看服务器日志</a>
                        <span class="text-muted">TPBoreas</span>
<a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4/1.htm">运维</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4/1.htm">运维</a>
                        <div>一、tail这个是我最常用的一种查看方式用法如下:tail-n10test.log查询日志尾部最后10行的日志;tail-n+10test.log查询10行之后的所有日志;tail-fn10test.log循环实时查看最后1000行记录(最常用的)一般还会配合着grep用,(实时抓包)例如:tail-fn1000test.log|grep'关键字'(动态抓包)tail-fn1000test.log</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/1835443696431099904.htm"
                           title="笋丁网页自动回复机器人V3.0.0免授权版源码" target="_blank">笋丁网页自动回复机器人V3.0.0免授权版源码</a>
                        <span class="text-muted">希希分享</span>
<a class="tag" taget="_blank" href="/search/%E8%BD%AF%E5%B8%8C%E7%BD%9158soho_cn/1.htm">软希网58soho_cn</a><a class="tag" taget="_blank" href="/search/%E6%BA%90%E7%A0%81%E8%B5%84%E6%BA%90/1.htm">源码资源</a><a class="tag" taget="_blank" href="/search/%E7%AC%8B%E4%B8%81%E7%BD%91%E9%A1%B5%E8%87%AA%E5%8A%A8%E5%9B%9E%E5%A4%8D%E6%9C%BA%E5%99%A8%E4%BA%BA/1.htm">笋丁网页自动回复机器人</a>
                        <div>笋丁网页机器人一款可设置自动回复,默认消息,调用自定义api接口的网页机器人。此程序后端语言使用Golang,内存占用最高不超过30MB,1H1G服务器流畅运行。仅支持Linux服务器部署,不支持虚拟主机,请悉知!使用自定义api功能需要有一定的建站基础。源码下载:https://download.csdn.net/download/m0_66047725/89754250更多资源下载:关注我。安</div>
                    </li>
                    <li><a href="/article/1835422770016645120.htm"
                           title="《 C++ 修炼全景指南:四 》揭秘 C++ List 容器背后的实现原理,带你构建自己的双向链表" target="_blank">《 C++ 修炼全景指南:四 》揭秘 C++ List 容器背后的实现原理,带你构建自己的双向链表</a>
                        <span class="text-muted">Lenyiin</span>
<a class="tag" taget="_blank" href="/search/%E6%8A%80%E6%9C%AF%E6%8C%87%E5%8D%97/1.htm">技术指南</a><a class="tag" taget="_blank" href="/search/C%2B%2B/1.htm">C++</a><a class="tag" taget="_blank" href="/search/%E4%BF%AE%E7%82%BC%E5%85%A8%E6%99%AF%E6%8C%87%E5%8D%97/1.htm">修炼全景指南</a><a class="tag" taget="_blank" href="/search/c%2B%2B/1.htm">c++</a><a class="tag" taget="_blank" href="/search/list/1.htm">list</a><a class="tag" taget="_blank" href="/search/%E9%93%BE%E8%A1%A8/1.htm">链表</a><a class="tag" taget="_blank" href="/search/stl/1.htm">stl</a>
                        <div>本篇博客,我们将详细讲解如何从头实现一个功能齐全且强大的C++List容器,并深入到各个细节。这篇博客将包括每一步的代码实现、解释以及扩展功能的探讨,目标是让初学者也能轻松理解。一、简介1.1、背景介绍在C++中,std::list是一个基于双向链表的容器,允许高效的插入和删除操作,适用于频繁插入和删除操作的场景。与动态数组不同,list允许常数时间内的插入和删除操作,支持双向遍历。这篇文章将详细</div>
                    </li>
                    <li><a href="/article/1835417097660887040.htm"
                           title="Linux CTF逆向入门" target="_blank">Linux CTF逆向入门</a>
                        <span class="text-muted">蚁景网络安全</span>
<a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4/1.htm">运维</a><a class="tag" taget="_blank" href="/search/CTF/1.htm">CTF</a>
                        <div>1.ELF格式我们先来看看ELF文件头,如果想详细了解,可以查看ELF的manpage文档。关于ELF更详细的说明:e_shoff:节头表的文件偏移量(字节)。如果文件没有节头表,则此成员值为零。sh_offset:表示了该section(节)离开文件头部位置的距离+-------------------+|ELFheader|---++--------->+-------------------</div>
                    </li>
                    <li><a href="/article/1835415332345442304.htm"
                           title="NPM私库搭建-verdaccio(Linux)" target="_blank">NPM私库搭建-verdaccio(Linux)</a>
                        <span class="text-muted">Beam007</span>
<a class="tag" taget="_blank" href="/search/npm/1.htm">npm</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a>
                        <div>1、安装nodelinux服务器安装nodea)、官网下载所需的node版本https://nodejs.org/dist/v14.21.0/b)、解压安装包若下载的是xxx.tar.xz文件,解压命令为tar-xvfxxx.tar.xzc)、修改环境变量修改:/etc/profile文件#SETPATHFORNODEJSexportNODE_HOME=NODEJS解压安装的路径exportPAT</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/1835400463676174336.htm"
                           title="C++常见知识掌握" target="_blank">C++常见知识掌握</a>
                        <span class="text-muted">nfgo</span>
<a class="tag" taget="_blank" href="/search/c%2B%2B/1.htm">c++</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a>
                        <div>1.Linux软件开发、调试与维护内核与系统结构Linux内核是操作系统的核心,负责管理硬件资源,提供系统服务,它是系统软件与硬件之间的桥梁。主要组成部分包括:进程管理:内核通过调度器分配CPU时间给各个进程,实现进程的创建、调度、终止等操作。使用进程描述符(task_struct)来存储进程信息,包括状态(就绪、运行、阻塞等)、优先级、内存映射等。内存管理:包括物理内存和虚拟内存管理。通过页表映</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/1835399577818198016.htm"
                           title="linux脚本sed替换变量,sed 命令中替换值为shell变量" target="_blank">linux脚本sed替换变量,sed 命令中替换值为shell变量</a>
                        <span class="text-muted">诺坎普之约</span>
<a class="tag" taget="_blank" href="/search/linux%E8%84%9A%E6%9C%ACsed%E6%9B%BF%E6%8D%A2%E5%8F%98%E9%87%8F/1.htm">linux脚本sed替换变量</a>
                        <div>文章目录sed命令中替换值为shell变量替换基本语法sed中替换使用shell变量总结参考文档sed命令中替换值为shell变量替换基本语法大家都是sed有很多用法,最多就应该是替换一些值了。让我们先回忆sed的替换语法。在sed进行替换的时候sed-i's/old/new/g'1.txtecho"hellooldfrank"|sed's/old/new/g'结果如下:hellonewfrank</div>
                    </li>
                                <li><a href="/article/99.htm"
                                       title="ios内付费" target="_blank">ios内付费</a>
                                    <span class="text-muted">374016526</span>
<a class="tag" taget="_blank" href="/search/ios/1.htm">ios</a><a class="tag" taget="_blank" href="/search/%E5%86%85%E4%BB%98%E8%B4%B9/1.htm">内付费</a>
                                    <div>近年来写了很多IOS的程序,内付费也用到不少,使用IOS的内付费实现起来比较麻烦,这里我写了一个简单的内付费包,希望对大家有帮助。 
  
具体使用如下: 
这里的sender其实就是调用者,这里主要是为了回调使用。 
[KuroStoreApi kuroStoreProductId:@"产品ID" storeSender:self storeFinishCallBa</div>
                                </li>
                                <li><a href="/article/226.htm"
                                       title="20 款优秀的 Linux 终端仿真器" target="_blank">20 款优秀的 Linux 终端仿真器</a>
                                    <span class="text-muted">brotherlamp</span>
<a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/linux%E8%A7%86%E9%A2%91/1.htm">linux视频</a><a class="tag" taget="_blank" href="/search/linux%E8%B5%84%E6%96%99/1.htm">linux资料</a><a class="tag" taget="_blank" href="/search/linux%E8%87%AA%E5%AD%A6/1.htm">linux自学</a><a class="tag" taget="_blank" href="/search/linux%E6%95%99%E7%A8%8B/1.htm">linux教程</a>
                                    <div>  
终端仿真器是一款用其它显示架构重现可视终端的计算机程序。换句话说就是终端仿真器能使哑终端看似像一台连接上了服务器的客户机。终端仿真器允许最终用户用文本用户界面和命令行来访问控制台和应用程序。(LCTT 译注:终端仿真器原意指对大型机-哑终端方式的模拟,不过在当今的 Linux 环境中,常指通过远程或本地方式连接的伪终端,俗称“终端”。) 
你能从开源世界中找到大量的终端仿真器,它们</div>
                                </li>
                                <li><a href="/article/353.htm"
                                       title="Solr Deep Paging(solr 深分页)" target="_blank">Solr Deep Paging(solr 深分页)</a>
                                    <span class="text-muted">eksliang</span>
<a class="tag" taget="_blank" href="/search/solr%E6%B7%B1%E5%88%86%E9%A1%B5/1.htm">solr深分页</a><a class="tag" taget="_blank" href="/search/solr%E5%88%86%E9%A1%B5%E6%80%A7%E8%83%BD%E9%97%AE%E9%A2%98/1.htm">solr分页性能问题</a>
                                    <div>转载请出自出处:http://eksliang.iteye.com/blog/2148370 
作者:eksliang(ickes) blg:http://eksliang.iteye.com/ 概述 
长期以来,我们一直有一个深分页问题。如果直接跳到很靠后的页数,查询速度会比较慢。这是因为Solr的需要为查询从开始遍历所有数据。直到Solr的4.7这个问题一直没有一个很好的解决方案。直到solr</div>
                                </li>
                                <li><a href="/article/480.htm"
                                       title="数据库面试题" target="_blank">数据库面试题</a>
                                    <span class="text-muted">18289753290</span>
<a class="tag" taget="_blank" href="/search/%E9%9D%A2%E8%AF%95%E9%A2%98+%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">面试题 数据库</a>
                                    <div>1.union ,union all 
网络搜索出的最佳答案: 
union和union all的区别是,union会自动压缩多个结果集合中的重复结果,而union all则将所有的结果全部显示出来,不管是不是重复。 
Union:对两个结果集进行并集操作,不包括重复行,同时进行默认规则的排序; 
Union All:对两个结果集进行并集操作,包括重复行,不进行排序; 
2.索引有哪些分类?作用是</div>
                                </li>
                                <li><a href="/article/607.htm"
                                       title="Android TV屏幕适配" target="_blank">Android TV屏幕适配</a>
                                    <span class="text-muted">酷的飞上天空</span>
<a class="tag" taget="_blank" href="/search/android/1.htm">android</a>
                                    <div>先说下现在市面上TV分辨率的大概情况 
两种分辨率为主 
1.720标清,分辨率为1280x720. 
屏幕尺寸以32寸为主,部分电视为42寸 
2.1080p全高清,分辨率为1920x1080 
屏幕尺寸以42寸为主,此分辨率电视屏幕从32寸到50寸都有 
  
适配遇到问题,已1080p尺寸为例: 
分辨率固定不变,屏幕尺寸变化较大。 
如:效果图尺寸为1920x1080,如果使用d</div>
                                </li>
                                <li><a href="/article/734.htm"
                                       title="Timer定时器与ActionListener联合应用" target="_blank">Timer定时器与ActionListener联合应用</a>
                                    <span class="text-muted">永夜-极光</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a>
                                    <div>功能:在控制台每秒输出一次 
  
代码: 
package Main;
import javax.swing.Timer;
 import java.awt.event.*;

 public class T {
    private static int count = 0; 

    public static void main(String[] args){
</div>
                                </li>
                                <li><a href="/article/861.htm"
                                       title="Ubuntu14.04系统Tab键不能自动补全问题解决" target="_blank">Ubuntu14.04系统Tab键不能自动补全问题解决</a>
                                    <span class="text-muted">随便小屋</span>
<a class="tag" taget="_blank" href="/search/Ubuntu+14.04/1.htm">Ubuntu 14.04</a>
                                    <div>Unbuntu 14.4安装之后就在终端中使用Tab键不能自动补全,解决办法如下: 
  
1、利用vi编辑器打开/etc/bash.bashrc文件(需要root权限) 
sudo vi /etc/bash.bashrc 
 接下来会提示输入密码 
2、找到文件中的下列代码 
#enable bash completion in interactive shells
#if</div>
                                </li>
                                <li><a href="/article/988.htm"
                                       title="学会人际关系三招 轻松走职场" target="_blank">学会人际关系三招 轻松走职场</a>
                                    <span class="text-muted">aijuans</span>
<a class="tag" taget="_blank" href="/search/%E8%81%8C%E5%9C%BA/1.htm">职场</a>
                                    <div>要想成功,仅有专业能力是不够的,处理好与老板、同事及下属的人际关系也是门大学问。如何才能在职场如鱼得水、游刃有余呢?在此,教您简单实用的三个窍门。 
  第一,多汇报 
 最近,管理学又提出了一个新名词“追随力”。它告诉我们,做下属最关键的就是要多请示汇报,让上司随时了解你的工作进度,有了新想法也要及时建议。不知不觉,你就有了“追随力”,上司会越来越了解和信任你。 
  第二,勤沟通 
 团队的力</div>
                                </li>
                                <li><a href="/article/1115.htm"
                                       title="《O2O:移动互联网时代的商业革命》读书笔记" target="_blank">《O2O:移动互联网时代的商业革命》读书笔记</a>
                                    <span class="text-muted">aoyouzi</span>
<a class="tag" taget="_blank" href="/search/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/1.htm">读书笔记</a>
                                    <div>移动互联网的未来:碎片化内容+碎片化渠道=各式精准、互动的新型社会化营销。 
  
O2O:Online to OffLine 线上线下活动 
O2O就是在移动互联网时代,生活消费领域通过线上和线下互动的一种新型商业模式。 
  
手机二维码本质:O2O商务行为从线下现实世界到线上虚拟世界的入口。 
  
线上虚拟世界创造的本意是打破信息鸿沟,让不同地域、不同需求的人</div>
                                </li>
                                <li><a href="/article/1242.htm"
                                       title="js实现图片随鼠标滚动的效果" target="_blank">js实现图片随鼠标滚动的效果</a>
                                    <span class="text-muted">百合不是茶</span>
<a class="tag" taget="_blank" href="/search/JavaScript/1.htm">JavaScript</a><a class="tag" taget="_blank" href="/search/%E6%BB%9A%E5%8A%A8%E5%B1%9E%E6%80%A7%E7%9A%84%E8%8E%B7%E5%8F%96/1.htm">滚动属性的获取</a><a class="tag" taget="_blank" href="/search/%E5%9B%BE%E7%89%87%E6%BB%9A%E5%8A%A8/1.htm">图片滚动</a><a class="tag" taget="_blank" href="/search/%E5%B1%9E%E6%80%A7%E8%8E%B7%E5%8F%96/1.htm">属性获取</a><a class="tag" taget="_blank" href="/search/%E9%A1%B5%E9%9D%A2%E5%8A%A0%E8%BD%BD/1.htm">页面加载</a>
                                    <div>1,获取样式属性值 
top  与顶部的距离
left  与左边的距离
right 与右边的距离
bottom 与下边的距离
zIndex 层叠层次 
  
  例子:获取左边的宽度,当css写在body标签中时 
<div id="adver" style="position:absolute;top:50px;left:1000p</div>
                                </li>
                                <li><a href="/article/1369.htm"
                                       title="ajax同步异步参数async" target="_blank">ajax同步异步参数async</a>
                                    <span class="text-muted">bijian1013</span>
<a class="tag" taget="_blank" href="/search/jquery/1.htm">jquery</a><a class="tag" taget="_blank" href="/search/Ajax/1.htm">Ajax</a><a class="tag" taget="_blank" href="/search/async/1.htm">async</a>
                                    <div>        开发项目开发过程中,需要将ajax的返回值赋到全局变量中,然后在该页面其他地方引用,因为ajax异步的原因一直无法成功,需将async:false,使其变成同步的。 
        格式: 
$.ajax({ type: 'POST', ur</div>
                                </li>
                                <li><a href="/article/1496.htm"
                                       title="Webx3框架(1)" target="_blank">Webx3框架(1)</a>
                                    <span class="text-muted">Bill_chen</span>
<a class="tag" taget="_blank" href="/search/eclipse/1.htm">eclipse</a><a class="tag" taget="_blank" href="/search/spring/1.htm">spring</a><a class="tag" taget="_blank" href="/search/maven/1.htm">maven</a><a class="tag" taget="_blank" href="/search/%E6%A1%86%E6%9E%B6/1.htm">框架</a><a class="tag" taget="_blank" href="/search/ibatis/1.htm">ibatis</a>
                                    <div>Webx是淘宝开发的一套Web开发框架,Webx3是其第三个升级版本;采用Eclipse的开发环境,现在支持java开发; 
采用turbine原型的MVC框架,扩展了Spring容器,利用Maven进行项目的构建管理,灵活的ibatis持久层支持,总的来说,还是一套很不错的Web框架。 
Webx3遵循turbine风格,velocity的模板被分为layout/screen/control三部</div>
                                </li>
                                <li><a href="/article/1623.htm"
                                       title="【MongoDB学习笔记五】MongoDB概述" target="_blank">【MongoDB学习笔记五】MongoDB概述</a>
                                    <span class="text-muted">bit1129</span>
<a class="tag" taget="_blank" href="/search/mongodb/1.htm">mongodb</a>
                                    <div>MongoDB是面向文档的NoSQL数据库,尽量业界还对MongoDB存在一些质疑的声音,比如性能尤其是查询性能、数据一致性的支持没有想象的那么好,但是MongoDB用户群确实已经够多。MongoDB的亮点不在于它的性能,而是它处理非结构化数据的能力以及内置对分布式的支持(复制、分片达到的高可用、高可伸缩),同时它提供的近似于SQL的查询能力,也是在做NoSQL技术选型时,考虑的一个重要因素。Mo</div>
                                </li>
                                <li><a href="/article/1750.htm"
                                       title="spring/hibernate/struts2常见异常总结" target="_blank">spring/hibernate/struts2常见异常总结</a>
                                    <span class="text-muted">白糖_</span>
<a class="tag" taget="_blank" href="/search/Hibernate/1.htm">Hibernate</a>
                                    <div> 
 Spring 
 
①ClassNotFoundException: org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException 
缺少aspectjweaver.jar,该jar包常用于spring aop中 
  
②java.lang.ClassNotFoundException: org.sprin</div>
                                </li>
                                <li><a href="/article/1877.htm"
                                       title="jquery easyui表单重置(reset)扩展思路" target="_blank">jquery easyui表单重置(reset)扩展思路</a>
                                    <span class="text-muted">bozch</span>
<a class="tag" taget="_blank" href="/search/form/1.htm">form</a><a class="tag" taget="_blank" href="/search/jquery+easyui/1.htm">jquery easyui</a><a class="tag" taget="_blank" href="/search/reset/1.htm">reset</a>
                                    <div>在jquery easyui表单中 尚未提供表单重置的功能,这就需要自己对其进行扩展。 
扩展的时候要考虑的控件有: 
 combo,combobox,combogrid,combotree,datebox,datetimebox 
需要对其添加reset方法,reset方法就是把初始化的值赋值给当前的组件,这就需要在组件的初始化时将值保存下来。 
在所有的reset方法添加完毕之后,就需要对fo</div>
                                </li>
                                <li><a href="/article/2004.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>
package beautyOfCoding;

import java.util.Arrays;

/*
 *《编程之美》的思路是:搜索+剪枝。有点像是写下棋程序:当前情况下,把所有可能的下一步都做一遍;在这每一遍操作里面,计算出如果按这一步走的话,能不能赢(得出最优结果)。
 *《编程之美》上代码有很多错误,且每个变量的含义令人费解。因此我按我的理解写了以下代码:
 */
</div>
                                </li>
                                <li><a href="/article/2131.htm"
                                       title="Struts1.X 源码分析之ActionForm赋值原理" target="_blank">Struts1.X 源码分析之ActionForm赋值原理</a>
                                    <span class="text-muted">chenbowen00</span>
<a class="tag" taget="_blank" href="/search/struts/1.htm">struts</a>
                                    <div>struts1在处理请求参数之前,首先会根据配置文件action节点的name属性创建对应的ActionForm。如果配置了name属性,却找不到对应的ActionForm类也不会报错,只是不会处理本次请求的请求参数。 
 
如果找到了对应的ActionForm类,则先判断是否已经存在ActionForm的实例,如果不存在则创建实例,并将其存放在对应的作用域中。作用域由配置文件action节点的s</div>
                                </li>
                                <li><a href="/article/2258.htm"
                                       title="[空天防御与经济]在获得充足的外部资源之前,太空投资需有限度" target="_blank">[空天防御与经济]在获得充足的外部资源之前,太空投资需有限度</a>
                                    <span class="text-muted">comsci</span>
<a class="tag" taget="_blank" href="/search/%E8%B5%84%E6%BA%90/1.htm">资源</a>
                                    <div> 
      这里有一个常识性的问题: 
 
      地球的资源,人类的资金是有限的,而太空是无限的..... 
 
      就算全人类联合起来,要在太空中修建大型空间站,也不一定能够成功,因为资源和资金,技术有客观的限制.... 
 
&</div>
                                </li>
                                <li><a href="/article/2385.htm"
                                       title="ORACLE临时表—ON COMMIT PRESERVE ROWS" target="_blank">ORACLE临时表—ON COMMIT PRESERVE ROWS</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/%E4%B8%B4%E6%97%B6%E8%A1%A8/1.htm">临时表</a>
                                    <div>ORACLE临时表 转 
临时表:像普通表一样,有结构,但是对数据的管理上不一样,临时表存储事务或会话的中间结果集,临时表中保存的数据只对当前 
会话可见,所有会话都看不到其他会话的数据,即使其他会话提交了,也看不到。临时表不存在并发行为,因为他们对于当前会话都是独立的。 
创建临时表时,ORACLE只创建了表的结构(在数据字典中定义),并没有初始化内存空间,当某一会话使用临时表时,ORALCE会</div>
                                </li>
                                <li><a href="/article/2512.htm"
                                       title="基于Nginx XSendfile+SpringMVC进行文件下载" target="_blank">基于Nginx XSendfile+SpringMVC进行文件下载</a>
                                    <span class="text-muted">denger</span>
<a class="tag" taget="_blank" href="/search/%E5%BA%94%E7%94%A8%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">应用服务器</a><a class="tag" taget="_blank" href="/search/Web/1.htm">Web</a><a class="tag" taget="_blank" href="/search/nginx/1.htm">nginx</a><a class="tag" taget="_blank" href="/search/%E7%BD%91%E7%BB%9C%E5%BA%94%E7%94%A8/1.htm">网络应用</a><a class="tag" taget="_blank" href="/search/lighttpd/1.htm">lighttpd</a>
                                    <div>    在平常我们实现文件下载通常是通过普通 read-write方式,如下代码所示。 
 
   @RequestMapping("/courseware/{id}") 
   public void download(@PathVariable("id") String courseID, HttpServletResp</div>
                                </li>
                                <li><a href="/article/2639.htm"
                                       title="scanf接受char类型的字符" target="_blank">scanf接受char类型的字符</a>
                                    <span class="text-muted">dcj3sjt126com</span>
<a class="tag" taget="_blank" href="/search/c/1.htm">c</a>
                                    <div>/*
	2013年3月11日22:35:54
	目的:学习char只接受一个字符
*/
# include <stdio.h>

int main(void)
{
	int i;
	char ch;

	scanf("%d", &i);
	printf("i = %d\n", i);
	scanf("%</div>
                                </li>
                                <li><a href="/article/2766.htm"
                                       title="学编程的价值" target="_blank">学编程的价值</a>
                                    <span class="text-muted">dcj3sjt126com</span>
<a class="tag" taget="_blank" href="/search/%E7%BC%96%E7%A8%8B/1.htm">编程</a>
                                    <div>发一个人会编程, 想想以后可以教儿女, 是多么美好的事啊, 不管儿女将来从事什么样的职业, 教一教, 对他思维的开拓大有帮助 
  
像这位朋友学习:   
http://blog.sina.com.cn/s/articlelist_2584320772_0_1.html 
  
 
  VirtualGS教程 (By @林泰前): 几十年的老程序员,资深的</div>
                                </li>
                                <li><a href="/article/2893.htm"
                                       title="二维数组(矩阵)对角线输出" target="_blank">二维数组(矩阵)对角线输出</a>
                                    <span class="text-muted">飞天奔月</span>
<a class="tag" taget="_blank" href="/search/%E4%BA%8C%E7%BB%B4%E6%95%B0%E7%BB%84/1.htm">二维数组</a>
                                    <div>今天在BBS里面看到这样的面试题目, 
  
1,二维数组(N*N),沿对角线方向,从右上角打印到左下角如N=4: 4*4二维数组  
{ 1 2 3 4 }
{ 5 6 7 8 }
{ 9 10 11 12 }
{13 14 15 16 } 
打印顺序  
4
3 8
2 7 12
1 6 11 16
5 10 15
9 14
13 
要</div>
                                </li>
                                <li><a href="/article/3020.htm"
                                       title="Ehcache(08)——可阻塞的Cache——BlockingCache" target="_blank">Ehcache(08)——可阻塞的Cache——BlockingCache</a>
                                    <span class="text-muted">234390216</span>
<a class="tag" taget="_blank" href="/search/%E5%B9%B6%E5%8F%91/1.htm">并发</a><a class="tag" taget="_blank" href="/search/ehcache/1.htm">ehcache</a><a class="tag" taget="_blank" href="/search/BlockingCache/1.htm">BlockingCache</a><a class="tag" taget="_blank" href="/search/%E9%98%BB%E5%A1%9E/1.htm">阻塞</a>
                                    <div>可阻塞的Cache—BlockingCache 
  
       在上一节我们提到了显示使用Ehcache锁的问题,其实我们还可以隐式的来使用Ehcache的锁,那就是通过BlockingCache。BlockingCache是Ehcache的一个封装类,可以让我们对Ehcache进行并发操作。其内部的锁机制是使用的net.</div>
                                </li>
                                <li><a href="/article/3147.htm"
                                       title="mysqldiff对数据库间进行差异比较" target="_blank">mysqldiff对数据库间进行差异比较</a>
                                    <span class="text-muted">jackyrong</span>
<a class="tag" taget="_blank" href="/search/mysqld/1.htm">mysqld</a>
                                    <div>  mysqldiff该工具是官方mysql-utilities工具集的一个脚本,可以用来对比不同数据库之间的表结构,或者同个数据库间的表结构 
   如果在windows下,直接下载mysql-utilities安装就可以了,然后运行后,会跑到命令行下: 
 
1) 基本用法 
   mysqldiff --server1=admin:12345</div>
                                </li>
                                <li><a href="/article/3274.htm"
                                       title="spring data jpa 方法中可用的关键字" target="_blank">spring data jpa 方法中可用的关键字</a>
                                    <span class="text-muted">lawrence.li</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/spring/1.htm">spring</a>
                                    <div>spring data jpa 支持以方法名进行查询/删除/统计。 
查询的关键字为find 
删除的关键字为delete/remove (>=1.7.x) 
统计的关键字为count (>=1.7.x) 
  
修改需要使用@Modifying注解 
@Modifying
@Query("update User u set u.firstna</div>
                                </li>
                                <li><a href="/article/3401.htm"
                                       title="Spring的ModelAndView类" target="_blank">Spring的ModelAndView类</a>
                                    <span class="text-muted">nicegege</span>
<a class="tag" taget="_blank" href="/search/spring/1.htm">spring</a>
                                    <div>项目中controller的方法跳转的到ModelAndView类,一直很好奇spring怎么实现的? 
/*
 * Copyright 2002-2010 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * yo</div>
                                </li>
                                <li><a href="/article/3528.htm"
                                       title="搭建 CentOS 6 服务器(13) - rsync、Amanda" target="_blank">搭建 CentOS 6 服务器(13) - rsync、Amanda</a>
                                    <span class="text-muted">rensanning</span>
<a class="tag" taget="_blank" href="/search/centos/1.htm">centos</a>
                                    <div>(一)rsync 
 
Server端 
 
# yum install rsync
# vi /etc/xinetd.d/rsync
    service rsync
    {
        disable = no
        flags           = IPv6
        socket_type     = stream
        wait    </div>
                                </li>
                                <li><a href="/article/3655.htm"
                                       title="Learn Nodejs 02" target="_blank">Learn Nodejs 02</a>
                                    <span class="text-muted">toknowme</span>
<a class="tag" taget="_blank" href="/search/nodejs/1.htm">nodejs</a>
                                    <div>(1)npm是什么   
npm is the package manager for node 
官方网站:https://www.npmjs.com/ 
npm上有很多优秀的nodejs包,来解决常见的一些问题,比如用node-mysql,就可以方便通过nodejs链接到mysql,进行数据库的操作 
在开发过程往往会需要用到其他的包,使用npm就可以下载这些包来供程序调用 
&nb</div>
                                </li>
                                <li><a href="/article/3782.htm"
                                       title="Spring MVC 拦截器" target="_blank">Spring MVC 拦截器</a>
                                    <span class="text-muted">xp9802</span>
<a class="tag" taget="_blank" href="/search/spring+mvc/1.htm">spring mvc</a>
                                    <div>Controller层的拦截器继承于HandlerInterceptorAdapter 
 
 HandlerInterceptorAdapter.java   1  public   abstract   class  HandlerInterceptorAdapter  implements  HandlerIntercep</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>