您好,登錄后才能下訂單哦!
這篇文章主要講解了“centos6下安裝Ambari2.2.1和HDP2.4的步驟”,文中的講解內(nèi)容簡單清晰,易于學(xué)習(xí)與理解,下面請(qǐng)大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“centos6下安裝Ambari2.2.1和HDP2.4的步驟”吧!
1.首先要下載它們的安裝包,別嘗試著在yum來下,特別慢,最好的方式是通過建立本地資源的方式來安裝。
http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.4.0.0/HDP-2.4.0.0-centos6-rpm.tar.gz
http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos6/HDP-UTILS-1.1.0.20-centos6.tar.gz
http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.2.1.0/ambari-2.2.1.0-centos6.tar.gz
2.立本地資源庫 在var/www/html下建立一個(gè)hdp目錄,如果沒有的請(qǐng)先安裝httpd yum install httpd 把下到的三個(gè)資源安裝解壓完畢之后,傳到hdp目錄下,然后重啟httpd服務(wù),用下面三個(gè)地址來測(cè)試一下是否可以通過網(wǎng)址訪問了,然后準(zhǔn)備三個(gè)文件,hdp.repo,ambari.repo,hdp-util.repo 不要按照官方說的那個(gè)做,那個(gè)是會(huì)報(bào)錯(cuò)的,我把我的放出來,大家自己照著弄,修改一下地址就行,然后把這三個(gè)文件復(fù)制集群中的所有機(jī)器的/etc/yum.repos.d/目錄下
下面我發(fā)一下他們的內(nèi)容
hdp.repo
[HDP-2.3.0.0] name=HDP Version - HDP-2.3.0.0 baseurl=http://10.0.71.15/hdp/HDP/centos6/2.x/updates/2.3.0.0 gpgcheck=1 gpgkey=http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.3.0.0/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins enabled=1 priority=1
ambari.repo
[Updates-ambari-2.2.1.0] name=ambari-2.2.1.0 - Updates baseurl=http://10.0.71.15/hdp/ambari/centos6/2.2.1.0-161 gpgcheck=1 gpgkey=http://public-repo-1.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins enabled=1 priority=1
hdp-util.repo
[HDP-UTILS-1.1.0.20] name=HDP Utils Version - HDP-UTILS-1.1.0.20 baseurl=http://10.0.71.15/hdp/HDP-UTILS-1.1.0.20/repos/centos6 gpgcheck=1 gpgkey=http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.3.0.0/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins enabled=1 priority=1
3.安裝之前的準(zhǔn)備工作
(1)設(shè)置ssh自動(dòng)登陸,這個(gè)參照ssh自動(dòng)登陸的那個(gè)去做就行,網(wǎng)址是http://www.cnblogs.com/cenyuhai/p/3280668.html
(2)設(shè)置ntpd自動(dòng)啟動(dòng),所有機(jī)器
chkconfig --level 5 ntpd on service ntpd start
(3)禁用selinux,所有機(jī)器
vi /etc/sysconfig/selinux 設(shè)置selinux=disabled
(4)設(shè)置時(shí)間同步,所有機(jī)器
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime #設(shè)置時(shí)區(qū)為北京時(shí)間,這里為上海,因?yàn)閏entos里面只有上海。。。 ntpdate us.pool.ntp.org #時(shí)間同步
沒有安裝ntpdate的可以yum一下 yum install -y ntpdate
加入定時(shí)計(jì)劃任務(wù),每隔10分鐘同步一下時(shí)鐘
crontab -e
把下面的內(nèi)容粘貼進(jìn)去保存即可
0-59/10 * * * * /usr/sbin/ntpdate us.pool.ntp.org | logger -t NTP
(5)修改/etc/hosts文件,所有機(jī)器,設(shè)置如下:
192.168.1.133 hadoop.Master192.168.1.134 hadoop.SlaveT1192.168.1.135 hadoop.SlaveT2
4.修改配置文件,所有機(jī)器
yum install yum-plugin-priorities vi /etc/yum/pluginconf.d/priorities.conf #設(shè)置為以下內(nèi)容 [main] enabled=1 gpgcheck=0
5.安裝自定義的mysql服務(wù)
yum install -y mysql-server
安裝完成之后用root賬戶登陸,執(zhí)行下列命令
create database hive ; grant all on hive.* TO 'hive'@'%' IDENTIFIED BY 'hive'; create database oozie DEFAULT CHARACTER SET utf8; grant all on oozie.* TO 'oozie'@'%' IDENTIFIED BY 'oozie';
如果mysql也裝在集群中的某個(gè)機(jī)器上面,而且該服務(wù)也裝在這個(gè)臺(tái)機(jī)器上面。。比如我的hadoop.SlaveT1上面掛了hive服務(wù),mysql也在它上面就會(huì)連接不上 還需要運(yùn)行以下命令
grant all on hive.* TO 'hive'@'hadoop.SlaveT1' IDENTIFIED BY 'hive';
5.安裝ambari服務(wù)
yum install -y epel-release yum install ambari-server
//自己下載jdk linux x64,具體哪個(gè)版本,可以執(zhí)行ambari-server setup時(shí)看到,放在/var/lib/ambari-server/resources下面 ,就免得它自己下了,速度老慢了。。
ambari-server setup
我的ambari數(shù)據(jù)庫賬號(hào)密碼全是ambari
安裝完畢之后啟動(dòng)ambari服務(wù) ambari-server start
訪問地址 ip:8080 用戶名密碼 admin/admin
問題:
mysql 找不到驅(qū)動(dòng)
yum install mysql-connector-java
2. 使用mysql數(shù)據(jù)庫,需要手工導(dǎo)入建庫建表
mysql> create database ambari character set utf8 ;
mysql> use ambari;
mysql> source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
mysql> grant all privileges on ambari.* to ambari@'%' identified by 'ambari';
3.
Error: Package: snappy-devel-1.0.5-1.el6.x86_64 (epel) Requires: snappy(x86-64) = 1.0.5-1.el6 Installed: snappy-1.1.0-1.el6.x86_64 (@anaconda-CentOS-201311272149.x86_64/6.5) snappy(x86-64) = 1.1.0-1.el6 Available: snappy-1.0.5-1.el6.x86_64 (epel) snappy(x86-64) = 1.0.5-1.el6 解決方法: rpm -e snappy-1.1.0-1.el6.x86_64 --nodeps
4. Does not contain a valid host:port authority
hosts 主機(jī)名帶下劃線,應(yīng)該去掉下劃線。。
5. ERROR 2015-08-14 17:11:26,557 main.py:272 - Failed to start ping port listener of: [Errno 98] Address already in use
將使用amabri的進(jìn)程kill 掉
start hbase
6.
resource_management.core.exceptions.Fail: Execution of '/usr/hdp/current/hbase-master/bin/hbase-daemon.sh --config /usr/hdp/current/hbase-master/conf start master' returned 127. su: warning: cannot change directory to /home/hbase: Permission denied -bash: /home/hbase/.bash_profile: Permission denied -bash: /usr/hdp/current/hbase-master/bin/hbase-daemon.sh: No such file or directory 發(fā)現(xiàn)hbase-master下沒有bin/hbase-daemon.sh 文件 需要手工拷入bin 、lib
感謝各位的閱讀,以上就是“centos6下安裝Ambari2.2.1和HDP2.4的步驟”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對(duì)centos6下安裝Ambari2.2.1和HDP2.4的步驟這一問題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是億速云,小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。