程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> MYSQL數據庫 >> 關於MYSQL數據庫 >> tomcat+mysql安裝文檔

tomcat+mysql安裝文檔

編輯:關於MYSQL數據庫

軟件下載:
--------------------------------

1、jdk-6u20-Linux-i586-rpm.bin
http://www.sun.com
2、MySQL-5.0.56.tar.gz
http://www.MySQL.com
3、apache-tomcat-6.0.28.tar.gz
http://www.apache.org
4、MySQL-connector-Java-5.1.13.tar.gz
http://www.MySQL.com

========================================== ------------------------------
1、jdk-6u20-Linux-i586-rpm.bin 先卸載以前的Java版本
rpm -qa|grep Java
yum remove Java

#cp jdk-6u20-Linux-i586-rpm.bin /usr/local
#chmod +x jdk-6u20-Linux-i586-rpm.bin
#./jdk-6u20-Linux-i586-rpm.bin
#ln -s /usr/java/jdk1.6.0_20/ /usr/local/Java
#vi /etc/profile
在最下面添

export JAVA_HOME=/usr/Java/jdk1.6.0_20
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/dt.jar:$Java_HOME/lib/tools.jar
export PATH=$PATH:$Java_HOME/bin

#source /etc/profile 2、Tomcat #tar zxvf apache-tomcat-6.0.28.tar.gz
#cp apache-tomcat-6.0.28 /usr/local/
#cd usr/local
#mv apache-tomcat-6.0.28 tomcat
#cd tomcat
#chmod +x bin/*
#bin/startup.sh
#vi /etc/profile
最下面加入:

export CATALINA_HOME=/usr/local/tomcat

開機自啟動 # vi /etc/rc.d/rc.local 添加:
export JAVA_HOME=/usr/Java/jdk1.6.0_20
export PATH=$Java_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/dt.jar:$Java_HOME/lib/tools.jar
/usr/local/tomcat/bin/startup.sh

------------------------------
3、mysql-5.0.56.tar.gz # groupadd MySQL
# useradd -g mysql MySQL
# tar zvxf MySQL-5.0.56.tar.gz
# ./configure --prefix=/usr/local/MySQL --with-extra-charsets=all
# make
# make install
# cp support-files/my-medium.cnf /etc/my.cnf
# cp support-files/mysql.server /etc/rc.d/init.d/MySQLd
# cd /usr/local/MySQL
# bin/mysql_install_db --user=MySQL
# chown -R root .
# chown -R MySQL var
# chgrp -R MySQL .
# /usr/local/mysql/bin/mysqld_safe --user=MySQL &
# /usr/local/mysql/bin/mysqladmin -uroot passWord xxxxx //為root訪問設置密碼 # vi /etc/rc.d/rc.local    //添加到系統自啟動 /etc/rc.d/init.d/MySQLd start 保存並退出

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION; --------------------------------
JDBC的安裝 #tar -zxvf MySQL-connector-Java-5.1.13.tar.gz
#cd cd MySQL-connector-Java-5.1.13
# cp MySQL-connector-Java-5.1.13-bin.jar /usr/local/tomcat/webaPPS/ROOT/WEB-INF/lib/

#vi /etc/profile
最下面加入

export CLASSPATH=$Java_HOME/lib:$JRE/lib:/usr/local/tomcat/webaPPS/ROOT/WEB-INF/lib/MySQL-

connector-Java-5.1.13-bin.jar

#source /etc/profile

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved