Ambari安裝之安裝並配置Ambari-server(三)


 

  不多說,直接上干貨!

 

 

 

   前期博客

 Ambari安裝之部署本地庫(鏡像服務器)(二)

 

 

 

 

安裝並配置Ambari-server

(1)檢查倉庫是否可用

 

[hadoop@ambari01 yum.repos.d]$ pwd
/etc/yum.repos.d
[hadoop@ambari01 yum.repos.d]$ yum repolist
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: centos.ustc.edu.cn
 * extras: centos.ustc.edu.cn
 * updates: mirrors.zju.edu.cn
Updates-ambari-2.2.1.0                                                                                                                                                  | 2.9 kB     00:00     
Updates-ambari-2.2.1.0/primary_db                                                                                                                                       |  89 kB     00:00     
repo id                                                                                    repo name                                                                                     status
Updates-ambari-2.2.1.0                                                                     ambari-2.2.1.0 - Updates                                                                        229
base                                                                                       CentOS-6 - Base                                                                               6,696
extras                                                                                     CentOS-6 - Extras                                                                                64
updates                                                                                    CentOS-6 - Updates                                                                              974
repolist: 7,963
[hadoop@ambari01 yum.repos.d]$ 

 

 

 

 

(2)安裝Ambari-server

 

 

[hadoop@ambari01 yum.repos.d]$ pwd
/etc/yum.repos.d
[hadoop@ambari01 yum.repos.d]$ sudo yum install ambari-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.zju.edu.cn
 * extras: mirrors.zju.edu.cn
 * updates: mirrors.zju.edu.cn
Updates-ambari-2.2.1.0                                                                                                                                                  | 2.9 kB     00:00     
Updates-ambari-2.2.1.0/primary_db                                                                                                                                       |  89 kB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package ambari-server.x86_64 0:2.2.1.0-161 will be installed
--> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-2.2.1.0-161.x86_64
--> Running transaction check
---> Package postgresql-server.x86_64 0:8.4.20-6.el6 will be installed
--> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-6.el6 for package: postgresql-server-8.4.20-6.el6.x86_64
--> Processing Dependency: postgresql(x86-64) = 8.4.20-6.el6 for package: postgresql-server-8.4.20-6.el6.x86_64
--> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-8.4.20-6.el6.x86_64
--> Running transaction check
---> Package postgresql.x86_64 0:8.4.20-6.el6 will be installed
---> Package postgresql-libs.x86_64 0:8.4.20-6.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================
 Package                                         Arch                                 Version                                       Repository                                            Size
===============================================================================================================================================================================================
Installing:
 ambari-server                                   x86_64                               2.2.1.0-161                                   Updates-ambari-2.2.1.0                               409 M
Installing for dependencies:
 postgresql                                      x86_64                               8.4.20-6.el6                                  base                                                 2.6 M
 postgresql-libs                                 x86_64                               8.4.20-6.el6                                  base                                                 202 k
 postgresql-server                               x86_64                               8.4.20-6.el6                                  base                                                 3.4 M

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

Total download size: 415 M
Installed size: 464 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): ambari-server-2.2.1.0-161.x86_64.rpm                                                                                                                             | 409 MB     00:22     
(2/4): postgresql-8.4.20-6.el6.x86_64.rpm                                                                                                                               | 2.6 MB     00:02     
(3/4): postgresql-libs-8.4.20-6.el6.x86_64.rpm                                                                                                                          | 202 kB     00:00     
(4/4): postgresql-server-8.4.20-6.el6.x86_64.rpm                                                                                                                        | 3.4 MB     00:03     
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                           14 MB/s | 415 MB     00:29     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : postgresql-libs-8.4.20-6.el6.x86_64                                                                                                                                         1/4 
  Installing : postgresql-8.4.20-6.el6.x86_64                                                                                                                                              2/4 
  Installing : postgresql-server-8.4.20-6.el6.x86_64                                                                                                                                       3/4 
  Installing : ambari-server-2.2.1.0-161.x86_64                                                                                                                                            4/4 
  Verifying  : postgresql-server-8.4.20-6.el6.x86_64                                                                                                                                       1/4 
  Verifying  : postgresql-8.4.20-6.el6.x86_64                                                                                                                                              2/4 
  Verifying  : postgresql-libs-8.4.20-6.el6.x86_64                                                                                                                                         3/4 
  Verifying  : ambari-server-2.2.1.0-161.x86_64                                                                                                                                            4/4 

