daemon安装win10 (daemon安装win10系统) 检查

java –version查看jdk环境

[root@localhost ~]# java -version-bash: /usr/bin/java: No such file or directorynot found说明当前服务器没有JDK环境,需要安装JDK。

进入tomcat/bin目录下查看是否存在commons-daemon-native.tar.gz包

[root@localhost ~]# cd apache-tomcat-9.0.33/bin/[root@localhost bin]# lsbootstrap.jar catalina-tasks.xml commons-daemon.jar configtest.sh digest.sh setclasspath.bat shutdown.sh tomcat-juli.jar tool-wrapper.shcatalina.bat ciphers.bat commons-daemon-native.tar.gz daemon.sh makebase.bat setclasspath.sh startup.bat tomcat-native.tar.gz version.batcatalina.sh ciphers.sh configtest.bat digest.bat makebase.sh shutdown.bat startup.sh tool-wrapper.bat version.sh[root@localhost bin]#

若不存在可以在相同版本的tomcat中拷贝到当前tomcat/bin目录下,或者去新的tomcat中寻找,也可以去http://www.apache.org/dist/commons/daemon/source/下载

安装

创建tomcat用户和tomcat组

[root@localhost ~]# groupadd tomcat[root@localhost ~]# useradd -g tomcat -s /usr/sbin/nologin tomcat

tar命令解压commons-daemon-native.tar.gz

tar -zxvf commons-daemon-native.tar.gz

若出现-bash: tar: command not found错误,可以使用yum安装tar

yum install tar -y

解压完毕后进入commons-daemon-1.2.2-native-src/unix/

[root@localhost bin]# cd commons-daemon-1.2.2-native-src/unix/[root@localhost unix]# lsconfigure configure.in INSTALL.txt Makedefs.in Makefile.in man native support[root@localhost unix]#

执行./configure命令

./configure

若出现下面错误

[root@localhost unix]# ./configure*** Current host ***checking build system type... x86_64-pc-linux-gnuchecking host system type... x86_64-pc-linux-gnuchecking cached host system type... ok*** C-Language compilation tools ***checking for gcc... nochecking for cc... nochecking for cl.exe... noconfigure: error: in `/root/apache-tomcat-9.0.33/bin/commons-daemon-1.2.2-native-src/unix':configure: error: no acceptable C compiler found in $PATHSee `config.log' for more details该错误说明当前环境没有c编辑器,可以使用yum安装gcc来解决

yum install gcc -y

安装gcc后。重新执行,结果如下图

[root@localhost unix]# ./configure*** Current host ***checking build system type... x86_64-pc-linux-gnuchecking host system type... x86_64-pc-linux-gnuchecking cached host system type... ok*** C-Language compilation tools ***checking for gcc... gccchecking whether the C compiler works... yeschecking for C compiler default output file name... a.outchecking for suffix of executables...checking whether we are cross compiling... nochecking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ISO C89... none neededchecking for ranlib... ranlibchecking for strip... strip*** Host support ***checking C flags dependant on host system type... ok*** Java compilation tools ***checking for JDK location... configure: error: Java Home not defined. Rerun with --with-java=... parameter若已经安装JDK需要使用–with-java参数指定JDK路径若未安装JDK需要先安装JDK再使用–with-java参数指定JDK路径openJDK的安装位置可以在/usr/lib/jvm/目录下找到

加上–with-java参数再次执行

[root@localhost unix]# ./configure --with-java=/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64*** Current host ***checking build system type... x86_64-pc-linux-gnuchecking host system type... x86_64-pc-linux-gnuchecking cached host system type... ok*** C-Language compilation tools ***checking for gcc... gccchecking whether the C compiler works... yeschecking for C compiler default output file name... a.outchecking for suffix of executables...checking whether we are cross compiling... nochecking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ISO C89... none neededchecking for ranlib... ranlibchecking for strip... strip*** Host support ***checking C flags dependant on host system type... ok*** Java compilation tools ***checking JAVA_HOME... /usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64checking for JDK os include directory... Cannot find jni_md.h in 电脑 /usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/configure: error: You should retry --with-os-type=SUBDIR/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64是我的JDK路径需要加上–with-os-type参数指定JDK/include中的jni_md.h文件

若JDK内不存在include文件夹或jni_md.h文件,可以使用yum安装当前JDK的管理包,若存在跳过此步骤。具体操作如下

