BG13: Ambari Kurulumu

Cluster planında Ambari/Edge Server olarak belirlediğimiz node3 sunucusuna bağlanıyoruz. Kurulumdan kastım; tarayıcıda http://node3.datalonga.com:8080 yazdığımızda karşımıza Ambari arayüzünün çıkmasını sağayacak herşeydir. Bu kurulum 3 aşamada olacak:

  1. Ambari Yükleme
  2. Ambari Kurma
  3. Ambari Çalıştırma

1. Ambari Yükleme (İşin Türkçesi Install Ambari )

O kadar hazırlık yaptık değil mi? Şimdi bir komutla yükleyelim artık. yum -y install ambari-server diyoruz ve arkamıza yaslanıyoruz.

[root@node3 ~]# yum -y install ambari-server
Loaded plugins: fastestmirror
Updates-Ambari-2.5.2.0                                                                                                | 2.9 kB  00:00:00
Loading mirror speeds from cached hostfile
 * base: mirror.rackdc.com
 * epel: mirror.veriteknik.net.tr
 * extras: mirror.rackdc.com
 * updates: mirror.saglayici.com
Resolving Dependencies
--> Running transaction check
---> Package ambari-server.x86_64 0:2.5.2.0-298 will be installed
--> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-2.5.2.0-298.x86_64
--> Running transaction check
---> Package postgresql-server.x86_64 0:9.2.23-1.el7_4 will be installed
--> Processing Dependency: postgresql-libs(x86-64) = 9.2.23-1.el7_4 for package: postgresql-server-9.2.23-1.el7_4.x86_64
--> Processing Dependency: postgresql(x86-64) = 9.2.23-1.el7_4 for package: postgresql-server-9.2.23-1.el7_4.x86_64
--> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-9.2.23-1.el7_4.x86_64
--> Running transaction check
---> Package postgresql.x86_64 0:9.2.23-1.el7_4 will be installed
---> Package postgresql-libs.x86_64 0:9.2.23-1.el7_4 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================
 Package                            Arch                    Version                            Repository                               Size
=============================================================================================================================================
Installing:
 ambari-server                      x86_64                  2.5.2.0-298                        Updates-Ambari-2.5.2.0                  716 M
Installing for dependencies:
 postgresql                         x86_64                  9.2.23-1.el7_4                     updates                                 3.0 M
 postgresql-libs                    x86_64                  9.2.23-1.el7_4                     updates                                 233 k
 postgresql-server                  x86_64                  9.2.23-1.el7_4                     updates                                 3.8 M

Transaction Summary
=============================================================================================================================================
Install  1 Package (+3 Dependent packages)

Total size: 723 M
Installed size: 823 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/Updates-Ambari-2.5.2.0/packages/ambari-server-2.5.2.0-298.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 07513cad: NOKEY
Retrieving key from http://node3.datalonga.com/Ambari-2.5.2.0/centos7/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
Importing GPG key 0x07513CAD:
 Userid     : "Jenkins (HDP Builds) <jenkin@hortonworks.com>"
 Fingerprint: df52 ed4f 7a3a 5882 c099 4c66 b973 3a7a 0751 3cad
 From       : http://node3.datalonga.com/Ambari-2.5.2.0/centos7/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : postgresql-libs-9.2.23-1.el7_4.x86_64     1/4
  Installing : postgresql-9.2.23-1.el7_4.x86_64          2/4
  Installing : postgresql-server-9.2.23-1.el7_4.x86_64   3/4
  Installing : ambari-server-2.5.2.0-298.x86_64          4/4
  Verifying  : postgresql-libs-9.2.23-1.el7_4.x86_64     1/4
  Verifying  : postgresql-9.2.23-1.el7_4.x86_64          2/4
  Verifying  : postgresql-server-9.2.23-1.el7_4.x86_64   3/4
  Verifying  : ambari-server-2.5.2.0-298.x86_64          4/4

Installed:
  ambari-server.x86_64 0:2.5.2.0-298

Dependency Installed:
  postgresql.x86_64 0:9.2.23-1.el7_4        postgresql-libs.x86_64 0:9.2.23-1.el7_4        postgresql-server.x86_64 0:9.2.23-1.el7_4

