echo 0 >/proc/sys/vm/swappiness echo "vm.swappiness=0" >> /etc/sysctl.conf echo "echo 0 > /proc/sys/vm/swappiness" >> /etc/rc.d/rc.local cat /proc/sys/vm/swappiness echo "echo never > /sys/kernel/mm/transparent hugepage/enabled" >> /etc/rc.d/rc.local echo "echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag" >> /etc/rc.d/rc.local echo "* soft nofile 128000" >> /etc/security/limits.conf echo "* hard nofile 128000" >> /etc/security/limits.conf echo "* soft nproc 128000" >> /etc/security/limits conf echo "* hard nproc 128000" >> /etc/security/limits conf sed -i 's/1024/unlimited/' /etc/security/limits.d/90-nproc.conf ulimit -SHn 128000 ulimit -SHu 128000 yum install ntp -y service ntpd start chkconfig ntpd on
#cdh01
cp /root/.ssh/id_rsa.pub /root/.ssh/key_cdh01
scp /root/.ssh/key_cdh01 root@cdh00:/root/.ssh/ #cdh02
cp /root/.ssh/id_rsa.pub /root/.ssh/key_cdh02
scp /root/.ssh/key_cdh02 root@cdh00:/root/.ssh/
#cdh00
cp /root/.ssh/id_rsa.pub /root/.ssh/key_cdh00
cd /root/.ssh/ cat key_cdh00 >> authorized_keys cat key_cdh01 >> authorized_keys cat key_cdh02 >> authorized_keys
chmod 700 /root/.ssh
chmod 600 authorized_keys
scp authorized_keys root@cdh01:/root/.ssh
scp authorized_keys root@cdh02:/root/.ssh
ssh cdh01
ssh cdh02
pssh -h ./cdhs -i 'systemctl disable firewalld' pssh -h ./cdhs -i 'systemctl stop firewalld' pssh -h ./cdhs -i "sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux" pssh -h ./cdhs -i "cat /etc/sysconfig/selinux | grep SELINUX=" pssh -h ./cdhs -i 'echo vm.swappiness = 1 >> /etc/sysctl.conf' pssh -h ./cdhs -i 'sysctl -p' pssh -h ./cdhs -i "cat /etc/sysctl.conf | grep vm.swappiness" pssh -h ./cdhs -i "echo never > /sys/kernel/mm/transparent_hugepage/defrag" pssh -h ./cdhs -i "echo never > /sys/kernel/mm/transparent_hugepage/enabled" pssh -h ./cdhs -i "cat /sys/kernel/mm/transparent_hugepage/defrag;cat /sys/kernel/mm/transparent_hugepage/enabled" pssh -h ./cdhs -i "echo '* soft nproc 65535' >> /etc/security/limits.conf" pssh -h ./cdhs -i "echo '* hard nproc 65535' >> /etc/security/limits.conf" pssh -h ./cdhs -i "echo '* soft nofile 65535' >> /etc/security/limits.conf" pssh -h ./cdhs -i "echo '* hard nofile 65535' >> /etc/security/limits.conf"
vim /etc/profile
export JAVA_HOME=/opt/jdk
export PATH=.:$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
source /etc/profile
mkdir -p /usr/java ln -s /opt/jdk /usr/java/default
yum install httpd createrepo -y
chkconfig httpd on
service httpd start
rpm2cpio mysql-connector-j-8.3.0-1.el7.noarch.rpm | cpio -div
mkdir -p /usr/share/java/
chmod 777 /usr/share/java/mysql-connector-java.jar
rpm -qa | grep -i mysql rpm -e(v) * –nodeps
groupadd mysql useradd -r -g mysql mysql
sudo yum install mariadb-server mariadb
sudo systemctl start mariadb
sudo systemctl enable mariadb
sudo mysql_secure_installation vim /etc/my.cnf
sudo service mariadb restart
# UPDATE user SET authentication_string=PASSWORD('root') WHERE User='root'; create database oozie DEFAULT CHARSET utf8 COLLATE utf8_general_ci; GRANT ALL ON oozie.* TO 'oozie'@'%' IDENTIFIED BY 'oozie'; create database hive DEFAULT CHARSET utf8 COLLATE utf8_general_ci; GRANT ALL ON hive.* TO 'hive'@'%' IDENTIFIED BY 'hive'; create database sentry DEFAULT CHARSET utf8 COLLATE utf8_general_ci; GRANT ALL ON sentry.* TO 'sentry'@'%' IDENTIFIED BY 'sentry'; create database scm DEFAULT CHARSET utf8 COLLATE utf8_general_ci; # CREATE USER 'scm'@'localhost' IDENTIFIED BY 'scm'; GRANT ALL ON scm.* TO 'scm'@'%' IDENTIFIED BY 'scm'; create database monitor DEFAULT CHARSET utf8 COLLATE utf8_general_ci; GRANT ALL ON monitor.* TO 'monitor'@'%' IDENTIFIED BY 'monitor'; create database metastore DEFAULT CHARSET utf8 COLLATE utf8_general_ci; GRANT ALL ON metastore.* TO 'metastore'@'%' IDENTIFIED BY 'metastore'; create database amon DEFAULT CHARSET utf8 COLLATE utf8_general_ci; GRANT ALL ON amon.* TO 'amon'@'%' IDENTIFIED BY 'amon'; CREATE DATABASE rman DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; GRANT ALL ON rman.* TO 'rman'@'%' IDENTIFIED BY 'rman'; CREATE DATABASE hue DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; GRANT ALL ON hue.* TO 'hue'@'%' IDENTIFIED BY 'hue'; CREATE DATABASE nav DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; GRANT ALL ON nav.* TO 'nav'@'%' IDENTIFIED BY 'nav'; CREATE DATABASE navms DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; GRANT ALL ON navms.* TO 'navms'@'%' IDENTIFIED BY 'navms'; flush privileges; show databases;
cd /var/www/html/cdh/CM6.3.1/
createrepo . vim /etc/yum.repos.d/cm-local.repo
[cm-repo] name=cm-repo baseurl=http://192.168.31.210/cdh/CM6.3.1 enabled=1 gpgcheck=0
scp /etc/yum.repos.d/cm-local.repo cdh01:/etc/yum.repos.d/
scp /etc/yum.repos.d/cloudera-manager.repo cdh01:/etc/yum.repos.d/
scp /etc/yum.repos.d/cm-local.repo cdh02:/etc/yum.repos.d/
scp /etc/yum.repos.d/cloudera-manager.repo cdh02:/etc/yum.repos.d/
yum clean all && yum makecache
yum repolist
yum -y install cloudera-manager-server
/opt/cloudera/cm/schema/scm_prepare_database.sh mysql scm scm scm
systemctl start cloudera-scm-server
systemctl enable cloudera-scm-server
systemctl status cloudera-scm-server
tail -3 /var/log/cloudera-scm-server/cloudera-scm-server.log
Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException): Permission denied: user=mapred, access=WRITE, inode=”/user”:hdfs:supergroup:drwxrwxr-x hdfs dfs -chmod 777 /user
org.apache.hadoop.security.AccessControlException: Permission denied: user=hbase, access=WRITE, inode=”/”:hdfs:supergroup:drwxr-xr-x hdfs dfs -ls / hdfs dfs -mkdir /user hdfs dfs -mkdir /hbase hdfs dfs -ls / hadoop fs -chmod 777 /user hadoop fs -chmod 777 /hbase
Permission denied: ‘/var/log/hue/runcpserver.log’ chmod -R 777 /var/log/ chown hue:hue /var/log/hue chmod u+w /var/log/hue