Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 4

sudo yum update

sh check-pre-req.sh
sudo sysctl vm.swappiness=1
#du -h tarball
------------------------------------------------------------------
% 1.webserver
% open port 80 http in SG

sudo yum install httpd -y


sudo chkconfig httpd on
sudo service httpd status
sudo service httpd start
sudo service httpd status
--------------------------------------------------------------------
sudo mv cm5.16 /var/www/html/
sudo mv cdh5.16 /var/www/html/

--------------------------------------------------------------------
cd /etc/yum.repos.d

sudo vi cloudera-manager.repo
#########Change the below Ip as per your Private IP####################
[cloudera-manager]
name = Cloudera Manager 5.16.2
baseurl = http://ip-172-31-7-76.ap-south-1.compute.internal/cm5.16
gpgkey = http://ip-172-31-7-76.ap-south-1.compute.internal/cm5.16/RPM-GPG-KEY-
cloudera
gpgcheck = 1
---------------------------------------------------------------------
cd

% 2.MySQL server

wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
---------------------------------------------------------------------
sudo yum update -y

sudo yum install mysql-server -y


sudo systemctl start mysqld
sudo systemctl stop mysqld
--------------------------------------------------------------------
##############Ensure the MySQL server starts at boot###############

sudo reboot

---------------------------------------------
sudo /sbin/chkconfig mysqld on

sudo systemctl start mysqld


sudo systemctl status mysqld

sudo /usr/bin/mysql_secure_installation

[...]
Enter current password for root (enter for none):
OK, successfully used password, moving on...
[...]
Set root password? [Y/n] Y
Password: P@ssw0rd
New password:
Re-enter new password:
Remove anonymous users? [Y/n] Y
[...]
Disallow root login remotely? [Y/n] N
[...]
Remove test database and access to it [Y/n] Y
[...]
Reload privilege tables now? [Y/n] Y
All done!

----------------------------------------------------------------------------------
mysqld --version

############################## Download and install MySQL connector


#############################

wget https://downloads.mysql.com/archives/get/p/3/file/mysql-connector-java-
5.1.46.tar.gz

tar zxvf mysql-connector-java-5.1.46.tar.gz

sudo yum install java-1.7.0-openjdk-devel -y


-------------------------------------------------------------------------------

copy the .pem key using WinScp to the centos server

chmod 400 ashher.pem


---------------------------------------------------------------------------------

vi cluster
(Add all private ips of all hosts)
-------------------------------------------------------------------------------

vi clustercmd.sh

#########Change the below .pem key as per your key ####################

for i in `cat cluster`; do


ssh -t -i ./ashher.pem centos@$i $*
done
--------------------------------------------------------------------------------

vi putnmove.sh

#########Change the below .pem key as per your key####################

SOURCE=$1
TARGET=$2
INTERIM=`basename $SOURCE`

for i in `cat cluster`; do


scp -i ./ashher.pem $SOURCE centos@$i:~/
ssh -t -i ./ashher.pem centos@$i "sudo cp $INTERIM $TARGET"
done
---------------------------------------------------------------------------------

sh clustercmd.sh sudo mkdir -p /usr/share/java/


sh putnmove.sh mysql-connector-java-5.1.46/mysql-connector-java-5.1.46-bin.jar
/usr/share/java/mysql-connector-java.jar
--------------------------------------------------------------------------------

#########connect mysql server#########


mysql -u root -p

create database hive DEFAULT CHARACTER SET utf8;


grant all on hive.* TO 'hive'@'%' IDENTIFIED BY 'P@ssw0rd';

create database hue DEFAULT CHARACTER SET utf8;


grant all on hue.* TO 'hue'@'%' IDENTIFIED BY 'P@ssw0rd';

create database rman DEFAULT CHARACTER SET utf8;


grant all on rman.* TO 'rman'@'%' IDENTIFIED BY 'P@ssw0rd';

create database navs DEFAULT CHARACTER SET utf8;


grant all on navs.* TO 'navs'@'%' IDENTIFIED BY 'P@ssw0rd';

create database navms DEFAULT CHARACTER SET utf8;


grant all on navms.* TO 'navms'@'%' IDENTIFIED BY 'P@ssw0rd';

create database oozie DEFAULT CHARACTER SET utf8;


grant all on oozie.* TO 'oozie'@'%' IDENTIFIED BY 'P@ssw0rd';

create database actmo DEFAULT CHARACTER SET utf8;


grant all on actmo.* TO 'actmo'@'%' IDENTIFIED BY 'P@ssw0rd';

create database sentry DEFAULT CHARACTER SET utf8;


grant all on sentry.* TO 'sentry'@'%' IDENTIFIED BY 'P@ssw0rd';

create database sqoop DEFAULT CHARACTER SET utf8;


grant all on sqoop.* TO 'sqoop'@'%' IDENTIFIED BY 'P@ssw0rd';

grant all on *.* to 'temp'@'%' identified by 'P@ssw0rd' with grant option;

show databases;

select host, user, password from mysql.user;

exit
------------------------------------------------------------------------
sudo yum -y install cloudera-manager-server cloudera-manager-daemons

#########Change the below Ip as per your Private IP####################

sudo /usr/share/cmf/schema/scm_prepare_database.sh mysql -h 10.0.0.138 -P 3306 -u


temp -p --scm-host 10.0.0.138 scmdb scmuser

P@ssw0rd
-----------------------------------------------------------------------------------
-------------
#########connect mysql server#########

mysql -u root -p
Password: P@ssw0rd
select host, user, password from mysql.user;
drop user 'temp'@'%';
select host, user, password from mysql.user;
exit
-----------------------------------------------------------------------------------
--------------
#########connect cm server#########

sudo service cloudera-scm-server start

sudo service cloudera-scm-server status

You might also like