Centos7--16. JavaEE built environment

1 Overview

1.1 Illustration:

figure 1

If you need to develop JavaEE under Linux, we need to install the following software
jdk 、idea、tomcat、mysql
Note: currently only installed jdk and idea

2. Install the JDK

2.1 Installation Steps

  1. Xftp5 first software to upload / root / download directory under through
  2. Copying the software to the / opt directory and extract the / opt directory
    FIG 2

    image 3

  3. Configuration environment variable configuration file vim / etc / profile
    a. 输入 vim /etc/profile
    b. 按 【shift + g】到低端
    c. 在低端输入如下:

    JAVA_HOME=/opt/jdk1.8.0_221
    PATH=/opt/jdk1.8.0_221/bin:$PATH
    export JAVA_HOME PATH
    Figure 4

  4. Need to log off the user, the environment variable to take effect.
    If you are in run level 3, logout
    after 5 level if it is running, log out and log in again

  5. Java javac and can be used in any directory
    in FIG. 5

2.2 Test whether the installation is successful

Write a simple Hello.java output "Hello, Linux, Java!"
6

Note Hello.java authority, not can be compiled to run under which directory, depending on their competence

3. IDEA installation

Step 3.1:

1) to decompress / opt / idea2019_2
7

2) into the idea of the script file to perform the installation directory
8

*图9*![](https://img2018.cnblogs.com/blog/1595603/201908/1595603-20190823205507399-446354327.png)

3) the right to open the terminal during installation to add the following in the / etc / hosts file, save and exit
10

vim /etc/hosts 
0.0.0.0 account.jetbrains.com 

3.2 activation

  1. centos system, open your browser and enter the address http://idea.lanyus.com/ registration code

  2. The acquisition of registration code to paste in the past, the general in the browser Click for registration code, the content is automatically pasted into the idea, and then click OK to

3.3 Create Shortcut

  • cd to your desktop
    1. cd /root/桌面

  • Create a file
    touch idea.desktop

  • open a file
[Desktop Entry]
Name=idea
Exec=/opt/idea2019_2/idea-IU-192.6262.58/bin/idea.sh %u
Type=Application
Icon=/opt/idea2019_2/idea-IU-192.6262.58 /bin/idea.png
Terminal=false 

11

Description:
Exec: script execution path
Icon: Software icon

  • Permissions
    Right Desktop just create a desktop shortcut file, select the permissions, check allowed as program executable file

Note: If a .desktop file creation and editing is complete, the desktop may not show the file into usr / share / applications directory, locate the file, you can copy and paste to your desktop

Guess you like

Origin www.cnblogs.com/zwxo1/p/11402591.html