先說說系統安裝環境:
centOS 6.3 最新的系統,一切都是免費的, yum 是不受管理,大多數的軟體已經裝好了比如python python 2.6 。
centOS 5.* yum免費,python 2.4
redhat 5.6 這個是老的系統,yum需要註冊,才能更好的使用。 python 應該是2.4的 ------------------- 我們需要安裝cloudera hadoop 是需要yum免費的除非你已經註冊了redhat 有使用權,還有python需要2.4版本的。
其實他是需要python-libs-2.4.3-46.el5.x86_64.rpm這個包,我就不寫了。
-----我使用的是centOS 6.3(64bit)系統,需要安裝python-libs-2.4.3-46.el5.x86_64.rpm這個包的命令:rpm -ivhpython-libs-2.4.3-46.el5.x86_64.rpm --force --nodeps
cloudera manger 安裝
1 先下載postgresql 資料庫支援。http://www.postgresql.org/download/linux/ 安裝。修改:進入 /var/lib/pgsql/data 路徑下找到postgresql.conf 修改問以下配置,這樣你就可以使用psql命令連結資料庫了:
1.1 修改配置
修改前:
#listen_addresses = '127.0.0.1' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
#port = 5432
修改後:
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
port = 5432
1.2重啟服務 ;
命令:
service postgresql restart
--協助:/etc/init.d/postgresql {start|stop|status|restart|condrestart|condstop|reload|force-reload}
2 關閉selinux
SELinux is enabled. It must be disabled to install and use this product設定 /etc/selinux/config 配置 selinux=disabled
3 關閉防火牆 service iptables stop
4 下載cloudera manager 二進位安裝包https://ccp.cloudera.com/display/SUPPORT/Cloudera+Manager+Free+Edition+-+END+USER+LICENSE+TERMS+AND+CONDITIONS檔案名稱:cloudera-manager-installer.bin然後在你的linux上就可以安裝了 ./cloudera-manager-installer.bin 一路next/yes,讓他連網路下載依賴包。安裝完畢5 開啟ip:7180 然後 使用者名稱密碼預設:admin/admin安裝hadoop 機器:1 需要你的DNS 可以指向你的cloudera manager機他會用命令 host -t PTR (manager-IP) 去檢測你的主機名稱。所以你需要修改你的所有機器的host檔案我在這裡自己安裝了個DNS伺服器: 主要配置就是讓所有的nodes 能使用 host -t PTR (manager-IP) 命令檢測到我的manger主機名稱。伺服器使用bind9 https://www.isc.org/software/bind安裝教程:
http://www.centos.bz/2011/07/centos-install-bind-dns-server/
我的配置: vi /etc/resolv.conf 添加 servername 10.1.15.74 到第一個2 如果你自己做了源那麼修改yum源修改yum 建立 vi /etc/yum.repos.d/cloudera.repo 添加源配置:[cloudera-cdh4]name=Cloudera's Distribution for Hadoop, Version 4baseurl=http://10.10.112.111:8080/cdh4local/CDH/4gpgkey = http://10.10.112.111:8080/cdh4local/CDH/4/RPM-GPG-KEY-cloudera gpgcheck = 0enabled=1[cloudera-cm4]name=Cloudera's Distribution for Hadoop, Version 4baseurl=http://10.10.112.111:8080/cdh4local/CM/4gpgkey = http://10.10.112.111:8080/cdh4local/CM/4/RPM-GPG-KEY-clouderagpgcheck = 0enabled=1運行命令yum update如何建源,官網說要安裝一個源的軟體,感覺有點麻煩,我的用的是笨辦法直接起一個java-web工程將原網址的所有目錄拷貝下來做成原始的檔案結構,發布,經過測試是好的。:工程的名字可能起得不好。在安裝的時候需要設定本地源在哪裡:這樣就可以使用你的源了。3 next OK-> start ->OK【遇到的問題】可能需要安裝這兩個東西。[問題]1:ERROR:Requires: redhat-lsb [問題]2:ERROR: Reuires: ncnc : 這個包名:nc-1.84-22.el6.x86_64.rpmlsb: 這個沒安裝好,
上面兩個centOS裡邊內建的。[問題]3:如果遇到這個問題BEGIN yum info bigtop-utilsLoaded plugins: rhnplugin, securityRepository cloudera-cdh4 is listed more than once in the configurationThis system is not registered with RHN.RHN support will be disabled.END (1)remote package bigtop-utils is not available, giving up 這個是說你的源有問題,我遇到的問題是源包名寫錯了,他找不到。[問題]4 安裝manager的時候遇到要關閉selinuxSELinux is enabled. It must be disabled to install and use this product設定 /etc/selinux/config 配置 selinux=disabled[問題] 5你一定用的是redhat系統,原因是因為你沒有註冊redhat 所以報錯了,目前理解是這樣(查看官方bug和國外解答)。Total size: 7.4 kDownloading Packages:Running rpm_check_debugERROR with rpm_check_debug vs depsolve:rpmlib(FileDigests) is needed by bigtop-utils-0.4+352-1.cdh4.1.0.p0.28.el6.noarchrpmlib(PayloadIsXz) is needed by bigtop-utils-0.4+352-1.cdh4.1.0.p0.28.el6.noarchComplete!(1, [u'Please report this error in https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%205&component=yum'])END (1) [問題]6 啟動service cloudera-scm-agent start 失敗日誌目錄 /var/log/cloudera-scm-agent/cloudera-scm-agent.{log,out}
-------關於源的一些操作-----
1 修改 vi /etc/resolv.conf 添加 servername10.1.15.74
2 修改 vi /etc/hosts 添加hadoop10.1.15.71
3 修改yum 建立 vi/etc/yum.repos.d/cloudera.repo
添加源配置:
[cloudera-cdh4]
name=Cloudera's Distribution for Hadoop,Version 4
baseurl=http://10.10.112.111:8080/cdh4local/CDH/4
gpgkey =http://10.10.112.111:8080/cdh4local/CDH/4/RPM-GPG-KEY-cloudera
gpgcheck = 0
enabled=1
[cloudera-cm4]
name=Cloudera's Distribution for Hadoop,Version 4
baseurl=http://10.10.112.111:8080/cdh4local/CM/4
gpgkey = http://10.10.112.111:8080/cdh4local/CM/4/RPM-GPG-KEY-cloudera
gpgcheck = 0
enabled=1
運行命令yum update
參考: http://blog.csdn.net/zzhua100/article/details/7823971