export LANG JAVA_HOME PATH CLASSPATH TOMCAT_HOME CATALINA_HOME CATALINA_OPTS
退出用户并重新登陆,使用户环境生效。
2.通过执行javac命令检验j2sdk环境正确。
[tomcat@rhel53 ~]$ javac
Usage: javac
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are used
-classpath Specify where to find user class files
-sourcepath Specify where to find input source files
-bootclasspath Override location of bootstrap class files
-extdirs Override location of installed extensions
-d Specify where to place generated class files
-encoding Specify character encoding used by source files
-source Provide source compatibility with specified release
-target Generate class files for specific VM version
-help Print a synopsis of standard options
2,安装配置jakarta-tomcat-5.0.28 1)将jakarta-tomcat-5.0.28.zip传到tomcat用户目录,使用unzip解包,生成jakarta-tomcat-5.0.28为名的目录。 tomcat$ unzip jakarta-tomcat-5.0.28.zip 为方便用于使用,重新在jakarta-tomcat-5.0.28目录下打个包,拷回/opt/tomcat解包,这样jakarta-tomcat-5.0.28就以/opt/tomcat为根目录。 tomcat$ cd ~/jakarta-tomcat-5.0.28 && tar -cvf ../tomcat.tar * && cd ~/ && tar -xvf tomcat.tar 2)编辑${TOMCAT_HOME}/conf/server.xml文件,
[tomcat@rhel53 ROOT]$ startup.sh
Using CATALINA_BASE: /opt/tomcat
Using CATALINA_HOME: /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JAVA_HOME: /usr/java/j2sdk1.4.2_18