Install jdk mysql tomcat eclipse in ubuntu 12.04

Source: Internet
Author: User
Tags gtk

[JDK]

1. Download installation package Official Website: jdk-7-linux-i586.tar.gz

2. Create the installation directory: sudo mkdir/usr/lib/jvm

3. decompress: tar zxvf./jdk-7-linux-i586.tar.gz-C/usr/lib/jvm

4. Set the environment variable: vim ~ /. Bashrc

export JAVA_HOME=/usr/lib/jvm/jdk-7export JRE_HOME=${JAVA_HOME}/jre export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib export PATH=${JAVA_HOME}/bin:$PATH
 

5.

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-7/bin/java 300  sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-7/bin/javac 300  update-alternatives --config java

Sudo update-alternatives -- install/usr/bin/java/usr/lib/jvm/jdk-7/bin/java 300

Sudo update-alternatives -- install/usr/bin/javac/usr/lib/jvm/jdk-7/bin/javac 300

Update-alternatives -- config java

Tip:

There is only one candidate item in the java link group:/usr/lib/jvm/jdk1.7.0 _ 17/bin/java. No configuration is required.

Because I have not installed opensdk on ubuntu 12.04 (it should be none of the 12.04 desktop version ). If yes, it is displayed here. Select the required option.

6.

1 java -version

Return Value:

java version "1.7.0_17"Java(TM) SE Runtime Environment (build 1.7.0_17-b02)Java HotSpot(TM) Server VM (build 23.7-b01, mixed mode)

Confirm that the installation is successful.

[Tomcat]

1. Download Tomcat7 from the official website and decompress it. The decompression statement is tar zxvf/download/... tomcat7-C/opt/tomcat7.

For issues that may occur when eclipse introduces tomcat later, I listed them one by one in my blog.

2. Input http: // localhost: 8080 in the browser.

Note: Start and Stop scripts in/etc/init. d/tomcat7
The program is deployed in/var/lib/tomcat7/webapps.


[Mysql]

1.

1 sudo apt-get install mysql-server

Note: You will be prompted to enter the root user password.


[Eclipse]

1. Download, like eclipse-jee-juno-SR2-linux-gtk.tar.gz

2. decompress the package, such as my

1 tar /Download/eclipse-jee-juno-SR2-linux-gtk.tar.gz -C /usr/local/eclipse///eclipseIs a folder created by myself

3. Add the utity project. Vim/usr/share/application/eclipse. desktop // The suffix is desktop.

[Desktop Entry]Type=ApplicationName=EclipseComment=Eclipse Integrated Development EnvironmentIcon=/usr/lib/eclipse/icon.xpmExec=/usr/lib/eclipse/eclipseTerminal=falseCategories=Development;IDE;Java;

You can find eclipse in dash.

Related Article

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.