Download jdk and maven installation from vmware to Linux, and jdk maven Installation

Source: Internet
Author: User
Tags intel core i5

Download jdk and maven installation from vmware to Linux, and jdk maven Installation

Preface: personal summary. If any, please point out

 

Operating Environment:

Operating System: Windows 7 Enterprise Edition

Processor: Intel Core i5-4200U CPU @ 1.6 GHz

Memory: 8 GB

System type: 64-bit Operating System

 

Files to be installed:

Ubuntu: http://mirrors.yun-idc.com/ubuntu-releases/14.10/ubuntu-14.10-desktop-amd64.iso

(Version: Ubuntu 14.10

Jdk Toolkit: www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-4243151.html

(Version: jdk-8u51-linux-x64.tar.gz

Maven project management tool: maven.apache.org/download.cgi

(Version: apache-maven-3.3.3-bin.tar.gz

Vmwarevm: http://dlsw.baidu.com/sw-search-sp/soft/e5/13808/VMware-workstation-full-11.1.2.61471.1437365244.exe

(Version: VMware workstation 11.1 requires a serial number.

 

To create a virtual system, follow these steps:

1. Open vmware-workstation-full-11.1.2.61471.1437365244.exe and click Next as prompted. Vmware installed

2. On the run interface of vmware, click Create new virtual machine.

3. Choose custom (advanced)> (default) Next> install the operating system later> next>

4. Fill in the downloaded ubuntu address in "location"> the number of cores for each processor (here I have selected 2, better configuration available)>

5. memory of this Virtual Machine (here I select 2 GB)> (default option) Next> next>

6. Maximum disk size (30 GB here)> (default option) Next> next> complete

7. Edit VM Settings> CD/DVD> use ISO Image File> select the downloaded ubuntu address>

8. Click "enable this VM"> select default> set to simplified Chinese/English> to enter the virtual system.

 

Install vm tools:

(The purpose is to drag files from windows to Linux)

Http://jingyan.baidu.com/article/3065b3b6e8dedabecff8a435.html

1. Select the Virtual Machine menu bar-install VMware tools

2. In the VMware toolswindow popped up in the Ubuntu system, copy vmwarw.ls-9.6.0-1294478.tar.gz> to the desktop.

3rd, right-click vmwarw.ls-9.6.0-1294478.tar.gz on the table and select here.

4. Open the folder icon on the left, and search in the upper right corner.> enter gnome-terminal in the search address bar.>

5. Select File System> reload in the search results

6. Find the terminal icon at the bottom of the search result and open it.> enter sudo su in the terminal window.

(The sudo su command can be explained in ubuntu as follows:

(The sudo su command is also called "substitute user", "Super User", or "switch user"

7. Enter the password, run the cd command to enter the Ubuntu Desktop, and then enter the-vmware-tools-distrib folder.

8, sudo./vmware-install.pl

(Use the sudo./installation command to install the vmware-install.pl folder in the vmware-tools-distrib folder

9. After [/USR/bin] appears, press Enter. Directly Press/dev/sr0... to stop

10. Restart the VM and pull files from windows to Linux.

 

Install jdk and maven:

(Maven is used to manage java class libraries, that is, jar packages. Jdk is a Java software development kit.

The hacker is dragged into the Linux Desktop.

2. Double-click to open the above two files and drag out the content (hereinafter referred to as decompression ).

Change jdk-8u51-linux-x64to jdk-8u51-linux-x64.tar and decompress it again.

3. Open the terminal

Cd/(enter the root directory

Cd lib (enter the lib directory

Sudo mkdir java (create a directory named java

Cd java (go to the java directory

Sudo mv + (drag and decompress the maven folder to the terminal) +./(move the file to the current directory as an administrator, that is ./

Sudo mv + (drag the decompressed jdk folder to the terminal) + ./

Ll (view files in the current directory

Obtain

You can.

4. sudo gedit ~ /. Profile

(Use a text editor as an administrator to open the profile environment configuration file hidden in the main directory.

("~" Is the main directory, "." is a hidden file

5. Find the line # if running bash and

If [-n "$ BASH_VERSION"]; the following three lines of text are inserted between then lines:

JAVA_HOME = "/lib/java/jdk1.8.0 _ 51"

MAVEN_HOME = "/lib/java/apache-maven-3.3.3"

CLASSPATH = ".: $ JAVA_HOME/lib/tools. jar"

Insert a row under fi.

PATH = "$ JAVA_HOME/bin: $ JAVA_HOME/jre/bin: $ MAVEN_HOME/bin: $ PATH"

Save and exit

(This step is the initial directory for configuration and operation. Before configuration, you cannot directly use the java command. You need a specific directory and java file to use this command, for example, jdk directory/bin/java-version.

(After configuration, you can directly use java-version, for example. You can print the PATH to see the effect and see what is stored in the PATH: echo $ PATH

6. Create a programme folder in the main folder, and then create a repo folder in the programme folder.

7. cd apache-maven-3.3.3/conf/(go to the conf folder under the apache-maven-3.3.3

8. sudo gedit settings. xml

(Use a text editor as the administrator to open the settings environment configuration file under the directory, which corresponds to the maven

9. in <localRepository>/path/to/local/repo </localRepository>

--> Add a row to the next line

<LocalRepository>/home/xxxxx (your user name such as: doufu)/programme/repo </localRepository>

Save and exit (the setting configuration is the location repo where the class library will be downloaded in the future

10. Check whether the test is successful.

Enter java-version on the terminal

Input mvn-v

The two commands run out of the same result to prove the correct

    

Restart the instance.

 

Note:

1. If you do not select "Install the operating system later" when creating a new virtual system, you cannot enter the system language selection interface.

2. Decompress jdk twice. Otherwise, a green file (jdk) and a blue folder (maven) are displayed. This is not correct.

3, or install maven where the third point, sudo mv '/home/xxxx (your user name such as: doufu)/desktop/apache-maven-3.3.3 '. /This sentence should be added at the end. /otherwise, the same error occurs.

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.