系统相关
首页 > 系统相关> > Centos7 下载安装tomcat8

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

标签:opt,https,tomcat,tar,server1,Centos7,下载安装,HOME,tomcat8
来源: https://www.cnblogs.com/yunweizhijun/p/15391204.html