zoukankan      html  css  js  c++  java
  • 81每周总结

    这一周开始安装Hadoop,首先是硬件上的:

    安装模板虚拟机,IP 地址 192.168.10.100 、 主机名称 hadoop100 、内存 4G 、硬盘 50G

    这时候就需要实用虚拟机进行安装了,按照视频中的介绍:

    (1)使用 yum 安装需要虚拟机可以正常上网,yum 安装前可以先测试下虚拟机联网情

    [root@hadoop100 ~]# ping www.baidu.com
    PING www.baidu.com (14.215.177.39) 56(84) bytes of data.
    64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=1
    ttl=128 time=8.60 ms
    64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=2
    ttl=128 time=7.72 ms
    (2)安装 epel-release
    注:Extra Packages for Enterprise Linux 是为“红帽系”的操作系统提供额外的软件包,
    适用于 RHEL、CentOS 和 Scientific Linux。相当于是一个软件仓库,大多数 rpm 包在官方
    repository 中是找不到的)
    [root@hadoop100 ~]# yum install -y epel-release
    (3)注意:如果 Linux 安装的是最小系统版,还需要安装如下工具;如果安装的是 Linux
    桌面标准版,不需要执行如下操作
    ➢ net-tool:工具包集合,包含 ifconfig 等命令
    [root@hadoop100 ~]# yum install -y net-tools
    ➢ vim:编辑器
    [root@hadoop100 ~]# yum install -y vim
    2 ) 关闭防火墙 ,关闭防火墙开机自启
    [root@hadoop100 ~]# systemctl stop firewalld
    [root@hadoop100 ~]# systemctl disable firewalld.service
    注意:在企业开发时,通常单个服务器的防火墙时关闭的。公司整体对外会设置非常安
    全的防火墙
    3 ) 创建 atguigu 用户 ,并修改 atguigu 用户的密码
    [root@hadoop100 ~]# useradd atguigu
    [root@hadoop100 ~]# passwd atguigu
    4 ) 配置 atguigu 用户具有 root 权限 , 方便 后期加 加 sudo 执行 root 权限的命令
    [root@hadoop100 ~]# vim /etc/sudoers
    修改/etc/sudoers 文件,在%wheel 这行下面添加一行,如下所示:
    ## Allow root to run any commands anywhere
    root ALL=(ALL) ALL
    ## Allows people in group wheel to run all commands

    注意:atguigu 这一行不要直接放到 root 行下面,因为所有用户都属于 wheel 组,你先
    配置了 atguigu 具有免密功能,但是程序执行到%wheel 行时,该功能又被覆盖回需要
    密码。所以 atguigu 要放到%wheel 这行下面。
    5 ) 在/opt 目录下创建文件夹 ,并修改所属主和所属组
    (1)在/opt 目录下创建 module、software 文件夹
    [root@hadoop100 ~]# mkdir /opt/module
    [root@hadoop100 ~]# mkdir /opt/software
    (2)修改 module、software 文件夹的所有者和所属组均为 atguigu 用户
    [root@hadoop100 ~]# chown atguigu:atguigu /opt/module
    [root@hadoop100 ~]# chown atguigu:atguigu /opt/software
    (3)查看 module、software 文件夹的所有者和所属组
    [root@hadoop100 ~]# cd /opt/
    [root@hadoop100 opt]# ll
    总用量 12
    drwxr-xr-x. 2 atguigu atguigu 4096 5 月 28 17:18 module
    drwxr-xr-x. 2 root root 4096 9 月 7 2017 rh
    drwxr-xr-x. 2 atguigu atguigu 4096 5 月 28 17:18 software
    6的 )卸载虚拟机自带的 JDK
    注意:如果你的虚拟机是最小化安装不需要执行这一步。
    [root@hadoop100 ~]# rpm -qa | grep -i java | xargs -n1 rpm -e
    --nodeps
    ➢ rpm -qa:查询所安装的所有 rpm 软件包
    ➢ grep -i:忽略大小写
    ➢ xargs -n1:表示每次只传递一个参数
    ➢ rpm -e –nodeps:强制卸载软件
    7 )重启虚拟机
    [root@hadoop100 ~]# reboot

  • 相关阅读:
    拷贝某文件至某位置
    Java对象的序列化和反序列
    常见的RuntimeException异常有哪些
    array数组增删元素
    失眠怎么办
    构造函数和函数区别(关键的new操作符)
    匿名函数递归(arguments.callee)和命名函数递归
    localeCompare方法在chrome浏览器取值问题
    random()方法
    iframe 父子页面之间取值
  • 原文地址:https://www.cnblogs.com/ruangongwangxiansheng/p/14161446.html
Copyright © 2011-2022 走看看