HDP-2.6.1安装

1、首先安装HDP的Ambari仓库文件到本机的/etc/yum.repos.d/ambari.repo路径下

[root@h1 hdp-2.6.1]# wget -nv http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.6.1.0/ambari.repo -O /etc/yum.repos.d/ambari.repo
2018-03-10 16:04:25 URL:http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.6.1.0/ambari.repo [306/306] -> "/etc/yum.repos.d/ambari.repo" [1]

 2、检查并确认Ambari仓库是否可用

[root@h1 hdp-2.6.1]# yum repolist
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.neusoft.edu.cn
 * extras: mirrors.163.com
 * updates: mirrors.163.com
ambari-2.6.1.0                                                                                                                                                                                                                                         | 2.9 kB     00:00     
ambari-2.6.1.0/primary_db                                                                                                                                                                                                                              | 8.6 kB     00:00     
base                                                                                                                                                                                                                                                   | 3.7 kB     00:00     
extras                                                                                                                                                                                                                                                 | 3.4 kB     00:00     
updates                                                                                                                                                                                                                                                | 3.4 kB     00:00     
updates/primary_db                                                                                                                                                                                                                                     | 6.4 MB     00:05     
repo id                                                                                                                    repo name                                                                                                                                    status
ambari-2.6.1.0                                                                                                             ambari Version - ambari-2.6.1.0                                                                                                                 12
base                                                                                                                       CentOS-6 - Base                                                                                                                              6,706
extras                                                                                                                     CentOS-6 - Extras                                                                                                                               52
updates                                                                                                                    CentOS-6 - Updates                                                                                                                             955
repolist: 7,725

 3、安装Ambari-Server

[root@h1 hdp-2.6.1]# yum install ambari-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.neusoft.edu.cn
 * extras: mirrors.163.com
 * updates: mirrors.163.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ambari-server.x86_64 0:2.6.1.0-143 will be installed
--> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-2.6.1.0-143.x86_64
--> Running transaction check
---> Package postgresql-server.x86_64 0:8.4.20-8.el6_9 will be installed
--> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-8.el6_9 for package: postgresql-server-8.4.20-8.el6_9.x86_64
--> Processing Dependency: postgresql(x86-64) = 8.4.20-8.el6_9 for package: postgresql-server-8.4.20-8.el6_9.x86_64
--> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-8.4.20-8.el6_9.x86_64
--> Running transaction check
---> Package postgresql.x86_64 0:8.4.20-8.el6_9 will be installed
---> Package postgresql-libs.x86_64 0:8.4.20-8.el6_9 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================================================
 Package                                                               Arch                                                       Version                                                            Repository                                                          Size
==============================================================================================================================================================================================================================================================================
Installing:
 ambari-server                                                         x86_64                                                     2.6.1.0-143                                                        ambari-2.6.1.0                                                     717 M
Installing for dependencies:
 postgresql                                                            x86_64                                                     8.4.20-8.el6_9                                                     updates                                                            2.6 M
 postgresql-libs                                                       x86_64                                                     8.4.20-8.el6_9                                                     updates                                                            202 k
 postgresql-server                                                     x86_64                                                     8.4.20-8.el6_9                                                     updates                                                            3.4 M

Transaction Summary
==============================================================================================================================================================================================================================================================================
Install       4 Package(s)

Total size: 724 M
Total download size: 717 M
Installed size: 810 M
Is this ok [y/N]: y
Downloading Packages:
http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.6.1.0/ambari/ambari-server-2.6.1.0-143.x86_64.rpm: [Errno 12] Timeout on http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.6.1.0/ambari/ambari-server-2.6.1.0-143.x86_64.rpm: (28, 'Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds')
Trying other mirror.


Error Downloading Packages:
  ambari-server-2.6.1.0-143.x86_64: failure: ambari/ambari-server-2.6.1.0-143.x86_64.rpm from ambari-2.6.1.0: [Errno 256] No more mirrors to try.
由于网络慢导致下载超时失败!

 下载ambari-server-2.6.1.0-143.x86_64.rpm到本地用yum localinstall ambari-server方式进行本地安装!

[root@h1 hdp-2.6.1]# yum localinstall ambari-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Local Package Process
Skipping: ambari-server, filename does not end in .rpm.
Nothing to do
[root@h1 hdp-2.6.1]# yum localinstall ambari-server-2.6.1.0-143.x86_64.rpm 
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Local Package Process
Examining ambari-server-2.6.1.0-143.x86_64.rpm: ambari-server-2.6.1.0-143.x86_64
Marking ambari-server-2.6.1.0-143.x86_64.rpm to be installed
Loading mirror speeds from cached hostfile
 * base: mirrors.neusoft.edu.cn
 * extras: mirrors.163.com
 * updates: mirrors.163.com