[root@localhost unix]# java -versionopenjdk version "11.0.5" 2019-10-15 LTSOpenJDK Runtime Environment 18.9 (build 11.0.5+10-LTS)OpenJDK 64-Bit Server VM 18.9 (build 11.0.5+10-LTS, mixed mode, sharing)[root@localhost unix]# yum search *jdk*Last metadata expiration check: 0:55:15 ago on Tue 24 Mar 2020 10:46:41 PM CST.=============================================================================== Name & Summary Matched: *jdk* ===============================================================================java-11-openjdk-demo.x86_64 : OpenJDK Demos 11java-1.8.0-openjdk-demo.x86_64 : 电脑 OpenJDK Demos 8java-11-openjdk-jmods.x86_64 : JMods for OpenJDK 11java-11-openjdk-src.x86_64 : OpenJDK Source Bundle 11java-11-openjdk.x86_64 : OpenJDK Runtime Environment 11java-1.8.0-openjdk-src.x86_64 : OpenJDK Source Bundle 8java-11-openjdk.x86_64 : OpenJDK Runtime Environment 11copy-jdk-configs.noarch : JDKs configuration files copiercopy-jdk-configs.noarch : JDKs configuration files copierjava-1.8.0-openjdk.x86_64 : OpenJDK Runtime Environment 8java-11-openjdk-javadoc.x86_64 : OpenJDK 11 API documentationjava-1.8.0-openjdk-javadoc.noarch : OpenJDK 8 API documentationjava-11-openjdk-devel.x86_64 : OpenJDK Development Environment 11java-1.8.0-openjdk-devel.x86_64 : OpenJDK Development Environment 8java-11-openjdk-headless.x86_64 : OpenJDK Headless Runtime Environment 11java-11-openjdk-headless.x86_64 : OpenJDK Headless Runtime Environment 11java-1.8.0-openjdk-accessibility.x86_64 : OpenJDK 8 accessibility connectorjava-1.8.电脑0-openjdk-headless.x86_64 : OpenJDK Headless Runtime Environment 8java-11-openjdk-javadoc-zip.x86_64 : OpenJDK 11 API documentation compressed in single archivejava-1.8.0-openjdk-javadoc-zip.noarch : OpenJDK 8 API documentation compressed in single archive================================================================================== Summary Matched: *jdk* ===================================================================================icedtea-web.noarch : Additional Java components for OpenJDK - Java browser plug-in and Web Start implementation[root@localhost unix]# yum install java-11-openjdk-devel.x86_64 -yLast metadata expiration check: 0:55:32 ago on Tue 24 Mar 2020 10:46:41 PM CST.Dependencies resolved.============================================================================================================================================================================================= Package Architecture Version Repository Size=============================================================================================================================================================================================Installing: java-11-openjdk-devel x86_64 1:11.0.5.10-2.el8_1 AppStream 3.3 MTransaction Summary=============================================================================================================================================================================================Install 1 PackageTotal download size: 3.3 MInstalled size: 5.3 MDownloading Packages:java-11-openjdk-devel-11.0.5.10-2.el8_1.x86_64.rpm 641 kB/s | 3.3 MB 00:05---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Total 558 kB/s | 3.3 MB 00:06Running transaction checkTransaction check succeeded.Running transaction testTransaction test succeeded.Running transaction Preparing : 1/1 Installing : java-11-openjdk-devel-1:11.0.5.10-2.el8_1.x86_64 1/1 Running scriptlet: java-11-openjdk-devel-1:11.0.5.10-2.el8_1.x86_64 1/1 Verifying : java-11-openjdk-devel-1:11.0.5.10-2.el8_1.x86_64 1/1Installed: java-11-openjdk-devel-1:11.0.5.10-2.el8_1.x86_64Complete![root@localhost unix]#

安装JDK-devel包后,重新执行

[root@localhost unix]# ./configure --with-java=/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64*** Current host ***checking build system type... x86_64-pc-linux-gnuchecking host system type... x86_64-pc-linux-gnuchecking cached host system type... ok*** C-Language compilation tools ***checking for gcc... gccchecking whether the C compiler works... yeschecking for C compiler default output file name... a.outchecking for suffix of executables...checking whether we are cross compiling... nochecking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ISO C89... none neededchecking for ranlib... ranlibchecking for strip... strip*** Host support ***checking C flags dependant on host system type... ok*** Java compilation tools ***checking JAVA_HOME... /usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64checking for JDK os include directory... linuxgcc flags addedchecking how to run the C preprocessor... gcc -Echecking for grep that handles long lines and -e... /usr/bin/grepchecking for egrep... /usr/bin/grep -Echecking for ANSI C header files... yeschecking for sys/types.h... yeschecking for sys/stat.h... yeschecking for stdlib.h... yeschecking for string.h... yeschecking for memory.h... yeschecking for strings.h... yeschecking for inttypes.h... yeschecking for stdint.h... yeschecking for unistd.h... yeschecking sys/capability.h usability... nochecking sys/capability.h presence... nochecking for sys/capability.h... noconfigure: WARNING: cannot find headers for libcap*** Writing output files ***configure: creating ./config.statusconfig.status: creating Makefileconfig.status: creating Makedefsconfig.status: creating native/Makefile*** All done ***Now you can issue "make"[root@localhost unix]#

