Contents
Apache Ambari
https://ambari.apache.org/
test on
- ubuntu-14.04.3-desktop-amd64
- Ambari 2.1.2
1. Download
2. Install, Setup, and Start Ambari Server
2.1 Install Ambari Server
2.2 Setup Ambari Server
2.3 Start Ambari Server
3. Deploy Cluster using Ambari Web UI
Note: Ambari currently supports the 64-bit version of the following Operating Systems:
- RHEL (Redhat Enterprise Linux) 5 and 6
- CentOS 5 and 6
- OEL (Oracle Enterprise Linux) 5 and 6
- SLES (SuSE Linux Enterprise Server) 11
- Ubuntu 12 and 14
- Debian 7
1. Download
Download the Ambari repository on the Ambari Server host
list /etc/apt/sources.list.d/
directory contents
1 2 3 |
$ cd /etc/apt/sources.list.d/ $ ls -l total 0 |
download Ambari source list
1 2 3 4 5 6 7 8 9 |
$ sudo wget http://public-repo-1.hortonworks.com/ambari/ubuntu14/2.x/updates/2.1.2/ambari.list --2015-11-26 15:42:38-- http://public-repo-1.hortonworks.com/ambari/ubuntu14/2.x/updates/2.1.2/ambari.list Resolving public-repo-1.hortonworks.com (public-repo-1.hortonworks.com)... 204.246.164.115, 204.246.164.121, 54.192.149.144, ... Connecting to public-repo-1.hortonworks.com (public-repo-1.hortonworks.com)|204.246.164.115|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 113 [binary/octet-stream] Saving to: ‘ambari.list’ 100%[=========================================================================================>] 113 --.-K/s in 0s 2015-11-26 15:42:38 (22.2 MB/s) - ‘ambari.list’ saved [113/113] |
1 2 3 4 5 6 |
$ ls -l total 4 -rw-r--r-- 1 root root 113 ต.ค. 3 02:33 ambari.list $ cat ambari.list #VERSION_NUMBER=2.1.2-377 deb http://public-repo-1.hortonworks.com/ambari/ubuntu14/2.x/updates/2.1.2 Ambari main |
2. Install, Setup, and Start Ambari Server
Install Ambari Server from the public Ambari repository:
2.1 Install Ambari Server
1 2 3 4 5 6 |
$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com B9733A7A07513CAD Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.YMqGEVLD3T --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --recv-keys --keyserver keyserver.ubuntu.com B9733A7A07513CAD gpg: requesting key 07513CAD from hkp server keyserver.ubuntu.com gpg: key 07513CAD: public key "Jenkins (HDP Builds) <jenkin@hortonworks.com>" imported gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
$ apt-get update $ apt-get install ambari-server Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libpq5 postgresql postgresql-9.3 postgresql-client-9.3 postgresql-client-common postgresql-common Suggested packages: oidentd ident-server locales-all postgresql-doc-9.3 The following NEW packages will be installed: ambari-server libpq5 postgresql postgresql-9.3 postgresql-client-9.3 postgresql-client-common postgresql-common 0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded. Need to get 404 MB of archives. After this operation, 452 MB of additional disk space will be used. Do you want to continue? [Y/n] y ... Setting up postgresql (9.3+154ubuntu1) ... Setting up ambari-server (2.1.2-377) ... update-rc.d: warning: /etc/init.d/ambari-server missing LSB information update-rc.d: see <http://wiki.debian.org/LSBInitScripts> Adding system startup for /etc/init.d/ambari-server ... /etc/rc0.d/K20ambari-server -> ../init.d/ambari-server /etc/rc1.d/K20ambari-server -> ../init.d/ambari-server /etc/rc6.d/K20ambari-server -> ../init.d/ambari-server /etc/rc2.d/S20ambari-server -> ../init.d/ambari-server /etc/rc3.d/S20ambari-server -> ../init.d/ambari-server /etc/rc4.d/S20ambari-server -> ../init.d/ambari-server /etc/rc5.d/S20ambari-server -> ../init.d/ambari-server Processing triggers for libc-bin (2.19-0ubuntu6.6) ... |
2.2 Setup Ambari Server
Run the setup command to configure your Ambari Server, Database, JDK, LDAP, and other options:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
jack@jack14x64:~$ sudo ambari-server setup Using python /usr/bin/python2.7 Setup ambari-server Checking SELinux... WARNING: Could not run /usr/sbin/sestatus: OK Customize user account for ambari-server daemon [y/n] (n)? y Enter user account for ambari-server daemon (root):hduser 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): 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)? y Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u40-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-8u40-linux-x64.tar.gz jdk-8u40-linux-x64.tar.gz... 100% (165.2 MB of 165.2 MB) Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-8u40-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)? n Configuring database... Default properties detected. Using built-in database. Configuring ambari database... Checking PostgreSQL... About to start PostgreSQL Configuring local database... Connecting to local database...done. Configuring PostgreSQL... Extracting system views... ..ambari-admin-2.1.2.377.jar .... Adjusting ambari-server permissions and ownership... Ambari Server 'setup' completed successfully. |
2.3 Start Ambari Server
Start Ambari Server:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
jack@jack14x64:~$ ambari-server start /usr/sbin/ambari-server: line 53: /var/lib/ambari-server/ambari-env.sh: Permission denied Using python /usr/bin/python2.7 Starting ambari-server ERROR: Unexpected IOError: [Errno 13] Permission denied: '/etc/ambari-server/conf/password.dat' For more info run ambari-server with -v or --verbose option jack@jack14x64:~$ sudo ambari-server start Using python /usr/bin/python2.7 Starting ambari-server Ambari Server running with administrator privileges. About to start PostgreSQL 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. jack@jack14x64:~$ |
3. Deploy Cluster using Ambari Web UI
Open up a web browser and go to http://<ambari-server-host>:8080
.
Log in with username admin and password admin and follow on-screen instructions.