提示:所有涉及到java应用都需要安装
源码安装方式
tar xf jdk-8u60-linux-x64.tar.gz -C /application/
ln -s /application/jdk1.8.0_60 /application/jdk
配置环境变量
sed -i.ori ‘$a export JAVA_HOME=/application/jdk\nexport PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH\nexport CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$JAVA_HOME/lib/tools.jar‘ /etc/profile
source /etc/profile
检查
java -version
或者手动添加环境变量
export JAVA_HOME=/application/jdk
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
export CLASSPATH=.$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$JAVA_HOME/lib/tools.jar
Tomcat安装
tar xf apache-tomcat-8.0.27.tar.gz -C /application/
ln -s /application/apache-tomcat-8.0.27 /application/tomcat
echo ‘export TOMCAT_HOME=/application/tomcat‘>>/etc/profile
source /etc/profile
chown -R root.root /application/jdk/ /application/tomcat/
/application/tomcat/bin/version.sh
Tomcat目录结构说明
[[email protected] tools]# cd /application/tomcat/
[[email protected] tomcat]# tree -L 1
.
├── bin # startup.sh shutdown.sh catalina.sh(核心)
├── conf # server.xml(主配置文件) tomcat-users.xml
├── lib
├── LICENSE
├── logs # 日志目录 catalina.out tomcat实时日志
├── NOTICE
├── RELEASE-NOTES
├── RUNNING.txt
├── temp
├── webapps # 站点目录
└── work
7 directories, 4 files
原文地址:https://blog.51cto.com/12083623/2374740
时间: 2024-10-07 06:10:06