性能测试

Docker 容器操作 常用命令

2019-03-15  本文已影响301人  __元昊__

软件镜像(如 weChat.exe)----> 运行镜像----> 产生一个容器(正在运行的软件,运行的 微信程序);

操作 命令 说明
运行 docker run --name container-name -d image-name:tag 如:docker run --name myredis –d redis --name:自定义容器名 -d:表示后台运行 image-name:指定运行的镜像名称 tag:镜像的版本
列表 docker ps(查看运行中的容器); 加上-a;可以查看所有容器
停止 docker stop container-name/container-id 停止当前运行的指定容器
启动 docker start container-name/container-id 启动容器
删除 docker rm container-id 删除指定容器
端口映射 -p 6379:6379 如:docker run --name myredis -d -p 6379:6379 docker.io/redis -p:主机端口映射到容器内部的端口
容器日志 docker logs container-name/container-id

官网可查看更多命令:https://docs.docker.com/engine/reference/commandline/docker/
也可以从 docker Hub 官网:https://hub.docker.com/ 上查看镜像的同时查看它的命令

环境准备

启动 Docker,然后下载 Tomcat 镜像,本文以操作 Tomcat 镜像进行说明。镜像操作可以参考《 Docker 镜像操作 常用命令》

[root@localhost ~]# docker search tomcat
INDEX       NAME                                            DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
docker.io   docker.io/tomcat                                Apache Tomcat is an open source implementa...   1980      [OK]       
docker.io   docker.io/tomee                                 Apache TomEE is an all-Apache Java EE cert...   53        [OK]       
docker.io   docker.io/dordoka/tomcat                        Ubuntu 14.04, Oracle JDK 8 and Tomcat 8 ba...   49                   [OK]
docker.io   docker.io/davidcaste/alpine-tomcat              Apache Tomcat 7/8 using Oracle Java 7/8 wi...   29                   [OK]
docker.io   docker.io/bitnami/tomcat                        Bitnami Tomcat Docker Image                     20                   [OK]
docker.io   docker.io/consol/tomcat-7.0                     Tomcat 7.0.57, 8080, "admin/admin"              16                   [OK]
docker.io   docker.io/cloudesire/tomcat                     Tomcat server, 6/7/8                            15                   [OK]
docker.io   docker.io/meirwa/spring-boot-tomcat-mysql-app   a sample spring-boot app using tomcat and ...   10                   [OK]
docker.io   docker.io/tutum/tomcat                          Base docker image to run a Tomcat applicat...   10                   
docker.io   docker.io/jeanblanchard/tomcat                  Minimal Docker image with Apache Tomcat         8                    
docker.io   docker.io/aallam/tomcat-mysql                   Debian, Oracle JDK, Tomcat & MySQL              7                    [OK]
docker.io   docker.io/rightctrl/tomcat                      CentOS , Oracle Java, tomcat application s...   3                    [OK]
docker.io   docker.io/amd64/tomcat                          Apache Tomcat is an open source implementa...   2                    
docker.io   docker.io/arm64v8/tomcat                        Apache Tomcat is an open source implementa...   2                    
docker.io   docker.io/maluuba/tomcat7-java8                 Tomcat7 with java8.                             2                    
docker.io   docker.io/99taxis/tomcat7                       Tomcat7                                         1                    [OK]
docker.io   docker.io/camptocamp/tomcat-logback             Docker image for tomcat with logback integ...   1                    [OK]
docker.io   docker.io/fabric8/tomcat-8                      Fabric8 Tomcat 8 Image                          1                    [OK]
docker.io   docker.io/primetoninc/tomcat                    Apache tomcat 8.5, 8.0, 7.0                     1                    [OK]
docker.io   docker.io/cfje/tomcat-resource                  Tomcat Concourse Resource                       0                    
docker.io   docker.io/jelastic/tomcat                                                                       0                    
docker.io   docker.io/oobsri/tomcat8                        Testing CI Jobs with different names.           0                    
docker.io   docker.io/picoded/tomcat7                       tomcat7 with jre8 and MANAGER_USER / MANAG...   0                    [OK]
docker.io   docker.io/s390x/tomcat                          Apache Tomcat is an open source implementa...   0                    
docker.io   docker.io/swisstopo/service-print-tomcat        backend tomcat for service-print "the true...   0        
[root@localhost ~]#

