linux tomcat jdk mysql 免安裝 綠色版整合

jdk 下載解壓:
1.到http://www.oracle.com/technetwork/java/javase/downloads/index.html下載JDK 6 的linux版本jdk-6u22-linux-i586(自解壓文件) 


2.執行: ./jdk-6u14-linux-i586.bin 進行解壓,解壓後的文件目錄名(示例)jdk1.6.0_22
tomcat下載解壓
1.到http://tomcat.apache.org/下載tomcat的linux版本6.0.20,文件名(示例):apache-tomcat-6.0.20.tar.gz 


2.到下載的文件所在的目錄下,執行:tar -zxvf apache-tomcat-6.0.29.tar.gz,解壓後的文件目錄名爲apache-tomcat-6.0.29 


3.將解壓好的文件夾拷貝到/usr/share/目錄下,示例:mv apache-tomcat-6.0.29 /usr/share 


4: 將jdk移動至/usr/share 或者tomcat目錄下在此移動到tomcat目錄下,爲了下次不需要在作更改
mv jdk1.6.0_22 /usr/share/apache-tomcat-6.0.29


5:更改tomcat/bin目錄下的startup.sh和shutdown.sh文件 加入紅色的2句話,jdk的路徑根據你實際的jdk路徑來配置
vim startup.sh


#!/bin/sh


# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


# -----------------------------------------------------------------------------
# Start Script for the CATALINA Server
#
# $Id: startup.sh 562770 2007-08-04 22:13:58Z markt $
# -----------------------------------------------------------------------------
export JAVA_HOME=/usr/share/apache-tomcat-6.0.29/jdk1.6.0_22
export JRE_HOME=/usr/share/apache-tomcat-6.0.29/jdk1.6.0_22/jre 
# Better OS/400 detection: see Bugzilla 31132
os400=false
darwin=false
case "`uname`" in
CYGWIN*) cygwin=true;;
OS400*) os400=true;;
Darwin*) darwin=true;;
esac


# resolve links - $0 may be a softlink
PRG="$0"


while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`/"$link"
fi
done
21,1         頂端


6:.進入/usr/share/apache-tomcat-6.0.29/bin目錄,執行:./startup.sh 看啓動是否正常 ,正常啓動出現如下信息
Using CATALINA_BASE:   /usr/share/apache-tomcat-6.0.29
Using CATALINA_HOME:   /usr/share/apache-tomcat-6.0.29
Using CATALINA_TMPDIR: /usr/share/apache-tomcat-6.0.29/temp
Using JRE_HOME:        /usr/share/apache-tomcat-6.0.29/jdk1.6.0_22/jre
Using CLASSPATH:       /usr/share/apache-tomcat-6.0.29/bin/bootstrap.jar


7.在瀏覽器內訪問:http://localhost:8080/看能否出現tomcat的默認頁面(tomcat默認配置端口是8080) 


mysql 下載加壓配置:
ftp://gd.tuwien.ac.at/db/mysql/Downloads/MySQL-5.1/mysql-5.1.51-linux-i686-glibc23.tar.gz


修改Mysql編碼


default-character-set=utf8 


到mysql/bin目錄下
#mysql //運行mysql 命令
如果沒有啓動,或者出現 Can't connect to local MySQL server through socket 'tmp/mysql.sock'
解決方法: #cd /mysql/support-files //進入Mysql的 support-files目錄
#./mysql.server start //啓動即可。該操作即可生成/tmp/mysql.sock
發佈了40 篇原創文章 · 獲贊 8 · 訪問量 12萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章