軟件下載:
--------------------------------
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