MySQL部署
CM离线部署
Parcel部署
节点 MySQL Parcel源文件 cm服务进程 大数据组件
CM
http://archive.cloudera.com/cm5/cm/5/cloudera-manager-centos7-cm5.12.0_x86_64.tar.gz
Parcel
http://archive.cloudera.com/cdh5/parcels/5.12.0/CDH-5.12.0-1.cdh5.12.0.p0.29-el7.parcel
http://archive.cloudera.com/cdh5/parcels/5.12.0/CDH-5.12.0-1.cdh5.12.0.p0.29-el7.parcel.sha1
http://archive.cloudera.com/cdh5/parcels/5.12.0/manifest.json
JDK
MySQL
MySQL jdbc jar
echo "172.19.2.20 hadoop001">> /etc/hosts
echo "172.19.2.18 hadoop002">> /etc/hosts
echo "172.19.2.19 hadoop003">> /etc/hosts
systemctl stop firewalld
systemctl disable firewalld
iptables -F
vi /etc/selinux/config
将SELINUX=enforcing改为SELINUX=disabled
设置后需要重启才能生效
date
timedatectl
timedatectl --help
查看哪些时区
timedatectl list-timezones
所有节点设置上海时区
timedatectl set-timezone Asia/Shanghai
6.2
所有节点安装ntp
yum install -y ntp
选取hadoop001的ntp为主节点
vi /etc/ntp.conf
server 0.asia.pool.ntp.org
server 1.asia.pool.ntp.org
server 2.asia.pool.ntp.org
server 3.asia.pool.ntp.org
当外部时间不可用时,可用本地硬件时间
server 127.127.1.0 iburst local clock
允许哪些网段的机器来同步时间
restrict 172.19.2.0 mask 255.255.255.0 nomodify notrap
开启ntpd及查看状态
systemctl start ntpd
systemctl status ntpd
验证
ntpq -p
其他从节点停止禁用ntpd服务
systemctl stop ntpd
systemctl disable ntpd
/usr/sbin/ntpdate hadoop001
每天同步hadoop001节点的时间
crontab -e
00 00 * * * /usr/sbin/ntpdate hadoop001
scp -r jdk-8u144-linux-x64.tar.gz root@hadoop002:/
scp -r jdk-8u144-linux-x64.tar.gz root@hadoop003:/
mkdir /usr/java
tar -zxvf jdk-8u144-linux-x64.tar.gz -C /usr/java
注意修改正确的用户组,用户
chown -R root:root /usr/java/jdk1.8.0_144
vi /etc/profile
export JAVA_HOME=/usr/java/jdk1.8.0_144
export PATH=${JAVA_HOME}/bin:${PATH}
source /etc/profile
which java
create database cmf DEFAULT CHARACTER SET utf8;
create database amon DEFAULT CHARACTER SET utf8;
grant all on cmf.* TO 'cmf'@'%' IDENTIFIED BY 'root';
grant all on amon.* TO 'amon'@'%' IDENTIFIED BY 'root';
flush privileges;
mkdir -p /usr/share/java/
cp mysql-connector-java.jar /usr/share/java/
scp -r cloudera-manager-centos7-cm5.12.0_x86_64.tar.gz root@hadoop002:/
scp -r cloudera-manager-centos7-cm5.12.0_x86_64.tar.gz root@hadoop003:/
mkdir /opt/cloudera-manager
tar -zxvf cloudera-manager-centos7-cm5.12.0_x86_64.tar.gz -C /opt/cloudera-manager/
sed -i "s/server_host=localhost/server_host=hadoop001/g" /opt/cloudera-manager/cm-5.12.0/etc/cloudera-scm-agent/config.ini
vi /opt/cloudera-manager/cm-5.12.0/etc/cloudera-scm-server/db.properties
com.cloudera.cmf.db.type=mysql
com.cloudera.cmf.db.host=hadoop001
com.cloudera.cmf.db.name=cmf
com.cloudera.cmf.db.user=cmf
com.cloudera.cmf.db.password=root
com.cloudera.cmf.db.setupType=EXTERNAL
useradd --system --home=/opt/cloudera-manager/cm-5.12.0/run/cloudera-scm-server/ --no-create-home --shell=/bin/false --comment "Cloudera SCM User" cloudera-scm
chown -R cloudera-scm:cloudera-scm /opt/cloudera-manager
mkdir -p /opt/cloudera/parcel-repo
cp CDH-5.12.0-1.cdh5.12.0.p0.29-el7.parcel /opt/cloudera/parcel-repo/
ll
把parcel cp 进来
sha1 -> sha
chown -R cloudera-scm:cloudera-scm /opt/cloudera/
mkdir -p /opt/cloudera/parcels
chown -R cloudera-scm:cloudera-scm /opt/cloudera/
/opt/cloudera-manager/cm-5.12.0/etc/init.d/cloudera-scm-server start
/opt/cloudera-manager/cm-5.12.0/etc/init.d/cloudera-scm-agent start
剩下就是页面操作点点点
swappiness值控制操作系统尝试交换内存的积极;
swappiness=0:表示最大限度使用物理内存,之后才是swap空间;
swappiness=100:表示积极使用swap分区,并且把内存上的数据及时搬迁到swap空间;
如果是混合服务器,不建议完全禁用swap,可以尝试降低swappiness。
临时调整:
sysctl vm.swappiness=10
永久调整:
cat << EOF >> /etc/sysctl.conf
vi /etc/sysctl.conf
# Adjust swappiness value
vm.swappiness=10
EOF
临时调整:
echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo never > /sys/kernel/mm/transparent_hugepage/enabled
永久调整:
cat << EOF >> /etc/rc.d/rc.local
vi /etc/rc.d/rc.local
# Disable transparent_hugepage
echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo never > /sys/kernel/mm/transparent_hugepage/enabled
EOF
# centos7.x系统,需要为"/etc/rc.d/rc.local"文件赋予执行权限
chmod +x /etc/rc.d/rc.local
然后自定义安装服务