四、部署 tomcat
1、将apache-tomcat-6.0.20.tar.gz上传到服务器上
2、解压文件,出现目录 apache-tomcat-6.0.20
- [sgmm@lnx_test ~]$ tar zxvf apache-tomcat-6.0.20.tar.gz
- [sgmm@lnx_test ~]$ vi .bash_profile
- export CATALINA_BASE=/home/sgmm/apache-tomcat-6.0.20
- export CATALINA_HOME=/home/sgmm/apache-tomcat-6.0.20
- # .bash_profile
- # Get the aliases and functions
- if [ -f ~/.bashrc ]; then
- . ~/.bashrc
- fi
- # User specific environment and startup programs
- JAVA_HOME=/home/sgmm/jdk1.6.0_13
- CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib
- PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin
- export PATH CLASSPATH JAVA_HOME
- export CATALINA_BASE=/home/sgmm/apache-tomcat-6.0.20
- export CATALINA_HOME=/home/sgmm/apache-tomcat-6.0.20
- [sgmm@lnx_test ~]$ source ~/.bash_profile
- [sgmm@lnx_test bin]$ ./startup.sh
- Using CATALINA_BASE: /home/sgmm/apache-tomcat-6.0.20
- Using CATALINA_HOME: /home/sgmm/apache-tomcat-6.0.20
- Using CATALINA_TMPDIR: /home/sgmm/apache-tomcat-6.0.20/temp
- Using JRE_HOME: /home/sgmm/jdk1.6.0_13
6、使用 ps -ef|grep tomcat 可以查看tomcat进程,并使用 kill -9 进程号杀掉进程