1.
Install the epel repository:
[NEON-RnD root@os3 ~]# yum
install epel-release
2.
Check ambari repository added in repo
list.
[NEON-RnD
root@os3 ~]# yum repolist
Loaded
plugins: product-id, refresh-packagekit, security, subscription-manager
This
system is not registered to Red Hat Subscription Management. You can use
subscription-manager to register.
repo
id repo
name status
HDP-2.2 HDP 191
HDP-UTILS-1.1.0.20 HDP-UTILS 42
rhel66 RHEL 6.6 3,913
repolist:
4,146
3.
If repo is not added then execute the following
command. It will add an ambari repository in “/etc/yum.repos.d/”.
[NEON-RnD
root@os3 ~]# cd /etc/yum.repos.d/
[NEON-RnD
root@os3 yum.repos.d]# wget http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.1.0/ambari.repo
4.
Install Ambari server using yum
command.
[NEON-RnD
root@os3 yum.repos.d]# yum install ambari-server
5.
Setup Ambari server using following
steps. We need to configure the database properties, user configuration, and
JDK configuration.
[NEON-RnD
root@os3 ~]# ambari-server setup
Using
python /usr/bin/python2.6
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):
Adjusting
ambari-server permissions and ownership...
Checking
firewall status...
Checking
JDK...
Do
you want to change Oracle JDK [y/n] (n)? y
[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/java/jdk1.7.0_67
Validating
JDK on Ambari Server...done.
Completing
setup...
Configuring
database...
Enter
advanced database configuration [y/n] (n)? y
Configuring
database...
==============================================================================
Choose
one of the following options:
[1]
- PostgreSQL (Embedded)
[2]
- Oracle
[3]
- MySQL
[4]
- PostgreSQL
[5]
- Microsoft SQL Server (Tech Preview)
==============================================================================
Enter
choice (1): 3
Hostname
(192.168.150.170):
Port
(3306):
Database
name (ambari):
Username
(root):
Enter
Database Password (bigdata):
Re-enter
password:
Configuring
ambari database...
Copying
JDBC drivers to server resources...
Configuring
remote database connection properties...
WARNING:
Before starting Ambari Server, you must run the following DDL against the
database to create the schema: /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
Proceed
with configuring remote database connection properties [y/n] (y)? y
Extracting
system views...
.......
Adjusting
ambari-server permissions and ownership...
Ambari
Server 'setup' completed successfully.
6. Ambari will
create an SQL file named /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql. We need to create a database
named ambari in MySQL following by executing this file. Also please ensure the necessary
privileges has granted to the user configured.
[NEON-RnD
root@os3 jdk1.7.0_67]# mysql -h 192.168.150.170 -u root -p
Enter
password:
mysql>
create database ambari;
Query
OK, 1 row affected (0.00 sec)
mysql>
mysql> grant all privileges on ambari.* to 'root'@'%' ;
Query
OK, 0 rows affected (0.00 sec)
[NEON-RnD
root@os3 ~]# mysql -h 192.168.150.170 -u root -p ambari < /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
7. All configurations
are done at this stage. It’s time to start the Ambari Server. Use following
command to start the server.
[NEON-RnD
root@os3 ~]# ambari-server start
Using
python /usr/bin/python2.6
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.
8. The web
interface of Ambari can be accessed from <hostname>:8080. Default
username and password for logging ambari is admin/admin.
No comments:
Post a Comment