| 89 | * 編輯 DRBL 上的 hadoop-site.xml |
| 90 | {{{ |
| 91 | ~# cat > /etc/hadoop/conf/hadoop-site.xml << EOF |
| 92 | <?xml version="1.0"?> |
| 93 | <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> |
| 94 | |
| 95 | <!-- Put site-specific property overrides in this file. --> |
| 96 | |
| 97 | <configuration> |
| 98 | <property> |
| 99 | <name>fs.default.name</name> |
| 100 | <value>hdfs://192.168.166.254:9000/</value> |
| 101 | <description> </description> |
| 102 | </property> |
| 103 | <property> |
| 104 | <name>mapred.job.tracker</name> |
| 105 | <value>192.168.166.254:9001</value> |
| 106 | <description> </description> |
| 107 | </property> |
| 108 | <property> |
| 109 | <name>hadoop.tmp.dir</name> |
| 110 | <value>/var/run/hadoop/${user.name}</value> |
| 111 | <description> </description> |
| 112 | </property> |
| 113 | </configuration> |
| 114 | EOF |
| 115 | }}} |
| 116 | * 啟動 Namenode, Secondary Namenode, Jobtracker 在 DRBL Server 並且用 drbl-client-service 指令讓每個 DRBL Client 預設都當 Task Tracker 跟 Datanode。最後執行 re-deploy |
| 117 | {{{ |
| 118 | ~# update-rc.d hadoop-namenode defaults |
| 119 | ~# update-rc.d hadoop-secondarynamenode defaults |
| 120 | ~# update-rc.d hadoop-jobtracker defaults |
| 121 | ~# /etc/init.d/hadoop-namenode start |
| 122 | ~# /etc/init.d/hadoop-secondarynamenode start |
| 123 | ~# /etc/init.d/hadoop-tasktracker start |
| 124 | ~# /opt/drbl/sbin/drbl-client-service tasktracker on |
| 125 | ~# /opt/drbl/sbin/drbl-client-service datanode on |
| 126 | ~# /opt/drbl/sbin/drblpush -c /etc/drbl/drblpush.conf |
| 127 | }}} |