没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
1. 准备环境
1.1. 安装包
1)安装虚拟机:VirtualBox-4.2.4-81684-Win.exe
2)安装配置 Linux 系统:CentOS-7.0-1406-x86_64-DVD.iso
3)安装配置 Java 环境:jdk-8u25-linux-x64.tar.gz
4)安装配置 Hadoop:hadoop-2.6.0-x64.tar.gz
5)安装配置 Hbase:hbase-0.99.2-bin.tar.gz
1.2. 网络配置
主机名 IP
master 10.1.2.18
slave1 10.1.2.53
slave2 10.1.2.101
1.3. 常用命令
# systemctl start foo.service #运行一个服务
# systemctl stop foo.service #停止一个服务
# systemctl restart foo.service #重启一个服务
# systemctl status foo.service #显示一个服务(无论运行与否)的状态
# systemctl enable foo.service #在开机时启用一个服务
# systemctl disable foo.service #在开机时禁用一个服务
# systemctl is-enabled iptables.service #查看服务是否开机启动
# reboot #重启主机
# shutdown -h now #立即关机
# source /etc/profile #配置文件修改立即生效
# yum install net-tools
2. 安装配置 CentOS
2.1. 安装 CentOS
1)选择启动盘 CentOS-7.0-1406-x86_64-DVD.iso,启动安装
2)选择 Install CentOS 7,回车,继续安装
3)选择语言,默认是 English,学习可以选择中文,正时环境选择 English
4)配置网络和主机名,主机名:master,网络选择开启,配置手动的 IPV4
5)选择安装位置;在分区处选择手动配置;选择标准分区,点击这里自动创建他们,点击完成,收受更改
6)修改 root 密码,密码:a
7)重启,安装完毕。
2.2. 配置 IP
2.2.1. 检查 IP
# ip addr
或
# ip link
2.2.2. 配置 IP
# cd /etc/sysconfig/network-scripts/ #进入网络配置文件目录
# find ifcfg-enp* #查到网卡配置文件,例如 ifcfg-enp0s3
# vi ifcfg-enp0s3 #编辑网卡配置文件
或
# vi /etc/sysconfig/network-scripts/ifcfg-enp0s3 #编辑网卡配置文件
配置内容:
BOOTPROTO=static #静态 IP 配置为 static,动态配置为 dhcp
ONBOOT=yes #开机启动
IPADDR=10.1.2.18 #IP 地址
NETMASK=255.255.255.0 #子网掩码
2.2.3. 配置网关
# vi /etc/sysconfig/network
编辑内容:
NETWORKING=yes
HOSTNAME=master
GATEWAY=10.1.2.254
2.2.4. 配置 dns
# vi /etc/resolv.conf #配置 dns
编辑内容:
nameserver 202.106.196.115
nameserver 202.106.0.20
nameserver 8.8.8.8
# systemctl restart network.service #重启网络
2.2.5. 配置 hosts
# vi /etc/hosts
编辑内容:
10.1.2.18 master
10.1.2.53 slave1
10.1.2.101 slave2
2.3. 关闭防火墙
# systemctl status firewalld.service #检查防火墙状态
# systemctl stop firewalld.service #关闭防火墙
# systemctl disable firewalld.service #禁止开机启动防火墙
2.4. 关闭 SELINUX
# vi /etc/selinux/config
编辑内容:
#SELINUX=enforcing #注释掉
#SELINUXTYPE=targeted #注释掉
SELINUX=disabled #增加
# setenforce 0 #使配置立即生效
剩余10页未读,继续阅读
DevOps-2018
- 粉丝: 11
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
前往页