Build a Linux + aphche + Java + MySQL Environment
1. Download JDK
Jdk-7u17-linux-i586.gz
2. Install JDK
Installation Directory:/usr/Java/jdk1_7
3. Configure the environment
Gedit/root/. bash_profile
------------------------------------------------------------------------
Export java_home =/usr/Java/jdk1_7
Export classpath =.: $ java_home/lib/dt. jar: $ java_home/lib/tools. Jar
Export Path = $ path: $ java_home/bin
------------------------------------------------------------------------
Make the configuration take effect: Source/root/. bash_profile
Check whether it is successful: Java-version
Ii. Install eclise
1. Download eclipse-jee-juno-sr2-linux-gtk.tar.gz
2. Installation
#! /Bin/bash
#
# Execute eclipse 2.1.1
#
Export java_home =/usr/Java/xxx
Export classpath =/usr/Java/XXX/lib
/Opt/Eclipse/eclipse-VM/usr/Java/XXX/bin/Java-data ~ /Workspace &
#-VM parameters are used to specify which JVM is used to execute eclipse,
# The-date parameter is used to specify the eclipse data directory. Specify the user root directory (~) Under the workspace directory
3. test:
Package com. Hello;
Public class Hello {
/**
* @ Param ARGs
*/
Public static void main (string [] ARGs ){
// Todo auto-generated method stub
System. Out. Print ("Hello kllmctrl! ");
}
}
3. Tomcat uses eclipse's built-in servers
4. Install MySQL
Sudo apt-Get install mysql-Server
Run: mysql-uroot-P