docker search tomcat 检索出来的云端 Tomcat 如上所示
如需要下载其它版本,可以查看官网:https://hub.docker.com/r/library/tomcat/tags/,下面是其中的一小部分。

image

如下所示安装的是 docker.io/tomcat 的 8.5.32 版本

[root@localhost ~]# docker pull tomcat:8.5.32
Trying to pull repository docker.io/library/tomcat ... 
8.5.32: Pulling from docker.io/library/tomcat
55cbf04beb70: Pull complete 
1607093a898c: Pull complete 
9a8ea045c926: Pull complete 
1290813abd9d: Pull complete 
8a6b982ad6d7: Pull complete 
abb029e68402: Pull complete 
d068d0a738e5: Pull complete 
42ee47bb0c52: Pull complete 
ae9c861aed25: Pull complete 
60bba9d0dc8d: Pull complete 
15222e409530: Pull complete 
2dcc81b69024: Pull complete 
Digest: sha256:bbdb0de8298ab7281ff28331a9e4129562820ac54e243e44c3749f389876f562
Status: Downloaded newer image for docker.io/tomcat:8.5.32
[root@localhost ~]#  

容器操作

运行容器

使用命令:docker run --name container-name:tag -d image-name
--name:自定义容器名,不指定时,docker 会自动生成一个名称
-d:表示后台运行容器
image-name:指定运行的镜像名称以及 Tag
如下所示启动 docker.io/tomcat 镜像成功,前缀 docker.io 可以不写,后面的 tag 版本号要指定。可以使用 docker ps 命令查看容器

