sudo vim /etc/profile
# 在该文件末尾添加以下行
Java_HOME=/usr/java/jdk1.7.0_67
PATH=$PATH:$JAVA_HOME/bin
CLASSPATH=.:$JAVA_HOME/lib/jt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME PATH CLASSPATH
使环境变量立即生效
source /etc/profile
测试jdk安装是否成功
java -version
# 如显示了jdk的版本,则安装成功
安装 ntp(在所有节点操作)
sudo yum install ntp
设置NTP服务开机启动(在所有节点操作)
chkconfig ntpd on
chkconfig --list ntpd
# 2-5为on即成功
配置主节点(在 hadoop01 操作)
vim /etc/ntp.conf
该配置文件全部内容如下
driftfile /var/lib/ntp/ntp.drift #草稿文件
# Hosts on local network are less restricted.
# 允许内网其他机器同步时间
restrict 10.1.2.0 mask 255.255.255.0 nomodify notrap
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool ().
# 中国这边最活跃的时间服务器 : []()
server 210.72.145.44 perfer # 中国国家受时中心
server 202.112.10.36 # 1.cn.pool.ntp.org
server 59.124.196.83 # 0.asia.pool.ntp.org
#broadcast 192.168.1.255 autokey # broadcast server
#broadcastclient # broadcast client
#broadcast 224.0.1.1 autokey # multicast server
#multicastclient 224.0.1.1 # multicast client
#manycastserver 239.255.254.254 # manycast server
#manycastclient 239.255.254.254 autokey # manycast client
# allow update time by the upper server
# 允许上层时间服务器主动修改本机时间
restrict 210.72.145.44 nomodify notrap noquery
restrict 202.112.10.36 nomodify notrap noquery
restrict 59.124.196.83 nomodify notrap noquery
# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available.
# 外部时间服务器不可用时,以本地时间作为时间服务
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
保存后重启服务
service ntpd restart
# 查看同步状态
netstat -tlunp | grep ntp
watch ntpd –p
# 手动同步
ntpdate –u ip
配置子节点(在所有非主节点操作)
vim /etc/ntp.conf
该配置文件全部内容如下
driftfile /var/lib/ntp/ntp.drift # 草稿文件
# 日志文件
statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
# 让NTP Server为内网的ntp服务器
server 10.1.2.126
fudge 10.1.2.126 stratum 5
# 不允许来自公网上ipv4和ipv6客户端的访问
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1
保存后重启服务(在每一台子节点操作)
service ntpd restart
# 手工同步
netdate -u 10.1.2.126
cloudera-manager-agent-5.7.0-1.cm570.p0.76.el6.x86_64.rpm
cloudera-manager-daemons-5.7.0-1.cm570.p0.76.el6.x86_64.rpm
cloudera-manager-server-5.7.0-1.cm570.p0.76.el6.x86_64.rpm
cloudera-manager-server-db-2-5.7.0-1.cm570.p0.76.el6.x86_64.rpm
enterprise-debuginfo-5.7.0-1.cm570.p0.76.el6.x86_64.rpm
Oracle-j2sdk1.7-1.7.0+update67-1.x86_64.rpm
CDH包下载地址
CDH-5.7.0-1.cdh5.7.0.p0.45-el6.parcel
CDH-5.7.0-1.cdh5.7.0.p0.45-el6.parcel.sha1
cloudera-manager-installer.bin
manifest.json
CM 安装文件下载地址
cloudera-manager-installer.bin
配置 cloudera yum 源(在 hadoop01 操作)添加 cloudera-manager 源