标签:str msi x86 less jdk1.7 bootstrap serve usr ack
1、下载jdk、tomcat并上传到服务器
2、安装jdk-7u79-linux-x64.rpm
[root@iZ94bjrr7isZ ~]# cd /testdata/huangwenjiao/
[root@iZ94bjrr7isZ 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/
保存退出
[root@iZ94bjrr7isZ etc]# source /etc/profile
查看环境变量是否配置成功
[root@iZ94bjrr7isZ etc]# java -version
4、解压安装apache-tomcat-7.0.54.tar.gz
解压:[root@iZ94bjrr7isZ huangwenjiao]# tar -xzf apache-tomcat-7.0.54.tar.gz
移动到/usr/local/:[root@iZ94bjrr7isZ huangwenjiao]# mv apache-tomcat-7.0.54 /usr/local/
[root@iZ94bjrr7isZ local]# ln -s /usr/local/apache-tomcat-7.0.54/ /usr/local/tomcat/
[root@iZ94bjrr7isZ huangwenjiao]# cd /usr/local/
[root@iZ94bjrr7isZ local]# cd tomcat/bin/
[root@iZ94bjrr7isZ 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 "
[root@iZ94bjrr7isZ ~]# cd /usr/local/tomcat/bin/
[root@iZ94bjrr7isZ 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.
标签:str msi x86 less jdk1.7 bootstrap serve usr ack
原文地址:https://www.cnblogs.com/LinxiHuang/p/9245881.html