JDK+Tomcat环境配置

2015-12-04  本文已影响0人  chengcheng

1.JDK安装配置:


将jdk-7u60-linux-x64.tar.gz的安装包上传至/usr/local/目录

1)#chmod 755 jdk-7u60-linux-x64.tar.gz

2)# tarzxvfjdk-7u60-linux-x64.tar.gz//解压

3)# mvjdk-7u60-linux-x64jdk

4)#vim/etc/profile

exportJAVA_HOME=/usr/java/jdk

exportJAVA_BIN=/usr/java/jdk/bin

exportPATH=$PATH:$JAVA_HOME/bin

exportCLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

export JAVA_HOMEJAVA_BIN PATH CLASSPATH

5)#source/etc/profile//使配置生效

测试:

#java –version

出现下面内容就OK了。

ava version"1.7.0_60"

Java(TM) SERuntime Environment (build 1.7.0_60-b19)

Java HotSpot(TM)64-Bit Server VM (build 24.60-b09, mixed mode)



2.Tomcat安装


1)#mkdir /usr/local/apache

2)上传apache-tomcat-8.0.21.tar.gz到mkdir /usr/local/apache

3)#tar zxvfapache-tomcat-8.0.21.tar.gz–C/usr/local/apache

4)#chmod+x/usr/local/apache/apache-tomcat-8.0.21/bin/*.sh

5)vim /usr/local/apache/apache-tomcat-8.0.21/bin/catalina.sh

加入JAVA_OPTS="-Xms1024m–Xmx3072m"//内存限制

启动tomcat

6)# /usr/local/apache/apache-tomcat-8.0.21/bin/catalina.shstart


上一篇下一篇

猜你喜欢

热点阅读