Today try to build the Java development environment under Linux, and now summarize the specific steps.
1. Installation of JDK 1.6 version
Cd/opt
mkdir Java
Execute the following command to install the JDK (first create the/opt/java directory)
TAR-XVF jdk-7u7-linux-i586.tar.gz-c/opt/java
Ln-s/OPT/JAVA/JDK1.7.0_09/OPT/JAVA/JDK Create a link
Vi/etc/frofile Setting Environment variables
Export JAVA_HOME=/OPT/JAVA/JDK
Exprot path= $JAVA _home/bin: $PATH
Equivalent to re-set Path=java_home/bin+path
When configured, use the command source/etc/profile.
Execute the java-version command to test if the JDK was installed successfully
2. Tomcat Installation version 6.0
Unzip the installation
Cd/home
Mkdir/opt/tomacat
TAR-XVF apache-tomcat-6.0.29.tar.gz-c/opt/tomacat/
Cd/opt
Ln-s/opt/tomcat/apache-tomcat-6.0.29/opt/tomacat/tomcat6.0 Create a link
Then Cd/opt/tomcat/tomcat6.0/bin
Execution./startup.sh
Then open the browser test, input http:localhost:8080, see if there is a cat page out, some words that the installation was successful.
Deploying the war in Tomcat
3. Copy the war file to the Tomcat directory \webapps\.
4. Copy the necessary jar files to the Tomcat directory \lib\.
5, modify the Tomcat directory \conf\ under the Server.xml.
<!--Tomcat Manager Context--
<context path= "/manager" docbase= "manager" debug= "0" privileged= "true"/>
Put the code in this section of the
<context path= "/manager" docbase= "manager" debug= "0" privileged= "true"/>
Copy and modify: Path= "" For the War Path, docbase= "" for the file name of your war.
6, complete, start tomcat
(Installation of Eclipse
Unzip, Gunzip eclipse-java-juno-sr2-linux-gtk.tar.gz
Installing TAR-XVF eclipse-java-juno-sr2-linux-gtk.tar-c/opt
Then go to the graphical interface into the/opt/eclipse directory, run Eclipse, you can open the Eclipse interface. Development needs to be installed)
Build Java development environment in Linux