1, I am here with three virtual machine CentOS 6.4 64-bit operating system, one to do master, two to do slave
2, three machines are installed JDK, my version here is 7_79, the same is 64-bit
3, modify hostname (very critical, because only the generated Ssh-keygen will be used) in the/etc/sysconfig/network file to modify, while adding Hosts file, in the/etc/hosts file modification, My three nodes here are the two files, respectively:
4, the generation of SSH no key remote access files, and placed in the three nodes within the unified: (The three nodes in advance of the firewall are closed, must pay attention to)
Here the unification uses the root user to operate, carries on the command in three nodes respectively: ssh-keygen-t RSA, then three returns, then will produce two files in the/root/.ssh/directory:
Then execute the command to save the public key individually: CP id_rsa.pub Authorized_keys, then/root/.ssh/directory:
The key files are then remotely copied to Master in the/root/.ssh/directory of Slaver1 and Slaver2, using the command: SCP Authorized_keys root@master.busymonkey:/root/.ssh /s1_keys and SCP Authorized_keys Root@master.busymonkey:/root/.ssh/s2_keys.
Then the master node's/root/.ssh/directory will be like this:
Then append the two copied key files to master's Authorized_keys file, using the command: Cat S1_keys >> Authorized_keys and Cat S2_keys >> Authorized_keys
Finally, the remote copy of master's Authorized_keys file is overwritten to two slaver, the order is: SCP Authorized_keys root@slaver1.busymonkey:/root/.ssh/ Authorized_keys and SCP Authorized_keys Root@slaver2.busymonkey:/root/.ssh/authorized_keys.
This is done, you can test the three nodes can log on to each other: SSH Master.busymonkey, exit with: Exit.
5, then you can install the Ambari on the master node, where I installed the smallest system, you may have to install wget, with: Yum install wget to install.
Then get the Ambari Common library file (public repository). Log on to the Linux host and execute the following commands (you can also download them manually):
wget Http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.0.1/ambari.repo
Copy the downloaded Ambari.repo file to the Linux system directory/etc/yum.repos.d/. After the copy is finished, we need to get a list of all the source files for the public library. Execute the following command in turn.
Yum Clean all
yum list|grep Ambari
As shown in Figure 1:
If you can see the Ambari version of the installation package list, the public library has been configured successfully. Then you can install the Ambari package. Perform the following command to install Ambari Server to the machine.
Yum Install Ambari-server
After the installation is complete, you will need to make a simple configuration of Ambari Server. Execute the following command.
Amari-server Setup
In this interactive setting, you can use the default configuration. Ambari will use the Postgres database, and the Oracle JDK will be installed and used by default. The Ambari GUI's login user is admin/admin by default. and specifies that the running user of Ambari Server is root.
[Root@hadoop1 ~]# ambari-server Setup
Using python/usr/bin/python2.6
Setup Ambari-server
Checking SELinux ...
SELinux the status is ' enabled '
SELinux mode is ' enforcing '
Temporarily disabling SELinux
Warning:selinux is set to ' permissive ' mode and temporarily disabled.
OK to continue [y/n] (y)? Y
Customize user account for Ambari-server daemon [y/n] (n)?
Adjusting ambari-server permissions and ownership ...
Checking iptables ...
Warning:iptables is running. Confirm the necessary Ambari ports are accessible. Refer to the "Ambari documentation for more details on ports.
OK to continue [y/n] (y)?
Checking JDK ...
[1] Oracle JDK 1.7
[2] Oracle JDK 1.6
[3]-Custom JDK
==============================================================================
Enter Choice (1): 1
To download the Oracle JDK and the Java Cryptography Extension (JCE) Policy Files for you must accept the license terms found At http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting'll cancel the Ambari Server Setup and you must install the JDK and JCE files manually.
Do you accept the Oracle Binary Code License Agreement [y/n] (y)?
Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u67-linux-x64.tar.gz to/var/lib/ Ambari-server/resources/jdk-7u67-linux-x64.tar.gz
Only the majority of them are the default, it's OK.
After the simple setup configuration is complete. You can start the Ambari. Run the following command.
Ambari-server start
After the Ambari Server is successfully started, you can log in from the browser and the default port is 8080. Take this environment as an example, enter http://zwshen37.example.com:8080 in the address bar of the browser, and the login password is admin/admin. The page following the login Ambari is shown below.
Ambari Offline installation HDP:
The following is the download address for the local source file:
Ambari installation Package
Http://public-repo-1.hortonworks.com/ambari/centos6/ambari-1.7.0-centos6.tar.gz
HDP (Hortonworks Data Platform)
Http://public-repo-1.hortonworks.com/HDP/centos6/HDP-2.2.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
Note: You can directly modify the version number in the link to obtain the required version
The master host installs the HTTPD service, and a new folder is generated:
Copy your own downloaded two file local source files to the HTML directory of this folder and unzip:
The master host then starts the HTTPD service: Services httpd start
You can now access the source file address that is opened on the virtual machine Master host in the host browser:
Now officially start configuration:
Wait................
If the halfway encounter failure, click on the retry, I was ordered 3 times retry to all successful.
Here are some warnings, point open, according to the above flow down, generally there will be two problems, one is THP, one is the problem of NTP:
For the first question, enter the following command under four Linux:
Echo never >/sys/kernel/mm/redhat_transparent_hugepage/defrag
Echo never >/sys/kernel/mm/redhat_ Transparent_hugepage/enabled
Echo never >/sys/kernel/mm/transparent_hugepage/enabled
Echo never >/ Sys/kernel/mm/transparent_hugepage/defrag
If the first warning still exists, then it is only a few more steps to restart the master host: Ambari-server restart, which will restart the configuration of HDP.
In this way, the first warning is gone:
For the second warning, because the four-node machine does not have time to sync the service, run the command to install and open the service: Yum-y install NTP and services ntpd start
Then return check. If not, click on the third part, and then:
Then it's OK, no warning:
Select the services to install, here I do not configure high, I chose the most basic, in fact, you can add later.
Then by default you can:
Wait.........................
May encounter many times in the middle of failure, nothing, again, because HDP with the local source installation, but Ambari with the online installation, sometimes the network will fail.
At this point, the Platform basic platform is finished, then can install some other service according to need.