linux下安装jdktomcat

Posted 拉努斯石

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux下安装jdktomcat相关的知识,希望对你有一定的参考价值。

1、下载jdk、tomcat并上传到服务器
2、安装jdk-7u79-linux-x64.rpm
[[email protected] ~]# cd /testdata/huangwenjiao/
[[email protected] huangwenjiao]# rpm -ivh jdk-7u79-linux-x64.rpm
Preparing... ########################################### [100%]
package jdk-2000:1.7.0_79-fcs.x86_64 is already installed
3、配置环境变量
向前翻页:ctrl+F
向后翻页:ctrl+B
JAVA_HOME=/testdata/huangwenjiao/jdk1.7.0_03
JRE_HOME=/testdata/huangwenjiao/jdk1.7.0_03/jre
JAVA_BIN=/testdata/huangwenjiao/jdk1.7.0_03/bin
#export JAVA_BIN=$JAVA_HOME$/bin
PATH=$PATH:$JAVA_BIN
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME JRE_HOME JAVA_BIN PATH CLASSPAT

CATALINA_HOME=/usr/local/apache-tomcat-7.0.54/

保存退出
[[email protected] etc]# source /etc/profile
查看环境变量是否配置成功
[[email protected] etc]# java -version
4、解压安装apache-tomcat-7.0.54.tar.gz
解压:[[email protected] huangwenjiao]# tar -xzf apache-tomcat-7.0.54.tar.gz
移动到/usr/local/:[[email protected] huangwenjiao]# mv apache-tomcat-7.0.54 /usr/local/
[[email protected] local]# ln -s /usr/local/apache-tomcat-7.0.54/ /usr/local/tomcat/
[[email protected] huangwenjiao]# cd /usr/local/
[[email protected] local]# cd tomcat/bin/
[[email protected] bin]# vim catalina.sh
最后一行添加:TALINA_HOME=/usr/local/apache-tomcat-7.0.54/
在85行添加:
JAVA_OPTS="-server -Xms800m -Xmx800m -XX:PermSize=64M -XX:MaxNewSize=256m -XX:MaxPermSize=128m -Djava.awt.headless=true "
[[email protected] ~]# cd /usr/local/tomcat/bin/
[[email protected] bin]# ./startup.sh
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /testdata/huangwenjiao/jdk1.7.0_03/jre
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Tomcat started.





































以上是关于linux下安装jdktomcat的主要内容,如果未能解决你的问题,请参考以下文章

在linux环境下安装JDKtomcat和mysq

linux系统之JDKTomcat

centos 下安装jdktomcat 以及tomcat无法从外部访问的解决办法

CentOS7下安装JDKTomcat及Maven

JDKTomcat安装(CentOS 7)

centos7安装配置jdktomcat