Skip to content

Commit

Permalink
OPSAPS-27572 fixed redirects in cm-api examples
Browse files Browse the repository at this point in the history
- sudo doesn't affect shell redirects, tee is required
  • Loading branch information
technmsg committed Jul 13, 2015
1 parent 6944e24 commit bb52143
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions python/examples/auto-deploy/setup-master.sh
Expand Up @@ -34,7 +34,7 @@ sudo mv cloudera-manager.repo /etc/yum.repos.d/
sudo service iptables stop

# Turn off SELINUX
sudo echo 0 >/selinux/enforce
echo 0 | sudo tee /selinux/enforce > /dev/null

# Set up NTP
sudo yum -y install ntp
Expand All @@ -53,8 +53,8 @@ tar zxf hive-0.12.0-cdh5.0.0.tar.gz
sudo yum -y install mysql-server expect
sudo service mysqld start
sudo /sbin/chkconfig mysqld on
sudo /bin/echo -e "\nY\n${hive_metastore_password}\n${hive_metastore_password}\nY\nn\nY\nY\n" > /tmp/answers
sudo /usr/bin/mysql_secure_installation < /tmp/answers
/bin/echo -e "\nY\n${hive_metastore_password}\n${hive_metastore_password}\nY\nn\nY\nY\n" | sudo tee /tmp/answers > /dev/null
sudo cat /tmp/answers | sudo /usr/bin/mysql_secure_installation
sudo rm /tmp/answers
mysql -uroot -p"${hive_metastore_password}" --execute="CREATE DATABASE metastore; USE metastore; SOURCE ./hive-0.12.0-cdh5.0.0/scripts/metastore/upgrade/mysql/hive-schema-0.12.0.mysql.sql;"
mysql -uroot -p"${hive_metastore_password}" --execute="CREATE USER 'hive'@'${hive_metastore_host}' IDENTIFIED BY '${hive_metastore_password}';"
Expand Down
2 changes: 1 addition & 1 deletion python/examples/auto-deploy/setup-slave.sh
Expand Up @@ -32,7 +32,7 @@ sudo mv cloudera-manager.repo /etc/yum.repos.d/
sudo service iptables stop

# Turn off SELINUX
sudo echo 0 >/selinux/enforce
echo 0 | tee /selinux/enforce > /dev/null

#Set up NTP
sudo yum -y install ntp
Expand Down

0 comments on commit bb52143

Please sign in to comment.