| 3 | == CDH4 on hiCloud Ubuntu 12.04 VM == |
| 4 | |
| 5 | {{ |
| 6 | #!sh |
| 7 | ## 產生 zh_TW.UTF-8 語系支援 |
| 8 | locale-gen zh_TW.UTF-8 |
| 9 | ## 安裝 Sun JDK 6 |
| 10 | if [ ! -x /usr/bin/add-apt-repository ]; then sudo apt-get -f -y install python-software-properties; fi |
| 11 | if [ ! -x /usr/bin/java ]; then |
| 12 | echo "---- [1] Installing Sun Java JDK 6 ........ ----" |
| 13 | sudo add-apt-repository -y 'deb http://free.nchc.org.tw/debian squeeze non-free' |
| 14 | sudo apt-get update |
| 15 | cat << EOF | sudo /usr/bin/debconf-set-selections |
| 16 | sun-java6-bin shared/accepted-sun-dlj-v1-1 select true |
| 17 | sun-java6-jdk shared/accepted-sun-dlj-v1-1 select true |
| 18 | sun-java6-jre shared/accepted-sun-dlj-v1-1 select true |
| 19 | EOF |
| 20 | sudo apt-get -y --force-yes install sun-java6-jdk sun-java6-plugin |
| 21 | sudo add-apt-repository -r 'deb http://free.nchc.org.tw/debian squeeze non-free' |
| 22 | fi |
| 23 | ## 下載 CDH4 設定金鑰與套件庫清單檔(/etc/apt/sources.list.d/cloudera-cdh4.list) |
| 24 | wget http://archive.cloudera.com/cdh4/one-click-install/precise/amd64/cdh4-repository_1.0_all.deb |
| 25 | dpkg -i cdh4-repository_1.0_all.deb |
| 26 | }} |