Linux system installation +hadoop environment collocation

Source: Internet
Author: User
Tags iptables

Linux System InstallationBefore installing the Linux system, to understand the Windows system structure, Windows system is generally installed on the C-Disk system disk, the same Linux also has a similar system disk (/root partition), Linux is usually partitioned (root partition/, swap partition), Linux systems are stored as files, and all files are stored in a directory, similar to the Windows folder. For file System Properties, the Windows file system type is typically NTFS, FAT32, and so on, while the Linux file system type is ext2, ext3, Ext4, and so on (file system: is the method and data structure used by the operating system to clear files on a disk or partition. The file system consists of three parts: software related to file management, managed files, and the data structures required to implement file management. Installing a Linux system is the first hurdle for every beginner. In the middle of this process, the biggest confusion is to partition the hard disk. Although the various distributions of Linux now offer a friendly graphical interface, many people still feel that they can't do it. The main reason for this is that Linux zoning rules are unclear. It's like if we know the rules of the Windows partition, the system disk C, data disk D, and so on, is very well partitioned. As specified in Linux, each hard disk device can have up to 4 primary partitions (which contain extended partitions), and any one of the extended partitions will occupy a primary partition number, that is, on one hard disk, the primary partition and the extended partition are up to 4. The following is a formal installation of the Linux system, before the installation of the system needs to prepare the following software: Vmware®workstation12procentos-6.5-x86_64-bin-dvd.iso virtual machine Installation pre-order configuration installation diagram is as follows: First, create a new virtual machine such as:   Second, select the relevant options, such as:  Click Next to the third step select "Install operating system later", such as:  fourth, select the client operating system type such as:  fifth step, modify the directory file and name such as:  has been the default next sixth step, Set the virtual machine memory size to 2G, the minimum can not be less than 1G, such as:  seventh step, select the network card type, such as:  eighth step, select the disk type, such as:  nineth step, set the virtual machine hard disk size 20G, the minimum can not be less than 5G, such as:  tenth step, Virtual machine new complete, such as:   virtual machine CentOS6.5 installation Add ISO image, such as:   from this, the virtual machine new complete, Next click "Start this virtual machine" for Linux system installation, Linux The system installation diagram is as follows: First step, enter the installation interface, press ENTER enter key directly. &nThe second step, disc detection, select Skip Skip.    The third step, select the language in the installation process, beginners can choose "Simplified Chinese". (try to use English)    fourth, choose to initialize the entire hard drive and erase all data.    Fifth, modify hostname and network    Sixth step, modify host time   Seventh step, set root password    eighth step, select partition mode and write to disk    nineth step, System installation Package selection, here Select "Customize Now"   Tenth step, waiting for the installation complete   installation will prompt "reboot", directly enter.   11th step, simple configuration         Modify Profile network configuration    restart NIC with command: Service network Restart view NIC IP address command: Ifconfig turn off Firewall service iptables Stop (firewall) service iptables status (view firewall status) chkconfigiptables off ( Permanently shut down the firewall)   Close SELINUXVI  /etc/selinux/config add  selinux=disabled after reboot command Getenforce show disabled hostname Change 1.1 Modify Host name # vim/etc/sysconfig/networkhostname=hadoop011.2 modify host name and IP mappings (hosts) # Vi/etc/hosts For example add: 192.168.111.131 hadoop01:wq!   #保存退出reboot   #重启系统后重新显示添加用户useradd   hadooppasswd  hadoop Installation & Configure JDK (priority root permission) Uninstall Preinstallation Jdk rpm–qa | grep Java to see what rpm-e the preinstalled JDK  java-1.* --nodeps Uninstall preinstalled jdkrpm-e  tzdata-java-2013g-1.el6.noarch-- Nodeps install jdk1.  upload JDK tAR package and use TAR&NBSP;–ZXVF&NBSP;&NBSP;JDK's full name of the TAR package to extract  2.  Configure environment variables to modify the configuration file using the Vi/etc/profile vi/etc/profile command, Add the following: Export Java_home=/java/jdk1.8.0_73export jre_home= $JAVA _home/jreexport class_home= $JAVA _home/libexport PATH= $PATH: $JAVA _home/bin use Source/etc/profile to update the profile using Java–version to see if the success is successful, such as:  hadoop User Trust 1.  in the root directory of Hadoop, Using commands ssh-keygen-t rsa 2.  Trust using commands ssh-copy-id hostname  3.  test successfully configured hadoop-2.6.2 upload & Modify configuration file 1.  Go to hadoop-2.6.2/etc/hadoop/directory 2.  modify Hadoop-env.sh&yarn-env.shvim hadoop-env.shexport JAVA_HOME=vim yarn-env.shjava_home=3.  Modify core-site.xml<!--Specify the address of HDFs--><property><name>fs.defaultfs< /name><value>hdfs://hadoop01:9000</value></property><!--Specify the Hadoop temp directory--><property ><name>hadoop.tmp.dir</name><value>/home/hadoop/app/hadoopdir/tmp</value></ property><!--garbage collection mechanism, which is set to hold one day, time unit min--><property><name>fs.trash.interval</name>< value>1440</value></property>4.  Modify hdfs-site.xml<!--Specify the number of HDFs replicas--><property><name> dfs.replication</name><value>1</value></property><!--Specify the Namenode directory-->< property><name>dfs.namenode.name.dir</name><value>file:///home/hadoop/app/hadoopdir  /dfs/name</value></property><!--Specify the Datanode directory--><property><name> Dfs.datanode.data.dir</name><value>file:///home/hadoop/app/hadoopdir /dfs/data</value> </property>5.  Modify Mapred-site.xml First use the command to change the file name MV Mapred-site.xml.template mapred-site.xml<!-- Specify Mr to run on yarn--><property><name>mapreduce.framework.name</name><value>yarn</value ></property>6.  Modify the address of yarn-site.xml<!--specified yarn's boss (ResourceManager)--><property><name >yarn.resourcemanager.hostname</name><value>hadoop01</value></property><!-- Specifies the server--><property><name&gt for yarn; yarn.nodemanager.aux-services</name><value>mapreduce_shuffle</value></property><!- -Specify yarn's server--><property><name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name ><value>org.apache.hadoop.mapred.ShuffleHandler</value></property>7.  Modify Slaves8.   Configure the environment variables for Hadoop VI. bash_profilehadoop_home=/home/hadoop/app/hadoop-2.6.2path= $PATH: $HOME/bin: $HADOOP _home/ Bin: $HADOOP _home/sbinexport hadoop_homeexport Path Update configuration file source .bash_profile9.  Format Namenode (is initialized for Namenode) Hdfsnamenode-format (Hadoopnamenode-format) 10.  Start Hadoop first start hdfsstart-dfs.sh and then start yarnstart-yarn.sh11.  Verify that startup is successful using the JPS command to verify the namenodejpssecondarynamenodenodemanagerresourcemanagerdatanodehttp://mypc:50070 (HDFs Management Interface) HTTP ://mypc:8088 (Mr Management interface)  

Linux System installation +hadoop environment collocation

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.