Hadoop2.2.0 distributed environment configuration Note 1-compiling 64-bit hadoop source code

Source: Internet
Author: User
My test environment is on three machines which are Hadoop-Yarn.Hark.Com 192.168.1.200hadoop-slave1.hark. com 192.168.1.201hadoop.slave2.hark.com 192.168.1.202 in order to fully practice hadoop 64-bit source code compilation, I performed the following configuration environment on all three machines: vmware9 + centos6.4 + hadoop2.2.0 0. Create a hadoop account, for most operations, you must use the hadoop account. 1. In window close mode, use the root account VI/etc/inittab to change init: 5 to init: 3 2. Set static IP addresses to be directly configured in the visualization system or: static IP addresses
To change the IP address permanently, follow these steps:
VI/etc/sysconfig/network-scripts/ifcfg-eth0 (eth0, first Nic, eth1 if second)
Modify the IP address as follows:
Device = eth0 (if the second block is just eth1)
Bootproto = static
Ipaddr = 192.168.0.11 (changed to the IP address to be set)
Netmask = 255.255.255.0 (subnet mask)
Gateway = 192.168.0.1 (GATEWAY)
Onboo = Yes
Then
Service Network restart
3. Disable the firewall, SELinux view Firewall Status Service iptables status temporarily disable Firewall Service iptables stop always disable firewall chkconfig iptables off always open firewall chkconfig iptables on view SELinux status getenforce modify SELinux status VI/etc/SELinux/config will SELinux = "XX" changed to SELinux = "disabled ", then restart the computer. Then use getenforce to confirm the status 4, set the host name temporary modification host name hostname Hadoop-Yarn.Hark.Com Modify host name VI/etc/sysconfig/network and then modify hostname 5, create the directory we want to use (/OPT, /opt/softwares,/opt/modules /), at the same time, start permission 777 and switch to the root permission. Use mkdir to create the/opt/softwares/opt/models folder and grant all the permissions to other users. chmoe-r 777/OPT 5. Prepare the hadoop compiling environment, 64-bit version 1) decompress hadoop source code tar-axvf/opt/softwares/hadoopxx-C/opt/modules2) to install the dependent packages required by the compiling environment, you must use the root permission Yum install Autoconf automake. Libtool cmake Yum install ncurses-develyum install OpenSSL-develyum install lzo-devel zlib-devel GCC gcc-C ++ 6. install Java JDK and download the bin version. The name is: jdk-6u45-linux-x64.bin directly. /jdk-6u45-linux-x64.bin can be installed because the software is installed in/opt/softwares, so you need to put JDK into/opt/modules MV jdk1.6.0 _ 45/opt/modules/and then set the environment variable set VI/etc/profile and # Set javaexport java_home = path export Path = $ path: $ java_home/bin, save and exit. Then, source/etc/profile takes effect in this way. 7. m Aven decompress Maven to the specified directory tar-zxvf/opt/softwares/apache-maven-3.0.5-bin.tar.gz-C/opt/modules to set the maven environment variable export maven_home =/opt/modules/apache-maven-3.0.5export Path = $ path: $ maven_home/bin MVN-version verify that the configuration is successfully configured to enter the installation directory/opt/modules/apache-maven-3.0.5/conf and edit settings. XML file * modified <mirrors> content: <mirror> <ID> nexus-Osc </ID> <mirrorof> * </mirrorof> <Name> nexus OSC </Name> <URL> http://maven.oschina.net/content/group S/public/</URL> </mirror> * modify <profiles> content: <profile> <ID> jdk-1.6 </ID> <activation> <JDK> 1.6 </JDK> </activation> <repositories> <repository> <ID> nexus </ID> <Name> local private nexus </Name> <URL> http://maven.oschina.net/content/groups/public/ </URL> <releases> <enabled> true </enabled> </releases> <snapshots> <enabled> false </enabled> </snapshots> </Repository> </repositories> <pluginrepositories> <plugi Nrepository> <ID> nexus </ID> <Name> local private nexus </Name> <URL> http://maven.oschina.net/content/groups/public/ </URL> <releases> <enabled> true </enabled> </releases> <snapshots> <enabled> false </enabled> </snapshots> </pluginrepository> </pluginrepositories> </profile> Configure the MVN repository ~ /. The default home directory of M2/repostitory is the global Maven configuration file storage directory. For example, if my current user is hadoop, you need to create one in/home/hadoop. m2 folder and then enter the maven configuration file. the CP Maven installation directory/CONF/settings in the M2 directory. XML/home/hadoop /. m2/8. Extract protobuf to/opt/modules for execution. /configure for installation switch to the root account to execute make and then make check (can not be executed, check used) and then make install 9, findbugs (1.3.9) decompress the package to/opt/modules and set the environment variable export findbugs_home = path export Path = $ path: $ findbugs/bin source/etc/profile. If the findbugs-version takes effect, permission issues may occur. To the U + X that is, chmod-r u + x/opt/modules/findbugs-1.3.9/7, upload hadoop, hadoop compilation (purpose: hadoop officially provided is only 32-bit and does not have 64-bit, so you have to re-compile it if you need 64-bit.) hadoop of hadoop2.2.0 has some problems, so you need to modify the configuration file using notepad ++ SFTP function to connect to our Linux and then modify/opt/module/hadoop-2.2.0-src/hadoop-common-Project/hadoop-auth/POM. XML <dependency> <groupid> Org. mortbay. jetty </groupid> <artifactid> jetty-util </artifactid> <scope> test </scope> </dependency> is added to 55 rows of hadoop Bui Lding.txt check which editing script is used and use MVN package-pdist, native, Src-dskiptests-dtar. Note: I deleted the docs and it seems troublesome to generate the docs: to execute the code in the root directory of the hadoop source code, Note: I encountered a problem during compilation and failed to connect Maven. Because some dependent libraries may be downloaded during compilation, You need to configure the image address according to the above tutorial. The download link from the Chinese URL becomes a note: I still encountered permission issues during compilation. Configure the X permission for the maven config directory.

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.