Ambari学习15_CentOS6.5下安装Ambari2.4全过程
来源:互联网 发布:0基础学编程 编辑:程序博客网 时间:2024/05/16 07:17
Ambari安装
一、前期准备
CentOS应该使用英文版本
1、网络
修改/etc/sysconfig/network-scripts/ifcfg-em1,使网络开机时自动连接
即设置:ONBOOT=yes
2、系统文件
修改/etc/hosts和/etc/sysconfig/network
3、跟新openssl
查看openssl版本:
openssl version –a
和
rpm -qa | grep openssl
结果是:
openssl-1.0.1e-15.el6.x86_64
这个版本比较旧,需要对它进行升级
升级命令:
yum upgrade openssl
以上操作此详细过程:
[root@slave1szx]# rpm -qa | grep openssl
openssl-1.0.1e-15.el6.x86_64
[root@slave1szx]# yum upgrade openssl
……
[root@slave1szx]# rpm -qa | grep openssl
openssl-1.0.1e-48.el6_8.3.x86_64
4、禁用SELinux
可以选择临时性和永久性的禁用。
临时性,使用命令:
setenforce 0
永久性,修改/etc/selinux/config文件
SELINUX=disabled
SELINUXTYPE=targeted
5、禁用iptables
service iptables stop
如下:
[root@masterszx]# service iptables stop
iptables:Setting chains to policy ACCEPT: filter [ OK ]
iptables:Flushing firewall rules: [ OK ]
iptables:Unloading modules: [ OK ]
[root@masterszx]#
6、安装SSH
Root用户下启动服务:
service sshd restart
在普通户下操作
登录本机,检查是否成功,此时,需要密码:ssh master
退出登录,添加授权
cd ~/.ssh/
ssh-keygen -t rsa
有提示,一直按回车
cat id_rsa.pub >> authorized_keys
在root用户下操作
修改权限
修改文件"authorized_keys"权限
chmod 700 authorized_keys
修改SSH配置文件"/etc/ssh/sshd_config"的下面内容
vim /etc/ssh/sshd_config
###############
RSAAuthentication yes # 启用 RSA 认证
PubkeyAuthentication yes # 启用公钥私钥配对认证方式
AuthorizedKeysFile .ssh/authorized_keys # 公钥文件路径(和上面生成的文件相同)
###############
重启SSH
service sshd restart
在普通用户下操作
登录本机,此时不需要密码
ssh master
在slave1和slave2上进行相同操作
将公钥id_rsa.pub分别拷贝到authorized_keys
cat id_rsa.pub >>authorized_keys
7、root下设置ssh
Root下的ssh和普通用户下的ssh
Root下的目录
[root@master.ssh]# pwd
/root/.ssh
普通用户下的目录
[szx@slave2.ssh]$ pwd
/home/szx/.ssh
它们的目录不同
8、Java更新
暂时不进行更新操作
9、Python
保证Python版本大于2.6
10、关闭Linux的THP服务
#centos6
vi/etc/grub.conf,添加transparent_hugepage=never
#centos7:
vi/etc/default/grub
在有CMDLINE一行添加 transparent_hugepage=never
grub2-mkconfig-o /boot/grub2/grub.cfg
systemctldisable tuned
重启之后,用下面的命令检查:
cat/sys/kernel/mm/redhat_transparent_hugepage/enabled
有 [never]则表示THP被禁用
11、启动ntpd
/etc/init.d/ntpd start
否则,会出现ntpd Not running on 3 hosts问题
12、禁止PackageKit
这个步骤每台都需要做,因为在使用yum安装期间有可能导致yum被锁,安装过程报错。agent会用到yum安装hadoop及上层组件,而server也要用yum安装ambari。
vi/etc/yum/pluginconf.d/refresh-packagekit.conf 修改其中配置将enabled后面数值置0。
二、安装过程
1、下载Ambari的公共库文件
首先需要获取Ambari的公共库文件(public repository),登录到Linux主机并执行下面的命令(也可以自己手工下载):
旧:
wgethttp://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.0.1/ambari.repo
新:
wget http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.4.0.1/ambari.repo
或:
wget -nvhttp://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.4.0.1/ambari.repo-O /etc/yum.repos.d/ambari.repo
(不用拷贝)
2、拷贝到Linux的系统目录/etc/yum.repos.d/
将下载的ambari.repo文件拷贝到Linux的系统目录/etc/yum.repos.d/,拷贝完后,我们需要获取该公共库的所有的源文件列表。
3、查看
yum clean all
yum list|grep ambari
如果可以看到Ambari的对应版本的安装包列表,说明公共库已配置成功。然后就可以安装Ambari的package了。
4、安装
yum install ambari-server
5、配置
ambari-server setup
在这个交互式的设置中,采用默认配置即可。Ambari会使用Postgres数据库,默认会安装并使用Oracle的JDK。默认设置了Ambari GUI的登录用户为admin/admin。并且指定Ambari Server的运行用户为root。
备注(详细的设置过程):
旧:
[root@master~]# amari-server setup
bash:amari-server: command not found
[root@master~]# ambari-server setup
Usingpython /usr/bin/python2.6
Setupambari-server
CheckingSELinux...
SELinuxstatus is 'enabled'
SELinuxmode is 'permissive'
WARNING:SELinux is set to 'permissive' mode and temporarily disabled.
OK tocontinue [y/n] (y)? y
Customizeuser account for ambari-server daemon [y/n] (n)? y
Enteruser account for ambari-server daemon (root):
Adjustingambari-server permissions and ownership...
Checkingiptables...
CheckingJDK...
[1]Oracle JDK 1.7
[2]Oracle JDK 1.6
[3] -Custom JDK
==============================================================================
Enterchoice (1):
To downloadthe Oracle JDK and the Java Cryptography Extension (JCE) Policy Files you mustaccept the license terms found athttp://www.oracle.com/technetwork/java/javase/terms/license/index.html and notaccepting will cancel the Ambari Server setup and you must install the JDK andJCE files manually.
Doyou accept the Oracle Binary Code License Agreement [y/n] (y)?
DownloadingJDK fromhttp://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u67-linux-x64.tar.gz to/var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz
jdk-7u67-linux-x64.tar.gz...100% (135.8 MB of 135.8 MB)
Successfullydownloaded JDK distribution to/var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz
InstallingJDK to /usr/jdk64/
Successfullyinstalled JDK to /usr/jdk64/
DownloadingJCE Policy archive fromhttp://public-repo-1.hortonworks.com/ARTIFACTS/UnlimitedJCEPolicyJDK7.zip to/var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
UnlimitedJCEPolicyJDK7.zip...100%
Successfullydownloaded JCE Policy archive to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
InstallingJCE policy...
Completingsetup...
Configuringdatabase...
Enteradvanced database configuration [y/n] (n)?
Configuringdatabase...
Defaultproperties detected. Using built-in database.
Configuringambari database...
CheckingPostgreSQL...
Runninginitdb: This may take upto a minute.
Initializingdatabase: [ OK ]
Aboutto start PostgreSQL
Configuringlocal database...
Connectingto local database...done.
ConfiguringPostgreSQL...
RestartingPostgreSQL
Extractingsystem views...
.ambari-admin-2.0.1.45.jar
..
Adjustingambari-server permissions and ownership...
AmbariServer 'setup' completed successfully.
[root@master~]#
新:
[root@masterszx]# ambari-server setup
Usingpython /usr/bin/python
Setupambari-server
CheckingSELinux...
SELinuxstatus is 'disabled'
Customizeuser account for ambari-server daemon [y/n] (n)? y
Enteruser account for ambari-server daemon (szx):admin
Adjustingambari-server permissions and ownership...
Checkingfirewall status...
CheckingJDK...
[1]Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
[2]Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
[3]Custom JDK
==============================================================================
Enterchoice (1): 1
Todownload the Oracle JDK and the Java Cryptography Extension (JCE) Policy Filesyou must accept the license terms found athttp://www.oracle.com/technetwork/java/javase/terms/license/index.html and notaccepting will cancel the Ambari Server setup and you must install the JDK andJCE files manually.
Doyou accept the Oracle Binary Code License Agreement [y/n] (y)? y
DownloadingJDK fromhttp://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u77-linux-x64.tar.gz to/var/lib/ambari-server/resources/jdk-8u77-linux-x64.tar.gz
jdk-8u77-linux-x64.tar.gz...100% (173.0 MB of 173.0 MB)
Successfullydownloaded JDK distribution to/var/lib/ambari-server/resources/jdk-8u77-linux-x64.tar.gz
InstallingJDK to /usr/jdk64/
Successfullyinstalled JDK to /usr/jdk64/
DownloadingJCE Policy archive fromhttp://public-repo-1.hortonworks.com/ARTIFACTS/jce_policy-8.zip to /var/lib/ambari-server/resources/jce_policy-8.zip
Successfullydownloaded JCE Policy archive to/var/lib/ambari-server/resources/jce_policy-8.zip
InstallingJCE policy...
Completingsetup...
Configuringdatabase...
Enteradvanced database configuration [y/n] (n)? y
Configuringdatabase...
==============================================================================
Chooseone of the following options:
[1] -PostgreSQL (Embedded)
[2] -Oracle
[3] -MySQL / MariaDB
[4] -PostgreSQL
[5] -Microsoft SQL Server (Tech Preview)
[6] -SQL Anywhere
[7] -BDB
==============================================================================
Enterchoice (1):
Databasename (ambari):
Postgresschema (ambari):
Username(ambari):
EnterDatabase Password (bigdata):
Defaultproperties detected. Using built-in database.
Configuringambari database...
CheckingPostgreSQL...
Runninginitdb: This may take up to a minute.
Initializingdatabase: [ OK ]
Aboutto start PostgreSQL
Configuringlocal database...
Connectingto local database...done.
ConfiguringPostgreSQL...
RestartingPostgreSQL
Extractingsystem views...
....ambari-admin-2.4.0.1.1.jar
.......
Adjustingambari-server permissions and ownership...
AmbariServer 'setup' completed successfully.
[root@masterszx]#
6、说明
上个过程,对JDK进行了更新
7、启动
ambari-server start
三、网页配置
参照教程:
Ambari 2.1安装HDP2.3.2 之 六、安装部署HDP集群 详细步骤
http://blog.csdn.net/sinat_28224453/article/details/51538449
相关错误修改参照博客:
http://blog.csdn.net/wang_zhenwei
Ambari和HDP升级:
http://blog.csdn.net/wang_zhenwei/article/details/53187272
附录:如果master安装成功,但是slave1和slave2安装失败,并提示镜像不可用,可以尝试,yum clean all。
- Ambari学习15_CentOS6.5下安装Ambari2.4全过程
- Linux学习15_CentOS6.5下netcat工具安装教程
- Python学习4_CentOS6.5下Pip8.1.1安装
- CentOS学习3_CentOS6.5下安装Eclipse
- Hive学习6_CentOS6.5下Hive2.1安装
- Hbase学习1_CentOS6.5下Hbase1.1.2安装
- Python学习3_CentOS6.5下Python2.7.11安装
- Flume学习4_CentOS6.5下,Flume安装及配置详细教程-存疑版
- ES-MongoDB学习7_CentOS6.5下Mongo-connector的安装和操作
- Docker学习1_CentOS6下docker的安装和使用
- Hadoop学习4_CentOS6.5系统下Hadoop2.6.0集群增加机器详细操作
- MongoDB学习4_CentOS6.5系统下,MongoDB之Replica Set集群搭建
- 大数据平台安装部署文档 Ambari2.4-HDP2.5
- Hadoop学习6_CentOS6.5系统下Hadoop2.6.0完全分布式环境安装与配置信息介绍
- centos7(vm)下安装Ambari2.4.0(x86)
- MVN学习1_Centos6.6安装Maven
- ubuntu14安装ambari2.2
- 编译安装Ambari2.5.0
- [Oracle]如果表存在则删除重新创建
- UGUI提高<一> Scroll View参数详解
- linux 磁盘加密漏洞 -2
- 前端思考与总结--页面不止UI画出来的美
- spring事物控制--HibernateTransactionManager
- Ambari学习15_CentOS6.5下安装Ambari2.4全过程
- c++::浅析c++异常
- 118. Pascal's Triangle
- 学习前端模板引擎 jade (一)
- luajit官方性能优化指南和注解
- 动态库DLL回调函数实现
- java中的比较排序
- 机器人时代已来?银行客服机器人受热捧
- Android图表库MPAndroidChart(五)——自定义MarkerView实现选中高亮