Centos7 下载安装tomcat8

列表:
清华源:https://mirrors.tuna.tsinghua.edu.cn
腾讯源:https://mirrors.cloud.tencent.com
华为源:https://mirrors.huaweicloud.com
阿里源:https://developer.aliyun.com/mirror

下载安装步骤
# 下载 openjdk 8
[root@server1 ~]# wget https://mirrors.huaweicloud.com/openjdk/java-jse-ri/jdk8u40/openjdk-8u40-b25-linux-x64-10_feb_2015.tar.gz
# 下载 tomcat 8
[root@server1 ~]# wget https://mirrors.huaweicloud.com/apache/tomcat/tomcat-8/v8.5.56/bin/apache-tomcat-8.5.56.tar.gz
[root@server1 ~]# tar -xf apache-tomcat-8.5.56.tar.gz
[root@server1 ~]# mv apache-tomcat-8.5.56 /opt/tomcat
[root@server1 ~]# tar -xf openjdk-8u40-b25-linux-x64-10_feb_2015.tar.gz
[root@server1 ~]# mv openjdk-8u40-b25-linux-x64-10_feb_2015.tar.gz
# 设置环境产量
cat <<EOF >> /etc/profile
JAVA_HOME=/opt/java
PATH=\$JAVA_HOME/bin:\$JAVA_HOME/jre/bin:\$PATH
CLASSPATH=.:\$JAVA_HOME/lib:\$JAVA_HOME/jre/lib:\$JAVA_HOME/lib/tools.jar
TOMCAT_HOME=/opt/tomcat
EOF
# /opt/tomcat /opt/jdk
启动关闭 tomcat
# 开启
/opt/tomcat/bin/startup.sh
# 关闭
/opt/tomcat/bin/shutdown.sh
# 默认访问
curl localhost:8080
posted @ 2021-10-10 22:24  运维之爪  阅读(542)  评论(0编辑  收藏  举报