安装JDK: 下载JDK(jdk-6u35-linux-i586-rpm.bin): http://www.oracle.com/technetwork/java/javase/downloads/jdk6u35-downloads-1836443.html 修改权限: [root@sony619 Desktop]# chmod x jdk-6u35-linux-i586-rpm.bin 安装: [root@sony619 Desktop]# ./jdk-6u35-linux-i586-rpm.bin 检查是否安装成功: [root@sony619 Desktop]# /usr/java/jdk1.7.0_07/bin/java -version java version "1.7.0_07" Java(TM) SE Runtime Environment (build 1.7.0_07-b10) Java HotSpot(TM) Client VM (build 23.3-b01, mixed mode, sharing) 修改环境变量: export JAVA_HOME=/usr/java export PATH=$PATH:$JAVA_HOME/bin 安装tomcat: 下载tomcat(二进制的): http://tomcat.apache.org/download-70.cgi 解压: [root@sony619 Desktop]# unzip apache-tomcat-7.0.29.zip 把它放到/usr/local目录下: [root@sony619 Desktop]# mv apache-tomcat-7.0.29 /usr/local/ 配置环境: [root@sony619 Desktop]# vi /usr/local/apache-tomcat-7.0.29/bin/catalina.sh export JAVA_HOME=/usr/java/jdk1.7.0_07/ export CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:. export CATALINA_HOME=/usr/local/apache-tomcat-7.0.29/ export PATH=$JAVA_HOME/bin:$PATH 启动: [root@sony619 /]# /usr/local/apache-tomcat-7.0.29/bin/startup.sh 在浏览器中输入: http://127.0.0.1:8080/ 若出现If you're seeing this, you've successfully installed Tomcat. Congratulations! 那么表明已经安装好tomcat了! The Apache Tomcat Connector 下载: http://tomcat.apache.org/connectors-doc/ 解压和安装: [root@sony619 Desktop]# tar zxvf tomcat-connectors-1.2.37-src.tar.gz [root@sony619 Desktop]# cd tomcat-connectors-1.2.37-src/native/ [root@sony619 native]# chmod 755 buildconf.sh [root@sony619 native]#./buildconf.sh 如果提示: buildconf: checking installation... buildconf: autoconf not found. You need autoconf version 2.59 or newer installed to build mod_jk from SVN. 解决: [root@sony619 native]# yum install autoconf 执行[root@sony619 native]#./buildconf.sh 再次提示: buildconf: libtool not found. You need libtool version 1.4 or newer installed to build mod_jk from SVN. 解决: [root@sony619 native]#./yum install libtool 配置环境: [root@sony619 native]# ./configure --with-apxs=/usr/sbin/apxs #make #make install 经过一番努力,终于安装好了! (责任编辑:IT) |