[root@localhost ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
docker.io/tomcat    8.5.32              5808f01b11bf        35 hours ago        463 MB
[root@localhost ~]# docker run --name myTomcat -d tomcat:8.5.32
1cbabce49b840d14ab01e25e0d282737b853681debdc541fddf27b508906a62a
[root@localhost ~]# 

查看容器

使用 docker ps 命令 查看正在运行的所有容器,加上 -a 参数可以查看所有容器(即无论是否运行中)

[root@localhost ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
docker.io/tomcat    8.5.32              5808f01b11bf        35 hours ago        463 MB
[root@localhost ~]# docker run --name myTomcat -d tomcat:8.5.32
1cbabce49b840d14ab01e25e0d282737b853681debdc541fddf27b508906a62a
[root@localhost ~]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
1cbabce49b84        tomcat:8.5.32       "catalina.sh run"   4 minutes ago       Up 4 minutes        8080/tcp            myTomcat
[root@localhost ~]# 

CONTAINER ID:容器 di

IMAGE:镜像名称:Tag

COMMAND:命令

CREATES:容器创建的时刻

STATUS:容器当前的状态 (up 表示运行、Exited 表示停止运行)

PORTS:镜像程序使用的端口号

注意此时虽然容器已经在运行中,Tomcat 镜像占用8080端口,但是这个8080端口是 Docker 容器内部的端口,并不是服务器的端口,所以必须做 端口映射 将服务器的实际端口映射到 Docker 容器中的端口才能访问。

停止容器

使用 docker stop container-name/container-id 命令进行停止容器运行,指定容器名或者容器 id 即可

[root@localhost ~]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
1cbabce49b84        tomcat:8.5.32       "catalina.sh run"   14 minutes ago      Up 14 minutes       8080/tcp            myTomcat
[root@localhost ~]# docker stop 1cbabce49b84
1cbabce49b84
[root@localhost ~]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@localhost ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                            PORTS               NAMES
1cbabce49b84        tomcat:8.5.32       "catalina.sh run"   16 minutes ago      Exited (143) About a minute ago                       myTomcat
[root@localhost ~]# 

启动容器

使用 docker start container-name/container-id 命令启动停止运行的容器,同理可以根据 容器名或者 容器 id 进行启动

[root@localhost ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                           PORTS               NAMES
1cbabce49b84        tomcat:8.5.32       "catalina.sh run"   About an hour ago   Exited (143) About an hour ago                       myTomcat
[root@localhost ~]# docker start 1cbabce49b84
1cbabce49b84
[root@localhost ~]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
1cbabce49b84        tomcat:8.5.32       "catalina.sh run"   About an hour ago   Up 3 seconds        8080/tcp            myTomcat
[root@localhost ~]# 

删除容器

使用 docker rm container-id 命令 删除容器,删除容器前,必须先停止容器运行,根据 容器 id 进行删除
rm 参数是删除容器,rmi 参数是删除镜像
镜像运行在容器中,docker 中可以运行多个互补干扰的容器,可以将同一个镜像在多个容器中进行运行

[root@localhost ~]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
1cbabce49b84        tomcat:8.5.32       "catalina.sh run"   About an hour ago   Up 3 seconds        8080/tcp            myTomcat
[root@localhost ~]# docker stop myTomcat
myTomcat
[root@localhost ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                       PORTS               NAMES
1cbabce49b84        tomcat:8.5.32       "catalina.sh run"   About an hour ago   Exited (143) 3 seconds ago                       myTomcat
[root@localhost ~]# docker rm 1cbabce49b84
1cbabce49b84
[root@localhost ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@localhost ~]# 

端口映射

使用命令:docker run --name container-name:tag -d -p 服务器端口:Docker 端口 image-name
--name:自定义容器名,不指定时,docker 会自动生成一个名称
-d:表示后台运行容器
image-name:指定运行的镜像名称以及 Tag
-p 表示进行服务器与 Docker 容器的端口映射,默认情况下容器中镜像占用的端口是 Docker 容器中的端口与外界是隔绝的,必须进行端口映射才能访问
如下所示:服务器防火墙先开放了 8080、8090 端口,否则防火墙不开放端口的话,从其它电脑也是无法访问服务器的
然后 运行了 两个容器,容器名称分别指定为 "myTomcat1"、"myTomcat2"、两个容器中都是同一个 docker.io/tomcat:8.5.32 镜像
两个容器都指定了端口映射,分别是8080、8090 ,都会转发到 Docker 容器内部

[root@localhost ~]# firewall-cmd --zone=public --list-port
9876/tcp 8090/tcp 80/tcp 8080/tcp
[root@localhost ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
docker.io/tomcat    8.5.32              5808f01b11bf        38 hours ago        463 MB
[root@localhost ~]# docker run --name myTtomcat1 -d -p 8080:8080 tomcat:8.5.32 
d67cca0aacf7cc4a91112721769ba56aadbe55e8e78ff6749528cf5cecb38f6e
[root@localhost ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                    NAMES
d67cca0aacf7        tomcat:8.5.32       "catalina.sh run"   19 seconds ago      Up 17 seconds       0.0.0.0:8080->8080/tcp   myTtomcat1
[root@localhost ~]# docker run --name myTtomcat2 -d -p 8090:8080 tomcat:8.5.32 
0f6df57a7fa189710c0d2c3088334a7ff725c7e57eea71220ffb67049eaf5f5a
[root@localhost ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                    NAMES
0f6df57a7fa1        tomcat:8.5.32       "catalina.sh run"   3 seconds ago       Up 1 second         0.0.0.0:8090->8080/tcp   myTtomcat2
d67cca0aacf7        tomcat:8.5.32       "catalina.sh run"   53 seconds ago      Up 51 seconds       0.0.0.0:8080->8080/tcp   myTtomcat1
[root@localhost ~]# 

启动成功之后,ip addr show 查一下服务器 ip 地址( 192.168.58.129),然后就能从物理机上访问了

[root@localhost ~]# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:ea:9e:7f brd ff:ff:ff:ff:ff:ff
    inet 192.168.58.129/24 brd 192.168.58.255 scope global noprefixroute dynamic eno16777736
       valid_lft 1771sec preferred_lft 1771sec
    inet6 fe80::20c:29ff:feea:9e7f/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 02:42:9d:e0:f0:14 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 scope global docker0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:9dff:fee0:f014/64 scope link 
       valid_lft forever preferred_lft forever
9: veth8675b32@if8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default 
    link/ether be:8c:64:6e:2b:08 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fe80::bc8c:64ff:fe6e:2b08/64 scope link 
       valid_lft forever preferred_lft forever
11: vethb98436b@if10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default 
    link/ether 26:ae:79:9a:05:7b brd ff:ff:ff:ff:ff:ff link-netnsid 1
    inet6 fe80::24ae:79ff:fe9a:57b/64 scope link 
       valid_lft forever preferred_lft forever
[root@localhost ~]# 
image

容器日志

使用 docker logs container-name/container-id 命令 可以查看容器日志信息,指定容器名或者 容器 id 即可

[root@localhost ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                       PORTS               NAMES
0f6df57a7fa1        tomcat:8.5.32       "catalina.sh run"   35 minutes ago      Exited (143) 5 seconds ago                       myTtomcat2
d67cca0aacf7        tomcat:8.5.32       "catalina.sh run"   35 minutes ago      Exited (143) 8 seconds ago                       myTtomcat1
[root@localhost ~]# docker start myTtomcat1
myTtomcat1
[root@localhost ~]# docker logs myTtomcat1
16-Aug-2018 12:59:05.823 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.5.32
16-Aug-2018 12:59:05.829 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jun 20 2018 19:50:35 UTC
16-Aug-2018 12:59:05.829 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.5.32.0
16-Aug-2018 12:59:05.829 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
16-Aug-2018 12:59:05.829 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            3.10.0-862.9.1.el7.x86_64
16-Aug-2018 12:59:05.829 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
16-Aug-2018 12:59:05.829 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/lib/jvm/java-8-openjdk-amd64/jre
16-Aug-2018 12:59:05.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_181-8u181-b13-1~deb9u1-b13
16-Aug-2018 12:59:05.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
16-Aug-2018 12:59:05.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /usr/local/tomcat
16-Aug-2018 12:59:05.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/local/tomcat
16-Aug-2018 12:59:05.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
16-Aug-2018 12:59:05.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
16-Aug-2018 12:59:05.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
16-Aug-2018 12:59:05.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
16-Aug-2018 12:59:05.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
16-Aug-2018 12:59:05.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
16-Aug-2018 12:59:05.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
16-Aug-2018 12:59:05.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
16-Aug-2018 12:59:05.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
16-Aug-2018 12:59:05.831 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.17] using APR version [1.5.2].
16-Aug-2018 12:59:05.831 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
16-Aug-2018 12:59:05.831 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
16-Aug-2018 12:59:05.846 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.0f  25 May 2017]
16-Aug-2018 12:59:06.008 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
16-Aug-2018 12:59:06.035 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
16-Aug-2018 12:59:06.049 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
16-Aug-2018 12:59:06.056 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
16-Aug-2018 12:59:06.062 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 971 ms
16-Aug-2018 12:59:06.110 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
16-Aug-2018 12:59:06.110 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.32
16-Aug-2018 12:59:06.126 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/ROOT]
16-Aug-2018 12:59:06.723 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/ROOT] has finished in [596] ms
16-Aug-2018 12:59:06.723 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/docs]
16-Aug-2018 12:59:06.766 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/docs] has finished in [43] ms
16-Aug-2018 12:59:06.766 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/examples]
16-Aug-2018 12:59:07.255 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/examples] has finished in [489] ms
16-Aug-2018 12:59:07.255 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/host-manager]
16-Aug-2018 12:59:07.298 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/host-manager] has finished in [43] ms
16-Aug-2018 12:59:07.298 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/manager]
16-Aug-2018 12:59:07.338 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/manager] has finished in [40] ms
16-Aug-2018 12:59:07.343 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
16-Aug-2018 12:59:07.416 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
16-Aug-2018 12:59:07.422 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1359 ms
16-Aug-2018 13:34:50.366 INFO [Thread-5] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
16-Aug-2018 13:34:50.553 INFO [Thread-5] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
16-Aug-2018 13:34:50.604 INFO [Thread-5] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
16-Aug-2018 13:34:50.805 INFO [Thread-5] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
16-Aug-2018 13:34:50.808 INFO [Thread-5] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
16-Aug-2018 13:34:50.835 INFO [Thread-5] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
16-Aug-2018 13:34:50.839 INFO [Thread-5] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]
16-Aug-2018 13:37:43.118 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.5.32
16-Aug-2018 13:37:43.120 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jun 20 2018 19:50:35 UTC
16-Aug-2018 13:37:43.120 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.5.32.0
16-Aug-2018 13:37:43.120 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
16-Aug-2018 13:37:43.125 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            3.10.0-862.9.1.el7.x86_64
16-Aug-2018 13:37:43.125 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
16-Aug-2018 13:37:43.125 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/lib/jvm/java-8-openjdk-amd64/jre
16-Aug-2018 13:37:43.126 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_181-8u181-b13-1~deb9u1-b13
16-Aug-2018 13:37:43.126 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
16-Aug-2018 13:37:43.126 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /usr/local/tomcat
16-Aug-2018 13:37:43.126 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/local/tomcat
16-Aug-2018 13:37:43.126 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
16-Aug-2018 13:37:43.126 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
16-Aug-2018 13:37:43.126 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
16-Aug-2018 13:37:43.126 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
16-Aug-2018 13:37:43.126 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
16-Aug-2018 13:37:43.126 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
16-Aug-2018 13:37:43.126 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
16-Aug-2018 13:37:43.126 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
16-Aug-2018 13:37:43.126 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
16-Aug-2018 13:37:43.127 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.17] using APR version [1.5.2].
16-Aug-2018 13:37:43.127 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
16-Aug-2018 13:37:43.127 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
16-Aug-2018 13:37:43.142 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.0f  25 May 2017]
16-Aug-2018 13:37:43.347 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
16-Aug-2018 13:37:43.381 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
16-Aug-2018 13:37:43.397 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
16-Aug-2018 13:37:43.398 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
16-Aug-2018 13:37:43.405 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1489 ms
16-Aug-2018 13:37:43.465 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
16-Aug-2018 13:37:43.466 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.32
16-Aug-2018 13:37:43.493 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/ROOT]
16-Aug-2018 13:37:44.297 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/ROOT] has finished in [803] ms
16-Aug-2018 13:37:44.298 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/docs]
16-Aug-2018 13:37:44.329 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/docs] has finished in [32] ms
16-Aug-2018 13:37:44.329 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/examples]
16-Aug-2018 13:37:45.075 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/examples] has finished in [746] ms
16-Aug-2018 13:37:45.075 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/host-manager]
16-Aug-2018 13:37:45.123 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/host-manager] has finished in [48] ms
16-Aug-2018 13:37:45.123 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/manager]
16-Aug-2018 13:37:45.166 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/manager] has finished in [43] ms
16-Aug-2018 13:37:45.172 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
16-Aug-2018 13:37:45.181 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
16-Aug-2018 13:37:45.185 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1779 ms
[root@localhost ~]# 
上一篇下一篇

猜你喜欢

热点阅读