前期准备:
centos7
1.修改主机名:hostnamectl set-hostname <主机名>
2.设计系统默认启动级别:
设置为多用户状态
systemctl set-default multi-user.target
设置为图形化启动
systemctl set-default graphical.target
3.配置hadoop用户sudoer权限
vi /etc/sudoers
找到
root ALL=(ALL) ALL
这一行,然后在他下面添加一行:
hadoop ALL=(ALL) ALL
4.配置 IP
进入/etc/sysconfig/network-scripts目录
找到vi ifcfg-eno16777736
BOOTPROTO="static" #dhcp改为static
ONBOOT="yes" #开机启用本配置
IPADDR=192.168.218.132 #静态IP
GATEWAY=192.168.218.2 #默认网关
NETMASK=255.255.255.0 #子网掩码
DNS1=192.168.218.1 #DNS 配置
service network restart
查看:ip addr
5.关闭防火墙
systemctl stop firewalld.service #停止
systemctl disable firewalld.service #禁用
6.添加内网域名映射
修改配置文件: vi /etc/hosts
192.168.218.132 hadoop
7.设置时间
设置时区
timedatectl set-timezone Asia/Shanghai
是否NTP服务器同步
timedatectl set-ntp yes //yes或者no
同步时间:
crontab -e
8.配置免密登录
hadoop登录状态下ssh-keygen
ssh-copy-id hadoop
9.启动httpd服务
yum install httpd
systemctl start httpd.service #启动
systemctl enable httpd.service #开机启动
systemctl status httpd.service #检查httpd状态
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
正式开始,根据官网安装方法
Automated Installation
Ideal for trying Cloudera enterprise data hub, the installer will download Cloudera Manager from Cloudera's website and guide you through the setup process.
Pre-requisites: multiple, Internet-connected Linux machines, with SSH access, and significant free space in /var and /opt.
第一步:$ wget http://archive.cloudera.com/cm5/installer/latest/cloudera-manager-installer.bin
wget:无法解析主机地址。这就能看出是DNS解析的问题。
解决办法:
登入root(VPS)。
进入/etc/resolv.conf。
修改内容为下
nameserver 8.8.8.8 #google域名服务器
nameserver 8.8.4.4 #google域名服务器
第二步
$ chmod u+x cloudera-manager-installer.bin
第三步
$ sudo ./cloudera-manager-installer.bin
需要禁用SELINUX
vi /etc/selinux/config
将SELINUX=enforcing改为SELINUX=disabled
设置后需要重启才能生效
安装过程中遇到安装JDK错误,根据提示看log,跟repo源有关
rename .repo .repo.bak *
重新配置为阿里repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
之后运行yum makecache生成缓存