簡單記錄一下...雖然安裝很簡單...
首先下載配置安裝 jdk
http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-download-346242.html
下載bin的安裝 (需要註冊個帳號)
32位
http://download.oracle.com/otn/java/jdk/8u25-b06/jdk-8u25-linux-i586-rpm.bin
64位
http://download.oracle.com/otn/java/jdk/8u25-b06/jdk-8u25-linux-x64-rpm.bin
chmod 777 jdk-8u25-linux-x64-rpm.bin
./jdk-8u25-linux-x64-rpm.bin
安裝完成以後...安裝目錄為 /usr/java/jdk1.8.0_25/
接下來配置一下JDK的環境..
vi /etc/profile
在最下面增加下面三行:
export JAVA_HOME=/usr/java/jdk1.8.0_25/
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
export CLASSPATH=.:/usr/java/jdk1.8.0_25/lib:/usr/java/jdk1.8.0_25/jre/lib:$CLASSPATH
使設定生效:
source /etc/profile
執行 java -version
-----------------------------------------------------------------------
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b06)
Java HotSpot(TM) Client VM (build 20.12-b01, mixed mode, sharing)
-----------------------------------------------------------------------
表示安裝成功了....
下面我們安裝 tomcat
下載最新穩定版本:
http://tomcat.apache.org/index.html
7.0.34 Released
http://apache.dataguru.cn/tomcat/tomcat-7/v7.0.34/bin/apache-tomcat-7.0.34.tar.gz
tar zxvf apache-tomcat-7.0.34.tar.gz
mv apache-tomcat-7.0.34 /opt/local/tomcat
接下來配置tomcat環境
vi /etc/profile
下面新增
export TOMCAT_HOME=/opt/local/tomcat/
使設定生效
source /etc/profile
進入tomcat 下的bin目錄 授權
cd /opt/local/tomcat/bin/
chmod 777 *.sh
啟動
/bin/bash catalina.sh start
然後使用 http://ip:8080 訪問...
出現貓貓就表示成功啦........