美文网首页
大数据开发环境搭载1--安装CentOS 7

大数据开发环境搭载1--安装CentOS 7

作者: Nil_Woo | 来源:发表于2017-05-16 12:26 被阅读0次

1、安装CentOS 7

  • 下载
http://isoredirect.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1611.iso
  • 安装
1、在vmware中,Edit->Virtual Network Editor,选择VMnet8
2、去掉Use local DHCP service to distribute IP address to VMs选项
3、Subnet IP设置为192.168.2.0
4、点击NAT Settings设置GATEWAY地址:192.168.2.2
5、安装过程略,注意修改主机名
  • 将静态、瞬态或灵活主机名都改为node1
hostnamectl set-hostname node1
  • 修改/etc/sysconfig/network-scripts/ifcfg-eth0:(eth0根据实际情况查看网卡名字)
BOOTPROTO="static"
IPADDR=192.168.2.11
NETMASK=255.255.255.0
ONBOOT=yes
GATEWAY=192.168.2.2
DNS1=192.168.2.2
  • 重启
reboot
  • 测试
ping www.baidu.com
  • 安装ifconfig
yum upgrade
yum -y install net-tools
  • 查看IP
ifconfig
  • 修改/etc/hosts
192.168.2.11 node1
192.168.2.12 node2
192.168.2.13 node3
192.168.2.14 node4
192.168.2.15 node5
192.168.2.16 node6
  • 安装vim
yum -y install vim
  • 修改/etc/vimrc
set ai          " always set autoindenting on
set nu!
set tabstop=4       " The width of a TAB is set to 4.
                    " Still it is a \t. It is just that
                    " Vim will interpret it to be having
                    " a width of 4.
set shiftwidth=4    " Indents will have a width of 4
set softtabstop=4   " Sets the number of columns for a TAB
set expandtab       " Expand TABs to spaces
set paste
  • 拷贝/etc/vimrc到其他节点
scp /etc/vimrc root@node2:/etc
scp /etc/vimrc root@node3:/etc
scp /etc/vimrc root@node4:/etc
scp /etc/vimrc root@node5:/etc
scp /etc/vimrc root@node6:/etc
  • 修改~/.bashrc
alias rm='rm -f'
# alias cp='cp -i'
# alias mv='mv -i'
alias vi='vim'
  • 拷贝~/.bashrc到其他节点
scp /root/.bashrc root@node2:/root
scp /root/.bashrc root@node3:/root
scp /root/.bashrc root@node4:/root
scp /root/.bashrc root@node5:/root
scp /root/.bashrc root@node6:/root
  • 关闭防火墙
systemctl stop firewalld.service
  • 禁止firewall开机启动
systemctl disable firewalld.service
  • 设置SSH无密码登陆
# 生成密钥
ssh-keygen -t rsa

# 将公钥放入认证文件中
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

# 拷贝认证文件到其他节点
scp /root/.ssh/authorized_keys root@node2:/root/.ssh/
scp /root/.ssh/authorized_keys root@node3:/root/.ssh/
scp /root/.ssh/authorized_keys root@node4:/root/.ssh/
scp /root/.ssh/authorized_keys root@node5:/root/.ssh/
scp /root/.ssh/authorized_keys root@node6:/root/.ssh/

相关文章

网友评论

      本文标题:大数据开发环境搭载1--安装CentOS 7

      本文链接:https://www.haomeiwen.com/subject/jdklxxtx.html