[Introduction to Hadoop]-2 Ubuntu Installation and configuration Hadoop installation and configuration

Source: Internet
Author: User

Ubuntu installation (Here I do not catch a map, just cite a URL, I believe that everyone's ability)

Ubuntu Installation Reference Tutorial: http://jingyan.baidu.com/article/14bd256e0ca52ebb6d26129c.html

Note the following points:

1, set the virtual machine's IP, click the network connection icon in the bottom right corner of the virtual machine, select "Bridge mode", so as to assign to your LAN IP, this is very important because the back Hadoop to use the LAN.

2, in Ubuntu check the IP command: ifconfig can display your IP address, see if IP is your LAN IP address.

3, Ubuntu set Chinese, on the left side of the toolbar click System settings that Gear-->language support in this interface can choose Add/del language go in to find Chinese option hook, point after installation in the language list will have Chinese (China), If it is gray at the bottom of the option, use the mouse to drag the item to the top is black, select Apply to global restart.

4, Ubuntu is not as human as windows, what installed software are in the Start menu, of course, you can install this plugin, but I think it does not need to be so troublesome, because in the left sidebar on the top of the three-point circle, you can search out all of your installed programs, Personally suggest that the software you download is placed in a folder below home.

5, Ubuntu Press Crtl+alt+t to open the terminal, if not the root account system in addition to the home folder in other places rarely permissions, remember if your folder is not under the home, you need to use the terminal chmod command to modify permissions, otherwise it will be wrong.

Java installation

sudo apt-get install openjdk7 such commands installed the best, of course, can also download tar.gz package installation, but need to configure their own java_home and other work, please Baidu a bit. If it is sudo apt-get this way, will generally be installed in/usr/lib/jvm/this path, through the terminal, you enter Java-version, if you can display the version number, indicating that the installation was successful.

SSH installation

sudo apt-get install openssh-server, at least configure generate key these please Baidu a bit.

MySQL Installation

sudo apt-get install mysql-server, installing and then installing a similar client-side platform like MySQL Workbench, to make it easy for you to visualize the operation of MySQL

Hadoop Installation and Configuration

Download hadoop1.2.1 tar.gz package, unzip the folder renamed to Hadoop, copy one to/usr/local/below, if your current account does not operate the local folder, remember to use other authorized account to operate, It is best to build a Hadoop group and add a Hadoop account to operate, how to add user groups and users, or by command add Usergroup/add user. After the copy is complete, the permissions of the Hadoop folder are Chmod-r 777 through the root account, that is, all the content under this folder is open to all people, and the test environment is not much related.

Hadoop has three modes of operation: Standalone, pseudo-distributed, fully distributed.

Stand-alone mode is the default mode for Hadoop. When the source package for Hadoop was first decompressed, Hadoop was unable to understand the hardware installation environment and conservatively chose the minimum configuration. In this default mode, all 3 XML files are empty. When the configuration file is empty, Hadoop runs completely on-premises. Because there is no need to interact with other nodes, the standalone mode does not use HDFS and does not load any of the Hadoop daemons. This mode is mainly used to develop the application logic for debugging MapReduce programs.

Pseudo-distributed mode is a machine and when the host and when the heavy machine, all operations are implemented on a machine, there is already hdfs, daemon These, need to configure Conf/core-site.xml, Hdfs-site.xml, Mapred-site.xml, Hadoop-env.sh these several documents.

Core-site.xml configuration content is as follows:

<configuration>   <property>        <name>fs.  Default.name</name>        <value>hdfs://172.27.27.3:9000</value>    </property>    <property>        <name>hadoop.tmp.dir</name>        <value>/usr/local /hadoop/tmp</value>    </property></configuration>

The first node content resolution is HDFs is the address and port of this Hadoop HDFS system server, the following node is the path of Hadoop tmp

Hdfs-site.xml

<configuration>  <property>        <name>dfs.replication</name>        <value>1 </value>    </property>    <property>        <name>dfs.name.dir</name>        <value>/usr/local/hadoop/hdfs/name</value>    </property>    <property>        < name>dfs.data.dir</name>        <value>/usr/local/hadoop/hdfs/data</value>    </ Property></configuration>

The first node is the choice of the working mode, if 1 is the pseudo-distribution pattern for our test

Mapred-site.xml

<configuration>  <property>        <name>mapred.job.tracker</name>        <value >172.27. 27.3:9001</value>    </property></configuration>

Modify the conf/hadooop-env.sh inside the java-home for your Java installation directory

Once this is configured, you can go to the Hadoop folder via the terminal, the CD/your path/You are ready to go, start the Hadoop service via bin/start-all.sh, bin/stop-all.sh to stop the service.

If startup succeeds, you can find 6 processes through JPS, if startup fails, check if your Java JDK is successfully installed, Hadoop directory permissions, settings of several files above, etc.

[Introduction to Hadoop]-2 Ubuntu Installation and configuration Hadoop installation and configuration

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.