这边我们把一台服务器的tomcat迁移到另一台上(打包)
先安装一下jdk
[root@ls ~]# java -version
openjdk version “1.8.0_382”
OpenJDK Runtime Environment (build 1.8.0_382-b05)
OpenJDK 64-Bit Server VM (build 25.382-b05, mixed mode)
java -version
openjdk version “1.8.0_382”
OpenJDK Runtime Environment (build 1.8.0_382-b05)
OpenJDK 64-Bit Server VM (build 25.382-b05, mixed mode)
[root@VM-0-16-centos tomcat]# wget https://dlcdn.apache.org/tomcat/tomcat-8/v8.5.71/bin/apache-tomcat-8.5.71.tar.gz
–2023-10-04 23:18:33– https://dlcdn.apache.org/tomcat/tomcat-8/v8.5.71/bin/apache-tomcat-8.5.71.tar.gz
Resolving dlcdn.apache.org (dlcdn.apache.org)… 151.101.2.132, 2a04:4e42::644
Connecting to dlcdn.apache.org (dlcdn.apache.org)|151.101.2.132|:443… connected.
ERROR: cannot verify dlcdn.apache.org’s certificate, issued by ‘/C=US/O=Let’s Encrypt/CN=R3’:
Issued certificate has expired.
To connect to dlcdn.apache.org insecurely, use `–no-check-certificate’.
报错证书过期(yum install -y ca-certificates)
这边换一个
wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.80/bin/apache-tomcat-9.0.80.tar.gz
tar -xzvf apache-tomcat-9.0.80.tar.gz
pwd
/usr/tomcat/apache-tomcat-9.0.80
vi /etc/profile
source /etc/profile
/usr/tomcat/apache-tomcat-9.0.80
vi server.xml
<Connector port=”8888″ protocol=”HTTP/1.1″ connectionTimeout=”20000″ redirectPort=”8443″ /
启动:sh startup.sh 或者 ./startup.sh
停止:sh shutdown.sh 或者 ./shutdown.sh
查看是否启动成功:ps -ef|grep tomcat