Build a Linux + aphche + Java + MySQL Environment

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.