出现All done说明可以进行编译安装了若还存在configure: error: You should retry --with-os-type=SUBDIR信息,可以使用find / -name "jni_md.h"找到路径,指定–with-os-type。出现All done可进行编译

执行make进行编译

[root@localhost unix]# make-bash: make: command not found[root@localhost unix]#command not found需要安装使用yun安装make

yum install make -y

安装make包后重新执行make

[root@localhost unix]# make(cd native; make all)make[1]: Entering directory '/root/apache-tomcat-9.0.33/bin/commons-daemon-1.2.2-native-src/unix/native'gcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"amd64\" -Wall -Wstrict-prototypes -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include/linux -c jsvc-unix.c -o jsvc-unix.ojsvc-unix.c: In function ‘run_controller’:jsvc-unix.c:1293:20: warning: assignment to ‘__sighandler_t’ {aka ‘void (*)(int)’} from incompatible pointer type ‘void (*)(int, siginfo_t *, void *)’ {aka ‘void (*)(int, struct <anonymous> *, void *)’} [-Wincompatible-pointer-types] act.sa_handler = controller; ^gcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"amd64\" -Wall -Wstrict-prototypes -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include/linux -c arguments.c -o arguments.ogcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"amd64\" -Wall -Wstrict-prototypes -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include/linux -c debug.c -o debug.ogcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"amd64\" -Wall -Wstrict-prototypes -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include/linux -c dso-dlfcn.c -o dso-dlfcn.ogcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"amd64\" -Wall -Wstrict-prototypes -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include/linux -c dso-dyld.c -o dso-dyld.ogcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"amd64\" -Wall -Wstrict-prototypes -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include/linux -c help.c -o help.ogcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"amd64\" -Wall -Wstrict-prototypes -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include/linux -c home.c -o home.ogcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"amd64\" -Wall -Wstrict-prototypes -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include/linux -c java.c -o java.ogcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"amd64\" -Wall -Wstrict-prototypes -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include/linux -c location.c -o location.ogcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"amd64\" -Wall -Wstrict-prototypes -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include/linux -c replace.c -o replace.ogcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"amd64\" -Wall -Wstrict-prototypes -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include/linux -c locks.c -o locks.ogcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"amd64\" -Wall -Wstrict-prototypes -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include -I/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/include/linux -c signals.c -o signals.oar cr libservice.a arguments.o debug.o dso-dlfcn.o dso-dyld.o help.o home.o java.o location.o replace.o locks.o signals.oranlib libservice.agcc jsvc-unix.o libservice.a -ldl -lpthread -o ../jsvcmake[1]: Leaving directory '/root/apache-tomcat-9.0.33/bin/commons-daemon-1.2.2-native-src/unix/native'[root@localhost unix]# lsconfig.log config.nice config.status configure configure.in INSTALL.txt jsvc Makedefs Makedefs.in Makefile Makefile.in man native support[root@localhost unix]#

生成一个jsvc文件,将其复制到tomcat的bin目录

[root@localhost unix]# cp jsvc ../../[root@localhost unix]# cd ../../[root@localhost bin]# lsbootstrap.jar catalina-tasks.xml commons-daemon-1.2.2-native-src configtest.bat digest.bat makebase.bat setclasspath.sh startup.bat tomcat-native.tar.gz version.batcatalina.bat ciphers.bat commons-daemon.jar configtest.sh digest.sh makebase.sh shutdown.bat startup.sh tool-wrapper.bat version.shcatalina.sh ciphers.sh commons-daemon-native.tar.gz daemon.sh jsvc setclasspath.bat shutdown.sh tomcat-juli.jar tool-wrapper.sh[root@localhost bin]#

编辑daemon.sh文件,找到如下内容

test ".$TOMCAT_USER" = . && TOMCAT_USER=tomcat# Set JAVA_HOME to working JDK or JRE# JAVA_HOME=/opt/jdk-1.6.0.22

