개발환경 구축을 위해서 hadoop 1.0.3 설치
<hadoop 설치>
# http://www.apache.org/dyn/closer.cgi/hadoop/common/ 에 접속해서 curl이나 wget으로 hadoop 1.0.3을 다운로드
<hdfs 지정>
$ mkdir -p /home/www/hadoop/fs/name /home/www/hadoop/fs/data /home/www/hadoop/mapred/system
$ chmod 755 /home/www/hadoop/fs/data
<설정 파일 >
$ vi conf/core-site.xml
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
$ vi conf/hdfs-site.xml
<configuration>
<property>
<name>dfs.name.dir</name>
<value>/home/www/hadoop/fs/name</value>
</property>
<property>
<name>dfs.data.dir</name>
<value>/home/www/hadoop/fs/data</value>
</property>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>
$ vi conf/mapred-site.xml
<configuration>
<property>
<name>mapred.job.tracker</name>
<value>localhost:9001</value>
</property>
<property>
<name>mapred.system.dir</name>
<value>/home/www/hadoop/mapred/system</value>
</property>
</configuration>
$ vi conf/hadoop-env.sh
export JAVA_HOME=/usr/j2se/
<마스터로 root 로 접속>
$ vi /etc/ssh/sshd_config
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
sshd 데몬을 재시작
$ service sshd restart
<www로 접속>
암호 없이 연결하기
Generating public/private rsa key pair.
Enter file in which to save the key (/home/www/.ssh/id_rsa):
/home/www/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/www/.ssh/id_rsa.
Your public key has been saved in /home/www/.ssh/id_rsa.pub.
The key fingerprint is:
bd:cb:86:99:00:6f:b3:66:06:76:17:0e:6e:21:93:2b www@VNMSGBE1508
$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
<hadoop 실행>
$ bin/hadoop namenode -format
$ bin/start-all.sh
또는
$ bin/start-dfs.sh
'scribbling' 카테고리의 다른 글
Hive 작업-로그를 whitespace(공백) 단위로 출력/수집 하고 Hive 필드로 구성하기 (0) | 2012.09.20 |
---|---|
flume-ng 테스트와 버그 (2) | 2012.09.17 |
Hadoop - Name node is in safe mode. 에러 해결 (0) | 2012.09.17 |
Hadoop 사용시 java.io.IOException: config() 발생 (1) | 2012.09.14 |
git pull 강제로 강제로 받기 (0) | 2012.08.30 |