Build a Java Web development environment under Linux

Source: Internet
Author: User

I am learning Linux recently, I want to build a Java Web development environment to consolidate the basic knowledge of learning.

1. Clear the experimental environment and download related software

Build a Linux environment in a virtual machine. 1.1 is related software. Utomcat, 64-bit Linux under JDK, MySQL. < can go to the official website to download >

Figure 1.1 Required Software

2. Make the ISO file.

You need to encapsulate the three files in Figure 1.1 into an ISO file. Use the UltraISO tool. Will not Baidu it, Baidu is very powerful Oh!

Figure 1.2 The ISO file after the production

3. Add the ISO file to the Linux system.

Figure 1.3 Connecting the ISO to a Linux system

4. Start the virtual machine.

Mount the ISO to the Linux system.

Using the command Mount/mnt/cdrom

and copy it to the/home/admin directory under the CP file name location

5. Install the JDK first

① use Javac to see if the command can be executed (the answer is, of course, negative)

② start the installation. Go to the/home/admin directory.

There are two types of files that are currently known to be installed in a Linux system./file name tar. GZ ends with a direct decompression.

TAR-ZXVF jdk-8u91-linux-x64.tar.gz

Congratulations, the image was successfully extracted.

All right, try Javac useful? No, it's not going to work. We want to configure environment variables to install the JDK under Windows, similar to the need to configure environment variables under Linux.

How is it configured under Linux?

We pay attention to /etc/profile this file

VI under this file. Don't understand .... But we can Baidu under this document is to take what to do with? Used to store the system environment variables.

Then we have configured the system environment variable here is not Javac can work? Then try it! Add the following code to the end of this file. At this time I found the importance of the VI command, but has forgotten. All right! I recognize it.

java_home=/home/admin/jdk1.8.0_91
Path=.: $JAVA _home/bin: $PATH
Export Java_home PATH

At this time, the author found that permission is not allowed to write Ah, had to modify the permissions of the file or switch to root login.

OK to finish!

Build a Java Web development environment under Linux

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.