Resolving Dependencies
--> Running transaction check
---> Package ambari-server.x86_64 0:2.6.1.0-143 will be installed
--> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-2.6.1.0-143.x86_64
--> Running transaction check
---> Package postgresql-server.x86_64 0:8.4.20-8.el6_9 will be installed
--> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-8.el6_9 for package: postgresql-server-8.4.20-8.el6_9.x86_64
--> Processing Dependency: postgresql(x86-64) = 8.4.20-8.el6_9 for package: postgresql-server-8.4.20-8.el6_9.x86_64
--> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-8.4.20-8.el6_9.x86_64
--> Running transaction check
---> Package postgresql.x86_64 0:8.4.20-8.el6_9 will be installed
---> Package postgresql-libs.x86_64 0:8.4.20-8.el6_9 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================================================
 Package                                                          Arch                                                  Version                                                        Repository                                                                        Size
==============================================================================================================================================================================================================================================================================
Installing:
 ambari-server                                                    x86_64                                                2.6.1.0-143                                                    /ambari-server-2.6.1.0-143.x86_64                                                781 M
Installing for dependencies:
 postgresql                                                       x86_64                                                8.4.20-8.el6_9                                                 updates                                                                          2.6 M
 postgresql-libs                                                  x86_64                                                8.4.20-8.el6_9                                                 updates                                                                          202 k
 postgresql-server                                                x86_64                                                8.4.20-8.el6_9                                                 updates                                                                          3.4 M

Transaction Summary
==============================================================================================================================================================================================================================================================================
Install       4 Package(s)

Total size: 787 M
Installed size: 810 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : postgresql-libs-8.4.20-8.el6_9.x86_64                                                                                                                                                                                                                      1/4 
  Installing : postgresql-8.4.20-8.el6_9.x86_64                                                                                                                                                                                                                           2/4 
  Installing : postgresql-server-8.4.20-8.el6_9.x86_64                                                                                                                                                                                                                    3/4 
  Installing : ambari-server-2.6.1.0-143.x86_64                                                                                                                                                                                                                           4/4 
  Verifying  : postgresql-server-8.4.20-8.el6_9.x86_64                                                                                                                                                                                                                    1/4 
  Verifying  : postgresql-libs-8.4.20-8.el6_9.x86_64                                                                                                                                                                                                                      2/4 
  Verifying  : ambari-server-2.6.1.0-143.x86_64                                                                                                                                                                                                                           3/4 
  Verifying  : postgresql-8.4.20-8.el6_9.x86_64                                                                                                                                                                                                                           4/4 

Installed:
  ambari-server.x86_64 0:2.6.1.0-143                                                                                                                                                                                                                                          

Dependency Installed:
  postgresql.x86_64 0:8.4.20-8.el6_9                                                   postgresql-libs.x86_64 0:8.4.20-8.el6_9                                                   postgresql-server.x86_64 0:8.4.20-8.el6_9                                                  

Complete!

 4、配置Ambari-Server

[root@h1 hdp-2.6.1]# ambari-server setup
Using python  /usr/bin/python
Setup ambari-server
Checking SELinux...
SELinux status is 'disabled'
Customize user account for ambari-server daemon [y/n] (n)? y
Enter user account for ambari-server daemon (root):hadoop
Adjusting ambari-server permissions and ownership...
Checking firewall status...
Checking JDK...
[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
==============================================================================
Enter choice (1): 3
WARNING: JDK must be installed on all hosts and JAVA_HOME must be valid on all hosts.
WARNING: JCE Policy files are required for configuring Kerberos security. If you plan to use Kerberos,please make sure JCE Unlimited Strength Jurisdiction Policy Files are valid on all hosts.
Path to JAVA_HOME: /usr/local/softs/jdk1.8.0_151
Validating JDK on Ambari Server...done.
Checking GPL software agreement...
GPL License for LZO: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
Enable Ambari Server to download and install GPL Licensed LZO packages [y/n] (n)? n
Completing setup...
Configuring database...
Enter advanced database configuration [y/n] (n)? n
Configuring database...
Default properties detected. Using built-in database.
Configuring ambari database...
Checking PostgreSQL...
Running initdb: This may take up to a minute.
Initializing database: [  OK  ]

About to start PostgreSQL
Configuring local database...
Configuring PostgreSQL...
Restarting PostgreSQL
Creating schema and user...
done.
Creating tables...
done.
Extracting system views...
.ambari-admin-2.6.1.0.143.jar
..........
Adjusting ambari-server permissions and ownership...
Ambari Server 'setup' completed successfully.

 5、启动Ambari-Server

[root@h1 hdp-2.6.1]# service ambari-server start
Using python  /usr/bin/python
Starting ambari-server
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Ambari database consistency check started...
Server PID at: /var/run/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log
Waiting for server start............................................................ERROR: Exiting with exit code 1. 
REASON: Server not yet listening on http port 8080 after 50 seconds. Exiting. 此处提示启动超时50秒,我们通过jps查看ambari进程方式验证是否启动成功!
[root@h1 hdp-2.6.1]# jps
3673 Jps
3650 AmbariServer    AmbariServer进程表示启动成功!

6、访问http://h1:8080,用户名密码默认都是admin

 

posted @ 2018-03-12 22:47  孟尧  阅读(500)  评论(0编辑  收藏  举报