修改TOMCAT_USER=tomcat,将tomcat修改为你所需要的用户修改# JAVA_HOME=/opt/jdk-1.6.0.22,路径为你的JDK路径修改后的结果如下

test ".$TOMCAT_USER" = . && TOMCAT_USER=tomcat# Set JAVA_HOME to working JDK or JREJAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64tomcat是我创建的用户/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64是我的JDK路径

修改tomcat的所属用户和组,并赋予daemon.sh文件可执行权限

[root@localhost bin]# cd[root@localhost ~]# chown -R tomcat:tomcat apache-tomcat-9.0.33[root@localhost ~]# chmod a+x apache-tomcat-9.0.33/bin/daemon.sh

到此所有的配置都完成了,若tomcat中项目需要读取其他文件夹,请确认该文件夹的权限是否满足你的需求

验证

使用apache-tomcat-9.0.33/bin/daemon.sh run命令启动[root@localhost ~]# apache-tomcat-9.0.33/bin/daemon.sh run25-Mar-2020 00:43:13.119 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.3325-Mar-2020 00:43:13.122 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Mar 11 2020 09:31:38 UTC25-Mar-2020 00:43:13.122 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.33.025-Mar-2020 00:43:13.123 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux25-Mar-2020 00:43:13.123 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.18.0-147.el8.x86_6425-Mar-2020 00:43:13.123 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd6425-Mar-2020 00:43:13.123 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_6425-Mar-2020 00:43:13.123 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 11.0.5+10-LTS25-Mar-2020 00:43:13.123 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation25-Mar-2020 00:43:13.123 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /root/apache-tomcat-9.0.3325-Mar-2020 00:43:13.123 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /root/apache-tomcat-9.0.3325-Mar-2020 00:43:13.158 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/root/apache-tomcat-9.0.33/conf/logging.properties25-Mar-2020 00:43:13.158 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager25-Mar-2020 00:43:13.158 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=25-Mar-2020 00:43:13.158 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/root/apache-tomcat-9.0.3325-Mar-2020 00:43:13.158 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/root/apache-tomcat-9.0.3325-Mar-2020 00:43:13.158 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/root/apache-tomcat-9.0.33/temp25-Mar-2020 00:43:13.158 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcommons.daemon.process.id=2121425-Mar-2020 00:43:13.159 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcommons.daemon.process.parent=2120825-Mar-2020 00:43:13.159 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcommons.daemon.version=1.2.225-Mar-2020 00:43:13.159 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: abort25-Mar-2020 00:43:13.159 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/lib/server:/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/lib:/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib]25-Mar-2020 00:43:13.963 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]25-Mar-2020 00:43:14.051 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [1,466] milliseconds25-Mar-2020 00:43:14.202 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]25-Mar-2020 00:43:14.202 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.33]25-Mar-2020 00:43:14.237 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/root/apache-tomcat-9.0.33/webapps/ROOT]25-Mar-2020 00:43:14.926 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/root/apache-tomcat-9.0.33/webapps/ROOT] has finished in [688] ms25-Mar-2020 00:43:14.926 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/root/apache-tomcat-9.0.33/webapps/docs]25-Mar-2020 00:43:14.979 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/root/apache-tomcat-9.0.33/webapps/docs] has finished in [53] ms25-Mar-2020 00:43:14.979 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/root/apache-tomcat-9.0.33/webapps/examples]25-Mar-2020 00:43:15.624 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/root/apache-tomcat-9.0.33/webapps/examples] has finished in [645] ms25-Mar-2020 00:43:15.625 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/root/apache-tomcat-9.0.33/webapps/host-manager]25-Mar-2020 00:43:15.738 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/root/apache-tomcat-9.0.33/webapps/host-manager] has finished in [113] ms25-Mar-2020 00:43:15.738 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/root/apache-tomcat-9.0.33/webapps/manager]25-Mar-2020 00:43:15.806 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/root/apache-tomcat-9.0.33/webapps/manager] has finished in [68] ms25-Mar-2020 00:43:15.836 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]25-Mar-2020 00:43:15.939 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [1,887] milliseconds

启动后可以在浏览器中访问到tomcat,若访问不到检查防火墙的中是否添加了tomcat端口,防火墙是否开启

动态效果图

daemon模式的基本操作

bin/daemon.sh start 启动bin/daemon.sh stop 停止bin/daemon.sh version 查看版本logs/catalina-daemon.out 查看日志
电脑