root@ailab-hadoop:/home/ailab# ssh-keygen -t rsa \Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in \. Your public key has been saved in \.pub. The key fingerprint is: 1e:1d:d7:01:04:86:b3:d9:5b:78:6a:3c:5a:72:28:04 root@ailab-hadoop The key's randomart image is: +--[ RSA 2048]----+ | .ooo.. | | E o. . . | | . =... . | | . o.ooo | | . So.= | | ..o.O | | ..* . | | . | | | +-----------------+
root@ailab-hadoop:/home/ailab/hadoop-1.0.3# ./bin/hadoop namenode -format 14/04/27 23:28:50 INFO namenode.NameNode: STARTUP_MSG: /************************************************************ STARTUP_MSG: Starting NameNode STARTUP_MSG: host = ailab-hadoop/127.0.1.1 STARTUP_MSG: args = [-format] STARTUP_MSG: version = 1.0.3 STARTUP_MSG: build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.0 -r 1335192; compiled by 'hortonfo' on Tue May 8 20:31:25 UTC 2012 ************************************************************/ 14/04/27 23:28:50 INFO util.GSet: VM type = 64-bit 14/04/27 23:28:50 INFO util.GSet: 2% max memory = 17.77875 MB 14/04/27 23:28:50 INFO util.GSet: capacity = 2^21 = 2097152 entries 14/04/27 23:28:50 INFO util.GSet: recommended=2097152, actual=2097152 14/04/27 23:28:50 INFO namenode.FSNamesystem: fsOwner=root 14/04/27 23:28:50 INFO namenode.FSNamesystem: supergroup=supergroup 14/04/27 23:28:50 INFO namenode.FSNamesystem: isPermissionEnabled=true 14/04/27 23:28:50 INFO namenode.FSNamesystem: dfs.block.invalidate.limit=100 14/04/27 23:28:50 INFO namenode.FSNamesystem: isAccessTokenEnabled=false accessKeyUpdateInterval=0 min(s), accessTokenLifetime=0 min(s) 14/04/27 23:28:50 INFO namenode.NameNode: Caching file names occuring more than 10 times 14/04/27 23:28:50 INFO common.Storage: Image file of size 110 saved in 0 seconds. 14/04/27 23:28:50 INFO common.Storage: Storage directory /home/ailab/hadoop-1.0.3/data/dfs/name has been successfully formatted. 14/04/27 23:28:50 INFO namenode.NameNode: SHUTDOWN_MSG: /************************************************************ SHUTDOWN_MSG: Shutting down NameNode at ailab-hadoop/127.0.1.1 ************************************************************/
하둡 실행 ./bin/start-all.sh
root@ailab-hadoop:/home/ailab/hadoop-1.0.3# ./bin/start-all.sh starting namenode, logging to /home/ailab/hadoop-1.0.3/libexec/../logs/hadoop-root-namenode-ailab-hadoop.out localhost: starting datanode, logging to /home/ailab/hadoop-1.0.3/libexec/../logs/hadoop-root-datanode-ailab-hadoop.out localhost: starting secondarynamenode, logging to /home/ailab/hadoop-1.0.3/libexec/../logs/hadoop-root-secondarynamenode-ailab-hadoop.out starting jobtracker, logging to /home/ailab/hadoop-1.0.3/libexec/../logs/hadoop-root-jobtracker-ailab-hadoop.out localhost: starting tasktracker, logging to /home/ailab/hadoop-1.0.3/libexec/../logs/hadoop-root-tasktracker-ailab-hadoop.out
root@ailab-hadoop:/home/ailab/hadoop-1.0.3# ./bin/hadoop fs -cat README.txt.result2/* (BIS), 1 (ECCN) 1 (TSU) 1 (see 1 5D002.C.1, 1 740.13) 1 <http://www.wassenaar.org/> 1 Administration 1 Apache 1 BEFORE 1 BIS 1 Bureau 1 Commerce, 1 Commodity 1 Control 1 Core 1 Department 1 ENC 1 Exception 1 Export 2 For 1 Foundation 1 Government 1 Hadoop 1 Hadoop, 1 Industry 1 Jetty 1 License 1 Number 1 Regulations, 1 SSL 1 Section 1 Security 1 See 1 Software 2 Technology 1 The 4 This 1 U.S. 1 Unrestricted 1 about 1 algorithms. 1 and 6 and/or 1 another 1 any 1 as 1 asymmetric 1 at: 2 both 1 by 1 check 1 classified 1 code 1 code. 1 concerning 1 country 1 country's 1 country, 1 cryptographic 3 currently 1 details 1 distribution 2 eligible 1 encryption 3 exception 1 export 1 following 1 for 3 form 1 from 1 functions 1 has 1 have 1 http://hadoop.apache.org/core/ 1 http://wiki.apache.org/hadoop/ 1 if 1 import, 2 in 1 included 1 includes 2 information 2 information. 1 is 1 it 1 latest 1 laws, 1 libraries 1 makes 1 manner 1 may 1 more 2 mortbay.org. 1 object 1 of 5 on 2 or 2 our 2 performing 1 permitted. 1 please 2 policies 1 possession, 2 project 1 provides 1 re-export 2 regulations 1 reside 1 restrictions 1 security 1 see 1 software 2 software, 2 software. 2 software: 1 source 1 the 8 this 3 to 2 under 1 use, 2 uses 1 using 2 visit 1 website 1 which 2 wiki, 1 with 1 written 1 you 1 your 1 cat: File does not exist: /user/root/README.txt.result2/_logs
Reference :시작하세요! 하둡 프로그래밍 : 기초부터 실무까지 하둡의 모든 것, 위키북스, 정재화 지음