Hortonworks采用了100%完全开源策略,产品名称为HDP(Hortonworks Data Platform)。所有软件产品开源,用户免费使用,Hortonworks提供商业的技术支持服务。与CDH相比,管理软件使用开源Ambari,数据治理使用Atlas,安全组件使用Ranger而非Sentry,SQL继续紧抱Hive大腿。
--mysql-- create database ambari; grant all on ambari.* to 'root'@'%' identified by 'admin'; grant all on ambari.* to 'ambari'@'%' identified by 'admin'; grant all on ambari.* to 'root'@'server1' identified by 'admin'; grant all on ambari.* to 'ambari'@'server1' identified by 'admin';
>> or
grant all on *.* to 'root'@'server1' identified by '123456'; grant all on *.* to 'ambari'@'server1' identified by 'admin';
flush privileges;
省略mysql安装直接使用
1 2 3
--local yum resource-- sudo yum clean all sudo yum repolist
Step2: install ambari-server
1
sudo yum install ambari-server
Step 3: setup ambari-server
1
ambari-server setup
Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u67-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz
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
$ sudo yum install mysql-connector-java $ mysql -uroot -padmin mysql> use ambari; Database changed mysql> source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
$ sudo 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)? n 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 (localhost): 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... ...ambari-admin-2.1.0.1470.jar ... Adjusting ambari-server permissions and ownership... Ambari Server 'setup' completed successfully.
Step 3: start Ambari
1 2 3 4 5 6 7 8 9 10
$ sudo 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.
INFO 2015-08-25 23:52:43,898 main.py:287 - Connecting to Ambari server at https://server2:8440 (192.168.2.201) INFO 2015-08-25 23:52:43,898 NetUtil.py:59 - Connecting to https://server2:8440/ca ERROR 2015-08-25 23:52:43,968 NetUtil.py:77 - [Errno 1] _ssl.c:492: error:100AE081:elliptic curve routines:EC_GROUP_new_by_curve_name:unknown group ERROR 2015-08-25 23:52:43,968 NetUtil.py:78 - SSLError: Failed to connect. Please check `openssl` library versions. Refer to: https://bugzilla.redhat.com/show_bug.cgi?id=1022468 for more details.
Check the OpenSSL library version installed on your host(s): rpm -qa | grep openssl
openssl-1.0.1e-15.el6.x86_64
If the output says openssl-1.0.1e-15.x86_64 (1.0.1 build 15) you will need to upgrade the OpenSSL library by running the following command: yum upgrade openssl
Verify you have the newer version of OpenSSL (1.0.1 build 16): rpm -qa | grep openssl
openssl-1.0.1e-16.el6.x86_64
Restart Ambari Agent(s) and Click Retry Failed on the Wizard.
错误1: File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 291, in _call raise Fail(err_msg) resource_management.core.exceptions.Fail: Execution of '/usr/bin/yum -d 0 -e 0 -y install ambari-metrics-monitor' returned 1. Error: Package: ambari-metrics-monitor-2.1.0-1470.x86_64 (Updates-ambari-2.1.0) Requires: python-devel You could try using --skip-broken to work around the problem ** Found 6 pre-existing rpmdb problem(s), 'yum check' output follows: 1:libreoffice-core-4.0.4.2-9.el6.x86_64 has missing requires of libjawt.so()(64bit) 1:libreoffice-core-4.0.4.2-9.el6.x86_64 has missing requires of libjawt.so(SUNWprivate_1.1)(64bit) 1:libreoffice-ure-4.0.4.2-9.el6.x86_64 has missing requires of jre >= ('0', '1.5.0', None) 2:postfix-2.6.6-2.2.el6_1.x86_64 has missing requires of libmysqlclient.so.16()(64bit) 2:postfix-2.6.6-2.2.el6_1.x86_64 has missing requires of libmysqlclient.so.16(libmysqlclient_16)(64bit) 2:postfix-2.6.6-2.2.el6_1.x86_64 has missing requires of mysql-libs
错误2: File "/usr/lib/python2.6/site-packages/resource_management/core/sudo.py", line 37, in chown return os.chown(path, uid, gid) OSError: [Errno 1] Operation not permitted: '/data0/www/bbs/uc_server/data/avatar/hadoop/hdfs/namenode'
[whoami@server1 ~]$ sudo -uhive hive hive> show tables; OK Time taken: 1.36 seconds hive> create table test(id int); OK Time taken: 1.998 seconds hive> insert into table test values (1), (2), (3); Query ID = hive_20150831184109_0c75d1e8-1003-4ade-bacf-03cd7408082f Total jobs = 1 Launching Job 1 out of 1
Status: Running (Executing on YARN cluster with App id application_1441014845188_0002)
-------------------------------------------------------------------------------- VERTICES STATUS TOTAL COMPLETED RUNNING PENDING FAILED KILLED -------------------------------------------------------------------------------- Map 1 .......... SUCCEEDED 1 1 0 0 0 0 -------------------------------------------------------------------------------- VERTICES: 01/01 [==========================>>] 100% ELAPSED TIME: 32.24 s -------------------------------------------------------------------------------- Loading data to table default.test Table default.test stats: [numFiles=1, numRows=3, totalSize=6, rawDataSize=3] OK Time taken: 41.354 seconds hive> show tables; OK test values__tmp__table__1 Time taken: 0.112 seconds, Fetched: 2 row(s) hive> select * from test; OK 1 2 3 Time taken: 0.258 seconds, Fetched: 3 row(s)
hive> select count(1) from test; OK 3 Time taken: 1.705 seconds, Fetched: 1 row(s)