The first step to install Hadoop, install Ubuntu and change the source and install the JDK

Source: Internet
Author: User

How to install Ubuntu, this self Baidu. Site Specific installation: http://www.ubuntu.com

I installed the Ubuntu Server version and then the full English installation. So its source is automatically positioned to the United States

Here's how to change the source, the first one is the operation. The second is a detailed explanation of the operation.

1 //Inside the specific input command,//indicates the content of the comment, do not need tube2sudo su-Root//Switch to Administrator privileges3 4Vi/etc/Apt/Sources.list.//Open sources.list with VI5 6Shift+://Enter Command mode This time will appear:7 8:%S/Us.archive/Cn.archive/G//In: Back input%S/Us.archive/Cn.archive/g9 Ten: wq!//First shift+: Then enter wq! One  AApt-GetUpdate.//Update source
Operation Code
1Linux Ubuntu Apt-Get Replacement Source method:2 Ubuntu Default source is the United States, so the download is particularly slow, the following method to replace the source as a domestic source. 3Open With VI and gedit/etc/Apt/Sources.list Replace all of the us.archive with cn.archive, so that you can use apt later-The get download will use the originating http://it's cn.archive.ubuntu.com. 4 Use the VI Editor command for (note first switch to root user):5Root@ubuntu:/#vi/etc/Apt/sources.list6 Open Sources.list7 in the VI command mode (after entering the command line mode, after pressing I to enter the editing mode, but there is no need to edit mode), enter8:%S/Us.archive/Cn.archive/g9 Replace, enterTen : wq! One Save exit.  A the symbol interpretation in the command: - : (colon), indicating that the command is followed - %(Percent sign) that modifies the contents of the file in the buffer, i.e. the source file does not change if it is not saved, so it is then used: wq! command to save the exit the s (letter s), which means replace - /Us.archive/A cn.archive that replaces the us.archive in the file with the cn.archive - /g (apostrophe plus letter g), which means replace all content -In this way, the APT-The source of the get changes to a domestic source.  +Below apt must be re-started-GET, Command -Apt-GetUpdate
A detailed explanation of the method of source Exchange

Change the source, and then directly in the source file to find the JDK to install the

Ubuntu is using OPENJDK, we must first find the appropriate JDK version. In the terminal input command: Apt-cache search openjdk Find the JDK version we need to install from the list of searches to execute the install command: sudo apt-get install OPENJDK-7-JDK Note OPENJDK-7-JDK is the result we have just searched for, the name is the same. We can verify the installation results with the Java-version command. If you can see the actual results prove that the installation has been successful. After installation we need to configure the Java_home variable.

Configuration of the Java_home variable

environment variable configuration sudo gedit opens/etc/profile with the following additions: Export Java_home=/usr/local/java/jdk1.6.0_45export jre_home=/usr/local/ Java/jdk1.6.0_30/jreexport classpath=.: $JAVA _home/lib: $JRE _home/lib: $CLASSPATHexport path= $JAVA _home/bin: $JRE _ Home/bin: $JAVA _home: $PATH configuration takes effect after a general change/etc/profile file, the machine needs to be restarted to take effect. Use the following command to make it effective without restarting Source/etc/profile check the configuration console input: Java-version print similar to the following: Java version "1.6.0_45" Java (TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot (TM) 64-bit Server VM (build 20.45-b01, Mixed mode)

The first step to install Hadoop, install Ubuntu and change the source and install the JDK

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.