感谢支持
我们一直在努力

Linux RHEL5.4 64系统下的JDK1.6和Tomcat的安装

RedHat Linux AS4.6 (x86-64)


  ftp://211.68.71.80/pub/os-images/Redhat/RHEL4u6/RH EL4.6-x86_64-AS-DVD.iso
(for Linux_x86_64)


  http://apache.etoak.com/tomcat/tomcat-6/v6.0.18/bi n/apache-tomcat-6.0.18.tar.gz


  http://java.sun.com/javase/downloads/index.jsp


  3、
  # mkdir /opt/software


  4、 jdk-6u13-linux-x64.bin
  apache-tomcat-6.0.18.tar.gz


 


  1、JDK


  #cd /opt/software


  #chmod +x jdk-6u13-linux-x64.bin


  #cd /usr/local


  #/opt/software/ jdk-6u13-linux-x64.bin


  



Press Enter to continue……



 /usr/local目jdk1.6.0_13
JAVA_HOM


  # vi /etc/profile


  export JAVA_HOME=/usr/local/jdk6


  export PATH=$PATH:$JAVA_HOME/bin:$PATH


  export CLASSPATH=.:$JAVA_HOME/lib.dt.jar:$JAVA_HOME/lib/t ools.jar


  export JRE_HOME=$JAVA_HOME/jre


  4、Tomcat,apache-tomcat-6.0.18.tar.gz   /usr/local


  # cd /usr/local


  # cp /opt/software/apache-tomcat-6.0.18.tar.gz /usr/local


  # tar zvxf apache-tomcat-6.0.18.tar.gz


  # rm apache-tomcat-6.0.18.tar.gz


  5、


  # ln -sf /usr/local/jdk1.6.0_13 /usr/local/jdk6


  # ln -sf /usr/local/apache-tomcat-6.0.18 /usr/local/tomcat


  # ln -sf /usr/local/tomcat/bin/startup.sh /usr/bin/tomcat-up


  # ln -sf /usr/local/tomcat/bin/shutdown.sh /usr/bin/tomcat-down


  6、CATALINA_HOME,/etc/profile


  # vi /etc/profile


  export CATALINA_HOME=/usr/local/tomcat


  7、


  # cd ~


  # vi .bash_profile


  # .bash_profile


  # Get the aliases and functions


  if [ -f ~/.bashrc ]; then


  . ~/.bashrc


  fi


  # User specific environment and startup programs


  PATH=$PATH:$HOME/bin


  JAVA_HOME=/usr/local/jdk6


  CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib


  TOMCAT_HOME=/usr/local/tomcat


  CATALINA_BASE=$TOMCAT_HOME


  CATALINA_HOME=$TOMCAT_HOME


  PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOME /bin


  PATH=$PATH:$HOME/bin


  BASH_ENV=$HOME/.bashrc


  USERNAME=”root”


  export USERNAME BASH_ENV JAVA_HOME CLASSPATH CATALINA_BASE CATALINA_HOME


PATH
  # init 6 /reboot


  9、shell


  # java -version


  


  10、Tomcat


  # tomcat-up run&


  # tomcat-down


  11、tomcat :http://ip:8080 tomcat


  三、Tomcat


  1、/usr/local/tomcat/bin/catalina.sh   /etc/rc.d/init.d/tomcat


  #cp /usr/local/tomcat/bin/catalina.sh /etc/rc.d/init.d/tomcat


  2、/etc/rc.d/init.d/tomcat


  #vi /etc/rc.d/init.d/tomcat


  


  # chkconfig:2345 63 37


  #description:tomcat server init script


 #CATALINA_HOME


  CATALINA_HOME=/usr/local/tomcat


  JRE_HOME=/usr/local/jdk6/jre


  3、tomcatService


  # chkconfig –add tomcat


  4、tomcatservice


  #chkconfig –list tomcat


  5、tomcat tomcat
  # service tomcat start


  # ps -e | grep java


  


  5925 pts/0 00:00:03 java

赞(0) 打赏
转载请注明出处:服务器评测 » Linux RHEL5.4 64系统下的JDK1.6和Tomcat的安装
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