Installed:
  ambari-server.x86_64 0:2.2.1.0-161                                                                                                                                                           

Dependency Installed:
  postgresql.x86_64 0:8.4.20-6.el6                           postgresql-libs.x86_64 0:8.4.20-6.el6                           postgresql-server.x86_64 0:8.4.20-6.el6                          

Complete!
[hadoop@ambari01 yum.repos.d]$ 

 

 

 

 

 

 

 

 

(3)配置Ambari-server

 

 

[hadoop@ambari01 yum.repos.d]$ pwd
/etc/yum.repos.d
[hadoop@ambari01 yum.repos.d]$ sudo ambari-server setup
Using python  /usr/bin/python2
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/jdk/jdk1.8.0_60
Validating JDK on Ambari Server...done.
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 upto a minute.
Initializing database: [  OK  ]

About to start PostgreSQL
Configuring local database...
Connecting to local database...done.
Configuring PostgreSQL...
Restarting PostgreSQL
Extracting system views...
.ambari-admin-2.2.1.0.161.jar
.....
Adjusting ambari-server permissions and ownership...
Ambari Server 'setup' completed successfully.
[hadoop@ambari01 yum.repos.d]$ 

 

           注意:

        如果你是root用戶,則這里就寫root (推薦)
        好比我這里是hadoop用戶,則這里就寫hadoop(不建議)

 

 

 

 

(4)查看並啟動Ambari-server

[hadoop@ambari01 yum.repos.d]$ sudo service ambari-server status
Using python  /usr/bin/python2
Ambari-server status
Ambari Server not running. Stale PID File at: /var/run/ambari-server/ambari-server.pid
[hadoop@ambari01 yum.repos.d]$ sudo service ambari-server start
Using python  /usr/bin/python2
Starting ambari-server
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
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....................
Ambari Server 'start' completed successfully.
[hadoop@ambari01 yum.repos.d]$ 

 

 

 

 

(5)在C:\Windows\System32\drivers\etc目錄下配置hosts文件

 

 

 

 

 

 

 

(6)輸入地址登錄ambari

 

 

 

默認的用戶名和密碼都為admin

 

 

 

 

 

登錄之后的界面如下

 

 

那么到此為止,我們集群部署前的所有准備工作就做好了,接下來我們就可以部署hadoop集群了。

 Ambari安裝之部署hdp單節點集群

 

 

 

 

 

 

 

 

 

 

歡迎大家,加入我的微信公眾號:大數據躺過的坑        人工智能躺過的坑
 
 
 

同時,大家可以關注我的個人博客

   http://www.cnblogs.com/zlslch/   和     http://www.cnblogs.com/lchzls/      http://www.cnblogs.com/sunnyDream/   

   詳情請見:http://www.cnblogs.com/zlslch/p/7473861.html

 

  人生苦短,我願分享。本公眾號將秉持活到老學到老學習無休止的交流分享開源精神,匯聚於互聯網和個人學習工作的精華干貨知識,一切來於互聯網,反饋回互聯網。
  目前研究領域:大數據、機器學習、深度學習、人工智能、數據挖掘、數據分析。 語言涉及:Java、Scala、Python、Shell、Linux等 。同時還涉及平常所使用的手機、電腦和互聯網上的使用技巧、問題和實用軟件。 只要你一直關注和呆在群里,每天必須有收獲

 

      對應本平台的討論和答疑QQ群:大數據和人工智能躺過的坑(總群)(161156071) 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM