* System Environment:centOS6.7
1.Prepare the Environment
1)Set Up Password-less SSH : (Generate public and private SSH keys on the Ambari Server host.)
cd ~ ssh-keygen
will generate id_rsa id_rsa.pub under .ssh folder.
Do the below command on Ambari server:
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
Do command oneach target hosts:
scp ~/.ssh/authorized_keys slave-1:/root/.ssh/ scp ~/.ssh/authorized_keys slave-2:/root/.ssh/
Do command on each host(include Ambari server)
chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys
From the Ambari Server, make sure you can connect to each host in the cluster using SSH, without having to enter a password. If the following warning message displays during your first connection: Are you sure you want to continue
connecting (yes/no)? Enter Yes .
Note:It is possible to use a non-root SSH account, if that account can execute sudowithout entering a password.
2) Enable NTP on the Cluster and on the Browser Host
chkconfig --list ntpdchkconfig ntpd onservice ntpd start
3) Check DNS and NSCD
3.1) HostName
Add a line for each host in your cluster. The line should consist of the IP address and the FQDN
vi /etc/hosts
Use the "hostname" command to set the hostname on each host in your cluster. Fo example:
Confirm that the hostname is set by running the following command:
hostname -f
This should return the <fully.qualified.domain.name> you just set. e.g:
3.2)Edit the Network Configuration File
vi /etc/sysconfig/network
Modify the HOSTNAME property to set the fully qualified domain name.
NETWORKING=yesHOSTNAME=Master
3.3)Configuring iptables
chkconfig iptables off/etc/init.d/iptables stop
3.4) Disable SELinux and PackageKit and check the umask Value
setenforce 0
vi /etc/selinux/configvi /etc/yum/pluginconf.d/refresh-packagekit.conf
umask 0022 echo umask 0022 >> /etc/profile
Okay. Now .You finished the environment prepared.
Let's begin to install Ambari.
Step1: Download the Ambari repository on the Ambari Server host
cd /etc/yum.repos.d/wget http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.2.1.0/ambari.repo
Step 2: Install, Setup, and Start Ambari Server
yum install ambari-server ambari-server setup ambari-server start
Open up a web browser and go to http://<ambari-server-host>:8080.
相关参考:
1.安装ambari:
2. 安装 agent问题 解决
3.删除用户 等
4.解决issue:
解决办法,在Linux下执行:
echo never > /sys/kernel/mm/redhat_transparent_hugepage/defragecho never > /sys/kernel/mm/redhat_transparent_hugepage/enabledecho never > /sys/kernel/mm/transparent_hugepage/enabledecho never > /sys/kernel/mm/transparent_hugepage/defrag