Complete!

2. Ambari Kurulumu (İşin Tükçesi setup)

Ambari kurulumu aslında hangi database kullanayım, nereye kurayım, şema ne olsun, hangi java versiyonu olsun, javayı sen kurmadıysan ben Oracle java kurarım haaa… gibi bir sürü seçeneği tercih etmeyi gerektiriyor. Ben varsayılan olarak kurmasını isteyeceğim bunun için  -s: sessizce herşeyi varsayılan kur diyorum.

[root@node3 ~]# ambari-server setup -s
Using python  /usr/bin/python
Setup ambari-server
Checking SELinux...
SELinux status is 'disabled'
Customize user account for ambari-server daemon [y/n] (n)?
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):
To download the Oracle JDK and the Java Cryptography Extension (JCE) Policy Files you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will 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-8u112-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-8u112-linux-x64.tar.gz
jdk-8u112-linux-x64.tar.gz... 100% (174.7 MB of 174.7 MB)
Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-8u112-linux-x64.tar.gz
Installing JDK to /usr/jdk64/
Successfully installed JDK to /usr/jdk64/
Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/jce_policy-8.zip to /var/lib/ambari-server/resources/jce_policy-8.zip

Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/jce_policy-8.zip
Installing JCE policy...
Completing setup...
Configuring database...
Enter advanced database configuration [y/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.5.2.0.298.jar
...........
Adjusting ambari-server permissions and ownership...
Ambari Server 'setup' completed successfully.

Alternatif olarak sadece ambari-server setup deyip size sorulan sorulara yanıt vererek de devam edebilirsiniz. Yalnızca JAVA_HOME için 170 küsür MB indirmek yerine mevcut javayı kullanmak istayaebilirsiniz. Bunun için size JAVA_HOME sorduğunda 3’ü tercih edip path girebilirsiniz (/usr/lib/jvm/jre-1.8.0-openjdk) Biz sunucu hazırlarken bu versiyonu kurmuştuk. Burada bin dosyasını path’e dahil etmemek gerekir.

3. Ambari Çalıştırma

Başarılı bir kurulumun ardından Ambari’yi çalıştıralım.

[root@node3 ~]# 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....................................
Server started listening on 8080

DB configs consistency check: no errors and warnings were found.
Ambari Server 'start' completed successfully.

Gördüğümüz gibi sorunsuz çalıştı. Biz yine de “Çalışıyon mu la?” diye bir soralım kendisine.

[root@node3 ~]# ambari-server status
Using python  /usr/bin/python
Ambari-server status
Ambari Server running
Found Ambari Server PID: 2964 at: /var/run/ambari-server/ambari-server.pid

“Evet çaılıyorum” diye aldık cevabımızı.

Evet şimdi en heyecanlı yanı. Ambari’yi bizzat göreceğiz. Tarayıcıya gidip http://node3.datalonga.com:8080 yazınız ve aşapıdaki ekranı görünüz.

Yuppi!!!!

admin admin standart kullanıcı adı ve parola ile giriş yapalım.

Bu iş gittikçe renklenmeye başladı. Ambari yükleme, kurulum ve çalıştırması işi de bu kadar arkadaşlar. Bir sonraki yazıda Ambari ile cluster kurmaya başlayacağız.

Kapak resmi: https://www.redbubble.com/people/yourgeekside/works/26688627-apache-ambari?p=sticker adresinden alınmıştır.


Yazar Hakkında
Toplam 177 yazı
Erkan ŞİRİN
Erkan ŞİRİN
10 yılı aşkın süredir yurtiçi ve yurtdışında sektörde büyük veri mühendisliği, platform yönetimi ve makine öğrenmesi ile ilgili çalışmalar yürütmekte ve aynı zamanda birçok kurum ve şirkete danışmanlık ve eğitimler vermektedir. Çalışma alanları: Data ve MLOps platformları, gerçek zamanlı veri işleme, değişen veriyi yakalama (CDC) ve Lakehouse.
Yorumlar (Yorum yapılmamış)

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

×

Bir Şeyler Ara