Total download size: 1.7 M Is this ok [y/n]: y Downloading Packages: Setting up and reading Presto delta metadata updates/prestodelta 210 kb 00:00 Processing delta metadata Download delta size: 525 k (1/4): httpd-2.2.15-39.el6.centos_2.2.15-47.el6.centos.x86_64.drpm 370 kb 00:00 (2/4): httpd-manual-2.2.15-39.el6.centos_2.2.15-47.el6.centos.noarch.drpm 61 kb 00:00 (3/4): httpd-tools-2.2.15-39.el6.centos_2.2.15-47.el6.centos.x86_64.drpm 59 kb 00:00 (4/4): mod_ssl-2.2.15-39.el6.centos_2.2.15-47.el6.centos.x86_64.drpm 35 kb 00:00 Finishing rebuild of rpms, from deltarpms <delta rebuild> 1.7 MB 00:02 Presto reduced the update size by 71% (from 1.7 M to 525 k). Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Updating : httpd-tools-2.2.15-47.el6.centos.x86_64 1/8 Updating : httpd-2.2.15-47.el6.centos.x86_64 2/8 Updating : httpd-manual-2.2.15-47.el6.centos.noarch 3/8 Updating : 1:mod_ssl-2.2.15-47.el6.centos.x86_64 4/8 Cleanup : httpd-manual-2.2.15-39.el6.centos.noarch 5/8 Cleanup : 1:mod_ssl-2.2.15-39.el6.centos.x86_64 6/8 Cleanup : httpd-2.2.15-39.el6.centos.x86_64 7/8 Cleanup : httpd-tools-2.2.15-39.el6.centos.x86_64 8/8 Verifying : httpd-manual-2.2.15-47.el6.centos.noarch 1/8 Verifying : 1:mod_ssl-2.2.15-47.el6.centos.x86_64 2/8 Verifying : httpd-tools-2.2.15-47.el6.centos.x86_64 3/8 Verifying : httpd-2.2.15-47.el6.centos.x86_64 4/8 Verifying : httpd-2.2.15-39.el6.centos.x86_64 5/8 Verifying : 1:mod_ssl-2.2.15-39.el6.centos.x86_64 6/8 Verifying : httpd-tools-2.2.15-39.el6.centos.x86_64 7/8 Verifying : httpd-manual-2.2.15-39.el6.centos.noarch 8/8 Updated: httpd.x86_64 0:2.2.15-47.el6.centos Page 21 of 71
Dependency Updated: httpd-manual.noarch 0:2.2.15-47.el6.centos mod_ssl.x86_64 1:2.2.15-47.el6.centos Complete! Start the Webserver [root@hadoop01.ssh]# service httpd start Starting httpd: [ OK ] httpd-tools.x86_64 0:2.2.15-47.el6.centos Automate the startup of the Webserver [root@hadoop01 ~]# chkconfig --level 345 httpd on Use WinSCP and copy all the files downloaded earlier to master node Page 22 of 71
Execute the below commands to extract the transferred files to create local repositories [root@hadoop01 ~]# cd /u04/downloads [root@hadoop01 ~]# tar -zxvf AMBARI-2.1.2-377-centos6.tar.gz -C /var/www/html/ [root@hadoop01 ~]# tar -zxvf HDP-UTILS-1.1.0.20-centos6.tar.gz -C /var/www/html/ [root@hadoop01 ~]# tar -zxvf HDP-2.3.2.0-centos6-rpm.tar.gz -C /var/www/html/ Create the repo files in /etc/yum.repos.d/ [root@hadoop01 ~]# cd /etc/yum.repos.d/ [root@hadoop01 ~]# vi ambari.repo #VERSION_NUMBER=2.1.0-1470 [Updates-ambari-2.1.0] name=ambari-2.1.0 - Updates Page 23 of 71
baseurl=http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.1.0 gpgcheck=1 gpgkey=http://public-repo-1.hortonworks.com/ambari/centos6/rpm-gpg-key/rpm-gpg-key-jenkins enabled=1 priority=1 [root@hadoop01 ~]# vi hdp.repo #VERSION_NUMBER=2.3.0.0-2557 [HDP-2.3.0.0] name=hdp Version - HDP-2.3.0.0 baseurl=http://public-repo-1.hortonworks.com/hdp/centos6/2.x/updates/2.3.0.0 gpgcheck=1 gpgkey=http://public-repo-1.hortonworks.com/hdp/centos6/2.x/updates/2.3.0.0/rpm-gpg-key/rpm-gpg-key-jenkins enabled=1 priority=1 [HDP-UTILS-1.1.0.20] name=hdp Utils Version - HDP-UTILS-1.1.0.20 baseurl=http://public-repo-1.hortonworks.com/hdp-utils-1.1.0.20/repos/centos6 gpgcheck=1 gpgkey=http://public-repo-1.hortonworks.com/hdp/centos6/2.x/updates/2.3.0.0/rpm-gpg-key/rpm-gpg-key-jenkins enabled=1 priority=1 Make sure that the http server is up and running my server IP is highlighted in yellow Page 24 of 71
NOTE: Please make sure you specify Master IP address and versions as per your environment. http://docs.hortonworks.com/hdpdocuments/ambari- 2.1.0.0/bk_ambari_reference_guide/content/_troubleshooting_ambari.html On the Ambari Server host, open /etc/ambari-server/conf/ambari.properties with a text editor Using Ambari with MySQL By default, Ambari uses Postgres DB. I have decided to use MySQL because it s the only database is acceptable for Hive,HBase,Ambari,Zookeeper etc installation Check whether MySQL is installed and running Page 25 of 71
[root@hadoop01 bin]# service mysqld status mysqld is stopped I had previously opted and installed MySQL packages during the OS install so I will use this version.see below steps to remove and re-install a newser MySQL package. [root@hadoop01 bin]# service mysqld start Initializing MySQL database: Installing MySQL system tables...ok Filling help tables...ok To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER! To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h hadoop01.texas.netpassword 'new-password' Alternatively you can run: /usr/bin/mysql_secure_installation which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the manual for more instructions. You can start the MySQL daemon with: cd /usr ; /usr/bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl cd /usr/mysql-test ; perl mysql-test-run.pl Please report any problems with the /usr/bin/mysqlbug script! [ OK ] Starting mysqld: [ OK ] [root@hadoop01 ~]# service mysqld status mysqld (pid 1880) is running... Automate the MySQL server startup at boot [root@hadoop01 ~]# chkconfig --level 345 mysqld on Optinally Uninstall MySQL Packages First uninstall all the MySQL packages installed on your server Page 26 of 71
[root@hadoop01 ~]# yum remove mysql mysql-server Romove MySQL Directory Remove MySQL data directory from system which by default exists at /var/lib/mysql. It may be changed to some other place, which you can find in my.cnf file with variable datadir. Delete the /var/lib/mysql directory from system but we prefer to rename it to keep a backup of existing files. [root@hadoop01 ~]# mv /var/lib/mysql /var/lib/mysql_old_backup Optional re-install MySQL Stop and uninstall/remove the current version [root@hadoop01 html]# service mysqld stop [root@hadoop01 html]# yum remove mysql mysql-server [root@hadoop01 html # mv /var/lib/mysql /var/lib/mysql_old_backup Reinstall the MySQL [root@hadoop01 html]# yum install mysql mysql-server Loaded plugins: aliases, changelog, downloadonly, fastestmirror, presto, security, tmprepo, verify, versionlock Setting up Install Process Loading mirror speeds from cached hostfile * base: mirror.switch.ch * centosplus: mirror.switch.ch * contrib: mirror.switch.ch * epel: mirror.fraunhofer.de * extras: mirror.switch.ch * updates: mirror.switch.ch Resolving Dependencies --> Running transaction check ---> Package mysql.x86_64 0:5.1.73-5.el6_6 will be installed Page 27 of 71
---> Package mysql-server.x86_64 0:5.1.73-5.el6_6 will be installed --> Finished Dependency Resolution Dependencies Resolved Package Arch Version Repository Size Installing: mysql x86_64 5.1.73-5.el6_6 base 894 k mysql-server x86_64 5.1.73-5.el6_6 base 8.6 M Transaction Summary Install 2 Package(s) Total download size: 9.5 M Installed size: 27 M Is this ok [y/n]: y Downloading Packages: Setting up and reading Presto delta metadata Processing delta metadata Package(s) data still to download: 9.5 M (1/2): mysql-5.1.73-5.el6_6.x86_64.rpm 894 kb 00:00 (2/2): mysql-server-5.1.73-5.el6_6.x86_64.rpm 8.6 MB 00:01 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 00:02 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : mysql-5.1.73-5.el6_6.x86_64 1/2 Installing : mysql-server-5.1.73-5.el6_6.x86_64 2/2 Verifying : mysql-5.1.73-5.el6_6.x86_64 1/2 Verifying : mysql-server-5.1.73-5.el6_6.x86_64 2/2 Installed: mysql.x86_64 0:5.1.73-5.el6_6 Page 28 of 71 4.3 MB/s 9.5 MB mysql-server.x86_64 0:5.1.73-5.el6_6
Complete! Check if MySQL is running [root@hadoop01 ~]# mysqladmin -u root -p status Enter password: Uptime: 134 Threads: 7 Questions: 604 Slow queries: 0 Opens: 30 Flush tables: 1 Open tables: 23 Queries per second avg: 4.507 I had to reset the MySQL password to do so follow the below process [root@hadoop01 html]# service mysqld stop Stopping mysqld: [ OK ] Reset the MySQL password Having installed the MySQL rpm I didn t know the default password so I had to rest [root@hadoop01 html]# mysqladmin -u root -h hadoop01.texas.netpassword 'tototo' [root@hadoop01 html]# mysqladmin -u root password 'tototo' Try out the new password and it seems to work out well [root@hadoop01 html]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6 Server version: 5.1.73 Source distribution Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> select user(); +-----------------------+ user() +-----------------------+ root@localhost Page 29 of 71
+-----------------------+ 1 row in set (0.01 sec) Install MySQL connector The Ambari Server host needs the MySQL driver installed to be able to communicate with the database, so I installed the the CentOS MySQL connector [root@hadoop01 bin]# yum install mysql-connector-java Loaded plugins: fastestmirror, security Setting up Install Process Loading mirror speeds from cached hostfile * base: mirror.switch.ch * epel: mirror.de.leaseweb.net * extras: mirror.switch.ch * updates: mirror.switch.ch Resolving Dependencies --> Running transaction check ---> Package mysql-connector-java.noarch 1:5.1.17-6.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved Package Arch Version Repository Size Installing: mysql-connector-java noarch 1:5.1.17-6.el6 base 1.4 M Transaction Summary Install 1 Package(s) Total download size: 1.4 M Installed size: 2.8 M Is this ok [y/n]: y Page 30 of 71