Linux Configuration Java Development environment

Source: Internet
Author: User

First, download the JDK
Java-version See if there is a version of jdk:jdk-java7u60-linux-x64.tar.gz installed for the JDK downloadSecond, decompression
CP JDK-JAVA7U60-LINUX-X64.TAR.GZ/OPT/SOFTWARE/JAVACD/OPT/SOFTWARE/JAVATAR-ZXVF jdk-java7u60-linux-x64.tar.gzThird, profile configuration
Vim/etc/profile

1) Add Java_home path:

Export java_home=/xxx/xxxx/jdk1.7.0_60

This directory is the directory you extracted after the JDK, such as small, the extracted directory is:

/opt/software/java/jdk1.7.0_60

So the path to the small series is:

Export java_home=/opt/software/java/jdk_1.7.0_60

2) Add JRE path

The small part is:

Export JRE_HOME=/OPT/SOFTWARE/JAVA/JDK_1.7.0_60/JRE

3) Configure Classpath Path

Export classpath=.: $CLASSPATH: $JAVA _home/lib: $JRE _home/lib

4) Configure path Path

Export path= $PATH: $JAVA _home/bin: $JRE _home/bin

Four, let the configuration take effect, detect
Input command: source/etc/profilejava-versionv. Installation of eclips
1, download the corresponding version of Eclipse2, unzip eclipse3, to extract files to execute sudo./eclipse 4, creating Eclipse shortcuts: sudo gedit/usr/share/applications/ Eclipse.desktop

Paste and save the following:

[Desktop Entry]
Name=eclipse 4
Type=application
Exec=/opt/eclipse/eclipse
Terminal=false
icon=/opt/eclipse/icon.xpm
comment=integrated Development environment
Nodisplay=false
Categories=development;ide;
Name[en]=eclipse

vi. installation of MySQL
Apt-get Install mysql-server You need us to manually enter the user name and password for the database

After the installation is complete, we need to modify the configuration for the database, here we only need to make a modification of the binding IP, so that convenient outside access.

# VI/ETC/MYSQL/MY.CNF

Restart the MySQL service after the modification is complete

# restart MySQL

Open "Terminal Window", enter "sudo apt-get install Libapache2-mod-auth-mysql"----the installation is successful, Apache will support MySQL after installing this module.

Open "Terminal Window", enter "sudo apt-get install Php5-mysql"----the installation is successful, PHP will support MySQL after installing this module.Vii. installation of Tomcat

Download the latest Tomcat on the official website:

http://tomcat.apache.org/download-80.cgi

On Ubuntu, we download tar.gz. Decompression: TAR-ZXVF apache-tomcat-8.0.12.tar.gz

To begin configuring Tomcat:

Copy the extracted files to the/OPT directory

sudo cp-r apache-tomcat-8.0.12/opt

Enter the/opt/apache-tomcat-8.0.12 directory

cd/opt/apache-tomcat-8.0.12

Open a startup script file

sudo vi/bin/startup.sh (not familiar with VI, can be opened with gedit: sudo gedit./bin/startup.sh)

Expansion: VI Editor in the Linux version of almost all, but gedit not necessarily have, if necessary, you have to install:

sudo apt-get install gedit

After you open the startup.sh file, add the JDK and JRE:

# #20140925 Add JDK and JRE environment variables java_home=/usr/java/jdk1.8.0_20jre_home= $JAVA _home/jrepath= $PATH: $JAVA _home/bin: $JRE _ Homeclasspath=.: $JRE _home/lib/rt.jar: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jartomcat_home=/opt/ apache-tomcat-8.0.12

Java_home and Jre_home are already configured with JDK and JRE directories.

Tomcat_home is the current apache-tomcat-8.0.12 directory

PS: note that before installing Tomcat, install the JDK and JRE, I installed the jdk1.8.0_20

Version of Java.

To start Tomcat:

sudo./bin/startup.sh

Verify that the Tomcat configuration and installation are successful:

In the browser, type: http://localhost:8080/

Enter.

It then displays the tomcat version of the information, and so on.

Turn Tomcat off:

sudo./bin/shutdown.sh

Linux Configuration Java Development environment

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.