linux安裝docker,已經遇到的問題
在實際開發中,我們經常會遇到多臺機器配置相同的軟體執行環境。
比如配置一個tomcat,mysql...一些環境,其他機器也需要相同的環境時,就會一遍一遍的進行配置,比較麻煩。
而且容器和容器之間是完全隔離的。
在學習的過程中發現Docker可以解決這個問題,所以記錄下安裝遇到的坑
1、首先我們需要安裝linux系統,可以上網
2、接下來需要檢視linux核心版本,因為Docker需要Linux 3.10以上的版本
[[email protected] ~]# uname -a Linux localhost 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
3、剛裝上Linux我們更新下系統
[[email protected] ~]# yum update
4、正式安裝Docker
[[email protected] ~]# yum install docker
然後一直輸入y
安裝好後,檢視是否安裝成功
[[email protected] ~]# docker -v
Docker version 1.13.1, build 8633870/1.13.1
5、接著執行docker服務
[[email protected] ~]# service docker start Redirecting to /bin/systemctl start docker.service Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "j ournalctl -xe" for details.
我們發現啟動沒有成功,根據提示,檢視詳細內容
[[email protected] ~]# systemctl status docker.service ● docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since 五 2018-10-12 13:58:56 CST; 20s ago Docs: http://docs.docker.com Process: 5179 ExecStart=/usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default -runtime=docker-runc --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current --i nit-path=/usr/libexec/docker/docker-init-current --seccomp-profile=/etc/docker/seccomp.json $OPTIONS $DOCKER_STORAGE_OPTIONS $ DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY $REGISTRIES (code=exited, status=1/FAILURE) Main PID: 5179 (code=exited, status=1/FAILURE) 10月 12 13:58:54 localhost systemd[1]: Starting Docker Application Container Engine... 10月 12 13:58:54 localhost dockerd-current[5179]: time="2018-10-12T13:58:54.608122086+08:00" level=warning msg="could...ound" 10月 12 13:58:54 localhost dockerd-current[5179]: time="2018-10-12T13:58:54.614454691+08:00" level=info msg="libconta...5184" 10月 12 13:58:56 localhost dockerd-current[5179]: Error starting daemon: SELinux is not supported with the overlay2 g...alse) 10月 12 13:58:56 localhost systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE 10月 12 13:58:56 localhost systemd[1]: Failed to start Docker Application Container Engine. 10月 12 13:58:56 localhost systemd[1]: Unit docker.service entered failed state. 10月 12 13:58:56 localhost systemd[1]: docker.service failed. Hint: Some lines were ellipsized, use -l to show in full.
折騰了一段時間後,在網上終於找到了解決辦法
6、找到docker-storage檔案
[[email protected] ~]# vi /etc/sysconfig/docker
如下圖
我加了上圖用紅色圈住的一段程式碼
7、接著重新啟動docker,OK
[[email protected] ~]# systemctl restart docker
[[email protected] ~]#
8、比如我們要裝tomcat,輸入命令,查詢tomcat
[[email protected] ~]# docker search tomcat
INDEX NAME DESCRIPTION STARS OFFICIAL
AUTOMATED
docker.io docker.io/tomcat Apache Tomcat is an open source implementa... 2072 [OK]
docker.io docker.io/tomee Apache TomEE is an all-Apache Java EE cert... 56 [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... 31
[OK]
docker.io docker.io/bitnami/tomcat Bitnami Tomcat Docker Image 25
[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/tutum/tomcat Base docker image to run a Tomcat applicat... 11
docker.io docker.io/meirwa/spring-boot-tomcat-mysql-app a sample spring-boot app using tomcat and ... 10
[OK]
docker.io docker.io/aallam/tomcat-mysql Debian, Oracle JDK, Tomcat & MySQL 8
[OK]
docker.io docker.io/jeanblanchard/tomcat Minimal Docker image with Apache Tomcat 8
docker.io docker.io/maluuba/tomcat7-java8 Tomcat7 with java8. 3
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/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/jelastic/tomcat An image of the Tomcat Java application se... 1
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/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
[[email protected] ~]#
如果使用docker pull xxx來拉取映象,那麼會使用國外的網站,現在我們使用國內的映象來拉取,會更快的下載,如下
docker pull registry.docker-cn.com/library/xxx
9、安裝tomcat到本地映象,使用pull命令
[[email protected] ~]# docker pull registry.docker-cn.com/library/tomcat
Using default tag: latest
Trying to pull repository docker.io/library/tomcat ...
latest: Pulling from docker.io/library/tomcat
05d1a5232b46: Pull complete
5cee356eda6b: Pull complete
89d3385f0fd3: Pull complete
65dd87f6620b: Pull complete
78a183a01190: Pull complete
1a4499c85f97: Pull complete
2c9d39b4bfc1: Pull complete
1b1cec2222c9: Pull complete
fc95b85a81f3: Pull complete
0f3868647539: Pull complete
9b6a6eddb2d9: Pull complete
8787183cb077: Pull complete
Digest: sha256:8d120de5102cc12310de741299e9bf6f39d2d674663f2ce4e6f0f181ccfeebe7
Status: Downloaded newer image for docker.io/tomcat:latest
10、檢視本地的tomcat映象
[[email protected] ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/tomcat latest 41a54fe1f79d 4 weeks ago 463 MB
11、可以下載指定版本的tomcat,預設下載latest版本,一下是我下載tomcat 8.0版本時候的效果,輸入命令:docker pull tomcat:8.0 就是可下載指定版本的tomcat了
[[email protected] ~]# docker pull registry.docker-cn.com/library/tomcat:8.0
Trying to pull repository docker.io/library/tomcat ...
8.0: Pulling from docker.io/library/tomcat
f189db1b88b3: Downloading [==========================================> ] 46.12 MB/54.25 MB
3d06cf2f1b5e: Download complete
edd0da9e3091: Download complete
eb7768aae14e: Download complete
e2780f585e0f: Download complete
e5ed720afeba: Downloading [=============> ] 21.38 MB/81.8 MB
d9e134700cfc: Download complete
e4804b33d02a: Download complete
b9df0c24315e: Download complete
49fdae8eaa20: Downloading [===============================> ] 6.479 MB/10.38 MB
1aea3d9a32e6: Waiting
12、檢視剛下載的tomcat8.0,檢視映象是用docker images命令檢視
[[email protected] ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/tomcat latest 41a54fe1f79d 4 weeks ago 463 MB
docker.io/tomcat 8.0 ef6a7c98d192 4 weeks ago 356 MB
多了tomcat 8.0版本的映象,每個映象都有自己的映象ID
13、刪除不用的映象,使用docker rmi 映象名:tag
[[email protected] ~]# docker rmi tomcat:8.0
Untagged: tomcat:8.0
Untagged: docker.io/[email protected]:8ecb10948deb32c34aeadf7bf95d12a93fbd3527911fa629c1a3e7823b89ce6f
Deleted: sha256:ef6a7c98d192507d6066dcf24e44bec66d07ec9cf7c55d8d3d1ea0a24660bdef
Deleted: sha256:6dc5bbd9ede58ce52f6e9d34eaac4e3bf1fbb3014e9eae344677bf3c2f022a17
Deleted: sha256:6f22c12dcf0ac783b0b00471e38262c708761a677e6a847a57a5d7cce2cbc7f1
Deleted: sha256:dbefc7cd29b21d99c136d6234ca442cdb89fc91f3c91ef6c1d333d37424d2f44
Deleted: sha256:d65396dbf112285c9d395bb33c2eb2f776cd9b959c007152c10a2f25fbf1c198
Deleted: sha256:5b8a875f80bdd2e9f9cf2c0852243e0cb59ea7be5e92620b2c2089800bb18594
Deleted: sha256:d97b31b9ca51e024a895e2f6fa032224fb73ba2a070149499ce87306ed9d7af6
Deleted: sha256:3717c4f05493340d97d982bc6ed8cba98869833918de23c78c39414788dd08c1
Deleted: sha256:b9c326fb510188d2958888aee970ae93925c2a2ad8a78b2ec3a521747ee3ec4f
Deleted: sha256:8cc193ff8a5b4837eab54bee27418daadad8825f13b8fab55229b4954fee6f9f
Deleted: sha256:b1852f6f3f85863ed849af673e566ad8de76dac4d2c6526d791e965978c1ce62
Deleted: sha256:8c466bf4ca6ffdda8b7717b1cd6fe31109529ee64e626a003a224fb8bd2bc469
14、在檢視,沒有了剛才刪除的tomcat8.0
[[email protected] ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/tomcat latest 41a54fe1f79d 4 weeks ago 463 MB
15、如果想使docker在Linux啟動的時候也跟著啟動,那麼輸入命令 systemctl enable docker
[[email protected] ~]# systemctl enable docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
16、真正的用docker執行一個tomcat映象,使用命令 docker run --name mytomcat -d tomcat:latest
[[email protected] ~]# docker run --name mytomcat -d tomcat:latest
1e05e524c6097b1dac4e58821bb220037d40488c5cf9846e37fabd29a3dfb22b
17、檢視剛才執行的tomat映象,使用命令 docker ps 檢視執行中的容器
[[email protected] ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1e05e524c609 tomcat:latest "catalina.sh run" About a minute ago Up About a minute 8080/tcp mytomcat
18、停止docker容器 使用命令 docker stop 容器ID或者容器名稱
[[email protected] ~]# docker stop 1e05e524c609
1e05e524c609
可以使用docker ps -a 檢視容器中的映象,已經退出了。
[[email protected] ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1e05e524c609 tomcat:latest "catalina.sh run" 5 minutes ago Exited (143) 22 seconds ago mytomcat
如果我們想要容器啟動,那麼我們使用docker start mytomcat命令
19、刪除容器 docker rm mytomcat
20、如果想要真正是執行tomcat可以被訪問到,那麼我們在執行docker的tomcat容器時需要加一些引數,docker run -d -p 8888:8080 tomcat 說明:-d後臺執行,-p埠對映,把主機的埠對映到容器中的埠,下面的例子是把8888對映到容器中的8080
[[email protected] ~]# docker run -d -p 8888:8080 tomcat
52f3b94d083eb9669b92e346d489df626b59377327f5d84cc3c55860fcd9614f
這樣就啟動了對映,外部可以訪問啟動的容器了
[[email protected] ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
52f3b94d083e tomcat "catalina.sh run" 7 minutes ago Up 7 minutes 0.0.0.0:8888->8080/tcp optimistic_albattani
20、如果外部訪問不了,可能是防火牆的問題,使用命令 service firewalld status 檢視防火牆狀態
[[email protected] ~]# service firewalld status
Redirecting to /bin/systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since 五 2018-10-12 13:52:11 CST; 1h 7min ago
Docs: man:firewalld(1)
Main PID: 16275 (firewalld)
Tasks: 2
Memory: 516.0K
CGroup: /system.slice/firewalld.service
└─16275 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
10月 12 14:23:12 localhost firewalld[16275]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -t nat -C POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE' failed: iptables: N...by that name.
10月 12 14:23:12 localhost firewalld[16275]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -t nat -C DOCKER -i docker0 -j RETURN' failed: iptables: Bad rule (does a matching rul...that chain?).
10月 12 14:23:12 localhost firewalld[16275]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -D FORWARD -i docker0 -o docker0 -j DROP' failed: iptables: Bad rule (does a matching ...that chain?).
10月 12 14:23:12 localhost firewalld[16275]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -t filter -C FORWARD -i docker0 -o docker0 -j ACCEPT' failed: iptables: Bad rule (does...that chain?).
10月 12 14:23:12 localhost firewalld[16275]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -t filter -C FORWARD -i docker0 ! -o docker0 -j ACCEPT' failed: iptables: Bad rule (do...that chain?).
10月 12 14:23:12 localhost firewalld[16275]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -t filter -C FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT' ...that chain?).
10月 12 14:23:12 localhost firewalld[16275]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -t filter -C FORWARD -o docker0 -j DOCKER' failed: iptables: No chain/target/match by that name.
10月 12 14:53:52 localhost firewalld[16275]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -t nat -C DOCKER -p tcp -d 0/0 --dport 8888 -j DNAT --to-destination 172.17.0.2:8080 !...by that name.
10月 12 14:53:52 localhost firewalld[16275]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -t filter -C DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.2 --dport 8080 -j ACCEP...that chain?).
10月 12 14:53:52 localhost firewalld[16275]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -t nat -C POSTROUTING -p tcp -s 172.17.0.2 -d 172.17.0.2 --dport 8080 -j MASQUERADE' f...by that name.
Hint: Some lines were ellipsized, use -l to show in full.
如果是啟動的,給停止了,使用service firewalld stop
[[email protected] ~]# service firewalld stop
Redirecting to /bin/systemctl stop firewalld.service
檢視現在防火牆的狀態
[[email protected] ~]# service firewalld status
Redirecting to /bin/systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: inactive (dead) since 五 2018-10-12 15:03:54 CST; 6s ago
Docs: man:firewalld(1)
Process: 16275 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS)
Main PID: 16275 (code=exited, status=0/SUCCESS)
10月 12 14:23:12 localhost firewalld[16275]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -D FORWARD -i docker0 -o docker0 -j DROP' failed: iptables: Bad rule (does a matching ...that chain?).
10月 12 14:23:12 localhost firewalld[16275]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -t filter -C FORWARD -i docker0 -o docker0 -j ACCEPT' failed: iptables: Bad rule (does...that chain?).
10月 12 14:23:12 localhost firewalld[16275]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -t filter -C FORWARD -i docker0 ! -o docker0 -j ACCEPT' failed: iptables: Bad rule (do...that chain?).
10月 12 14:23:12 localhost firewalld[16275]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -t filter -C FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT' ...that chain?).
10月 12 14:23:12 localhost firewalld[16275]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -t filter -C FORWARD -o docker0 -j DOCKER' failed: iptables: No chain/target/match by that name.
10月 12 14:53:52 localhost firewalld[16275]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -t nat -C DOCKER -p tcp -d 0/0 --dport 8888 -j DNAT --to-destination 172.17.0.2:8080 !...by that name.
10月 12 14:53:52 localhost firewalld[16275]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -t filter -C DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.2 --dport 8080 -j ACCEP...that chain?).
10月 12 14:53:52 localhost firewalld[16275]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -t nat -C POSTROUTING -p tcp -s 172.17.0.2 -d 172.17.0.2 --dport 8080 -j MASQUERADE' f...by that name.
10月 12 15:03:54 localhost systemd[1]: Stopping firewalld - dynamic firewall daemon...
10月 12 15:03:54 localhost systemd[1]: Stopped firewalld - dynamic firewall daemon.
Hint: Some lines were ellipsized, use -l to show in full.
21、如果想要檢視容器的日誌,可以使用docker logs 容器ID
[[email protected] ~]# docker logs 52f3b94d083e
12-Oct-2018 06:53:53.585 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.5.34
12-Oct-2018 06:53:53.587 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Sep 4 2018 22:28:22 UTC
12-Oct-2018 06:53:53.587 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.5.34.0
12-Oct-2018 06:53:53.587 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
12-Oct-2018 06:53:53.587 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 3.10.0-514.el7.x86_64
12-Oct-2018 06:53:53.587 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
12-Oct-2018 06:53:53.587 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-8-openjdk-amd64/jre
12-Oct-2018 06:53:53.591 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_181-8u181-b13-1~deb9u1-b13
12-Oct-2018 06:53:53.591 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
12-Oct-2018 06:53:53.591 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/tomcat
12-Oct-2018 06:53:53.591 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/tomcat
12-Oct-2018 06:53:53.591 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
12-Oct-2018 06:53:53.591 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
12-Oct-2018 06:53:53.591 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
12-Oct-2018 06:53:53.592 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
12-Oct-2018 06:53:53.592 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
12-Oct-2018 06:53:53.592 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
12-Oct-2018 06:53:53.592 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
12-Oct-2018 06:53:53.592 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
12-Oct-2018 06:53:53.592 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
12-Oct-2018 06:53:53.592 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.17] using APR version [1.5.2].
12-Oct-2018 06:53:53.592 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
12-Oct-2018 06:53:53.592 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
12-Oct-2018 06:53:53.603 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.0f 25 May 2017]
12-Oct-2018 06:53:53.749 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
12-Oct-2018 06:53:53.767 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
12-Oct-2018 06:53:53.786 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
12-Oct-2018 06:53:53.787 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
12-Oct-2018 06:53:53.796 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 828 ms
12-Oct-2018 06:53:53.829 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
12-Oct-2018 06:53:53.829 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.34
12-Oct-2018 06:53:53.867 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/ROOT]
12-Oct-2018 06:55:42.456 WARNING [localhost-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PR
NG] took [108,085] milliseconds.
12-Oct-2018 06:55:42.533 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/ROOT] has finished in
[108,666] ms
12-Oct-2018 06:55:42.533 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/docs]
12-Oct-2018 06:55:42.564 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/docs] has finished in
[31] ms
12-Oct-2018 06:55:42.564 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/examples]
12-Oct-2018 06:55:42.944 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/examples] has finishe
d in [380] ms
12-Oct-2018 06:55:42.944 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/host-manager]
12-Oct-2018 06:55:42.998 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/host-manager] has fin
ished in [54] ms
12-Oct-2018 06:55:42.998 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/manager]
12-Oct-2018 06:55:43.042 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/manager] has finished
in [44] ms
12-Oct-2018 06:55:43.047 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
12-Oct-2018 06:55:43.054 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
12-Oct-2018 06:55:43.056 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 109259 ms
[[email protected] ~]#
相關推薦
linux安裝docker,已經遇到的問題
在實際開發中,我們經常會遇到多臺機器配置相同的軟體執行環境。 比如配置一個tomcat,mysql...一些環境,其他機器也需要相同的環境時,就會一遍一遍的進行配置,比較麻煩。 而且容器和容器之間是完全隔離的。 在學習的過程中發現Docker可以解決這個問題,所以記錄下
Linux上安裝Docker,並成功部署NET Core 2.0
ble otn 重要 命中 mode 管理 sql img 內容 概述 容器,顧名思義是用來存放並容納東西的器皿; 而容器技術伴著Docker的興起也漸漸的映入大家的眼簾,它是一個抽象的概念,同時也是默默存在世上多年的技術,不僅能使應用程序間完全的隔離,而且還能在共享底層系
Linux安裝Gitlab,附iSCSI分區掛載說明
dha list send pri nodes tip sha256 map -c 因為Gitlab數據要存放在共享存儲,所以本次配置的重頭戲倒變成了掛載ISCSI了。 OS:CentOS 7.2IP:172.16.1.191/192.168.2.191iSCSI分Targ
Linux安裝unixODBC,解決libodbc.so.2缺失問題
linu sun target tro div str targe 通過 http 背景: 今天筆者在新的linux系統中,編譯以前的代碼,發現libobdc.so.2缺失。通過尋找發現只要安裝unixODBC即可。因此筆者開始了安裝之旅 筆者首先通過 "yum searc
CentOS 7 安裝 Docker,10分鐘入門!
repo latest 測試 gpgkey style x86_64 vm虛擬機 install baseurl 本次安裝是在VM虛擬機的CentOS 7環境下,僅為了學習和測試的簡單安裝,如果在真實生產環境還需要考慮安全策略的其他問題。 1、Linux內核版本需要 3.1
Linux安裝後,需保留哪些自啟動服務?
Linux運維 Linux學習 Linux入門 Linux基礎 Linux雲計算 和Windows系統一樣,Linux服務器運行過程中也會一些沒用的軟件服務默認運行,這些占用了很多系統資源,也會有安全隱患,所以一般是建議關閉的。那麽,工作中Linux主機到底需要有哪些開機自啟動服務呢?
linux安裝jdk,mysql
設置 配置 ase jdk1.8 char fig def roo 變量 vim /etc/profile 最下面 #jdk JAVA_HOME=/usr/local/jdk1.8; PATH =$PATH:$JAVA_HOME/bin;
Linux 安裝Docker Linux 虛擬鏡像下載
.com div blank docke docker 安裝docker wget 5.1 star Linux虛擬鏡像下載: http://mirrors.163.com/centos/7.5.1804/isos/x86_64/ Docker 安裝 wget -qO-
在 Raspberry Pi安裝Docker,運行Home Assistant
config ups ssi syslog mes 智能 groups inf prepare docker 是個好東西,想著Raspbian 是基於 Debian的系統,那定然是支持 docker的。 而有了docker,再raspberry pi上安裝 Home Ass
【mysql學習】linux安裝mysql,使用install指令碼方式 (二)
本文介紹Linux下MySQL 5.6.27 安裝; 1、下載地址https://cdn.mysql.com/archives/mysql-5.6/mysql-5.6.27-linux-glibc2.5-x86_64.tar.gz 2、解壓tar -zxf mysql-5.6.27-linux-glibc
【mysql學習】linux安裝mysql,使用install腳本方式 (二)
6.2 學習 sta ini 開機 serve 方式 mysql學習 ref 本文介紹Linux下MySQL 5.6.27 安裝; 1、下載地址https://cdn.mysql.com/archives/mysql-5.6/mysql-5.6.27-linux-glibc
linux 安裝docker&docker-compose
1:yum install docker 安裝的版本為1.3.1(太老了) 2:https://blog.csdn.net/WarnerWu/article/details/79130854 (更新yum源的文章 你們可以試試反正我沒用 - -) 3.看官方手冊
Linux安裝jdk,tomcat和mysql
Linux安裝jdk 用winSCP連線到linux伺服器 在usr/local路徑下建立一個java包(個人習慣,也可以自定義名字) 將jdk的壓縮包移入java包中,如圖 linux中進入到java包中,然後輸入以下程式碼: [[email prot
linux 安裝apache ,php,mysql
1、安裝apache 使用yum命令安裝Apache yum –y install httpd 設定開機啟動Apache chkconfig --levels 235 httpd on 啟動Apache service
linux安裝ssh2,php遠端登入伺服器
1:安裝libssh2 wget http://www.libssh2.org/download/libssh2-1.4.2.tar.gz tar -xzvf libssh2-1.4.2.tar.gz cd libssh2-1.4.2 ./configure -
安裝docker,用docker安裝redis等工具
一、安裝 docker docker加速網址 https://registry.docker-cn.com uname -r 158 yum install -y yum-utils device-mapper-persistent-data lvm2 159  
Linux安裝JDK,tomcat,mysql
先安裝Linux的jdk、mysql、redis依賴包 在Linux下執行下面語句 JDK依賴包: yum install glibc.i686 MYSQL依賴包: yum -y install libaio.so.1 libgcc_s.so.1 libstdc++.so.6
Linux安裝docker
1> linux安裝docker: 1.1> 檢查核心版本: uname -r 返回的值大於3.10即可 1.2> yum update 確保yum為最新 1.3> yum install docker 安裝docker 1.4> systemctl sta
解決: -bash: docker-compose: command not found、linux 安裝 docker-compose
1. 執行docker-compose 命令報錯: -bash: docker-compose: command not found 2.安裝: 1)先安裝 pip ,檢查是否已有: pip -V 報錯: -bash: pip: command not
Docker系列(3-應用篇) linux 安裝 Docker
一、軟件版本 作業系統:Centos 7.0 docker的官網 : https://www.docker.com/community-edition#/download 映象中心:https://hub.docker.com/ 高速下載地址:http://get