JDK配置、Tomcat配置
JDK配置Tomcat配置
[root@eegooserver3 ~]# cd /opt/
[root@eegooserver3 opt]# tar zxf apache-tomcat-6.0.35.tar.gz
[root@eegooserver3 opt]# chmod +x jdk-6u33-linux-x64.bin
[root@eegooserver3 opt]# ./jdk-6u33-linux-x64.bin
[root@eegooserver3 opt]# vi /etc/profile
在最后加上
# set java environment
export JAVA_HOME=/usr/local/jdk
export JRE_HOME=$JAVA_HOME/jre
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
让/etc/profile文件修改后立即生效
#source /etc/profile
[root@eegooserver3 opt]# . /etc/profile
[root@eegooserver3 opt]# echo $JAVA_HOME
/usr/local/jdk
[root@eegooserver3 opt]# echo $JRE_HOME
/usr/local/jdk/jre
[root@eegooserver3 opt]# echo $PATH
/usr/local/jdk/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
[root@eegooserver3 opt]# echo $CLASSPATH
.:/usr/local/jdk/lib/dt.jar:/usr/local/jdk/lib/tools.jar
[root@eegooserver3 opt]# java
[root@eegooserver3 opt]# javac
[root@eegooserver3 ~]# /opt/apache-tomcat-6.0.35/bin/startup.sh
Using CATALINA_BASE: /opt/apache-tomcat-6.0.35
Using CATALINA_HOME: /opt/apache-tomcat-6.0.35
Using CATALINA_TMPDIR: /opt/apache-tomcat-6.0.35/temp
Using JRE_HOME: /usr/local/jdk/jre
Using CLASSPATH: /opt/apache-tomcat-6.0.35/bin/bootstrap.jar
[root@eegooserver3 ~]# ps -ef|grep tomcat
root 1727 1 25 00:07 pts/0 00:00:04 /usr/local/jdk/jre/bin/java -Djava.util.logging.config.file=/opt/apache-tomcat-6.0.35/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/apache-tomcat-6.0.35/endorsed -classpath /opt/apache-tomcat-6.0.35/bin/bootstrap.jar -Dcatalina.base=/opt/apache-tomcat-6.0.35 -Dcatalina.home=/opt/apache-tomcat-6.0.35 -Djava.io.tmpdir=/opt/apache-tomcat-6.0.35/temp org.apache.catalina.startup.Bootstrap start
root 1754 1704 0 00:08 pts/0 00:00:00 grep tomcat
[root@eegooserver3 ~]# tail -f /opt/apache-tomcat-6.0.35/logs/catalina.out
Aug 28, 2012 12:07:56 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory manager
Aug 28, 2012 12:07:56 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Aug 28, 2012 12:07:56 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Aug 28, 2012 12:07:56 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/17 config=null
Aug 28, 2012 12:07:56 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 777 ms
^C
[root@eegooserver3 ~]# mkdir /opt/apache-tomcat-web
[root@eegooserver3 ~]# mkdir /opt/apache-tomcat-admin
[root@eegooserver3 ~]# cp -r /opt/apache-tomcat-6.0.35/* /opt/apache-tomcat-web/
[root@eegooserver3 ~]# cp -r /opt/apache-tomcat-6.0.35/* /opt/apache-tomcat-admin/
[root@eegooserver3 ~]#
[root@eegooserver3 ~]# chkconfig --list
[root@eegooserver3 ~]# /opt/apache-tomcat-web/bin/startup.sh
[root@eegooserver3 ~]# /opt/apache-tomcat-admin/bin/startup.sh
[root@eegooserver3 ~]# tail -f /opt/apache-tomcat-web/logs/catalina.out
[root@eegooserver3 ~]# tail -f /opt/apache-tomcat-admin/logs/catalina.out
[root@eegooserver3 ~]# netstat -atln
[root@eegooserver3 ~]#