Last change
on this file since 51 was
51,
checked in by jazz, 16 years ago
|
- 修改 control:
- 發現只相依 sun-java6-jre 會造成一些 error:
Error: could not open
`/usr/lib/jvm/java-6-sun-1.6.0.07/jre/lib/i386/jvm.cfg'
- hadoop.postinst, hadoop.postrm, hadoop.prerm
- 用來做建立 hdfsadm 使用者帳號, ssh-keygen,
ssh key exchange (authorized_keys), namenode format,
啟動 namenode, datanode, tasktracker 等
|
-
Property svn:executable set to
*
|
File size:
896 bytes
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | |
---|
3 | echo "$1" |
---|
4 | |
---|
5 | if [ "$1" != configure ] |
---|
6 | then |
---|
7 | exit 0 |
---|
8 | fi |
---|
9 | |
---|
10 | setup_hdfsadm_user() { |
---|
11 | if ! getent passwd hdfsadm >/dev/null; then |
---|
12 | useradd hdfsadm |
---|
13 | mkdir -p /home/hdfsadm/.ssh |
---|
14 | mkdir -p /var/log/hadoop |
---|
15 | ssh-keygen -t rsa -q -f /home/hdfsadm/.ssh/id_rsa -N "" |
---|
16 | cp /home/hdfsadm/.ssh/id_rsa.pub /home/hdfsadm/.ssh/authorized_keys |
---|
17 | chown hdfsadm:hdfsadm /var/log/hadoop |
---|
18 | chown -R hdfsadm:hdfsadm /home/hdfsadm/.ssh |
---|
19 | chown -R hdfsadm:hdfsadm /home/hdfsadm |
---|
20 | su -c "/opt/hadoop/bin/hadoop namenode -format" hdfsadm - |
---|
21 | su -c /opt/hadoop/bin/start-all.sh hdfsadm - |
---|
22 | echo "Please check via browsing following URLs:" |
---|
23 | echo "(1) http://localhost:50030 for Hadoop Map/Reduce Administration." |
---|
24 | echo "(2) http://localhost:50060 for Hadoop Task Tracker status" |
---|
25 | echo "(3) http://localhost:50070 for Hadoop Distributed File System status" |
---|
26 | fi |
---|
27 | } |
---|
28 | |
---|
29 | setup_hdfsadm_user |
---|
Note: See
TracBrowser
for help on using the repository browser.