欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

Hadoop环境搭建之Linux虚拟机常用命令

程序员文章站 2022-04-03 16:50:59
1.设置网卡开机自启动,IP,子网掩码,网关:vi /etc/sysconfig/network-scripts/ifcfg-eth0 2.设置主机名:vi /etc/sysconfig/n...

1.设置网卡开机自启动,IP,子网掩码,网关:vi /etc/sysconfig/network-scripts/ifcfg-eth0

2.设置主机名:vi /etc/sysconfig/network

3.设置域名:vi /etc/host

4.克隆的虚拟机网卡地址:/etc/udev/rules.d/70-persistent-net.rules

5.rebootsudo yum -y install openssh-clients

6.sudo yum -y install openssh-clients

7.ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa

8.cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

9.chmod 640authorized_keys

10.关闭防火墙

service iptables stop

sudo chkconfig iptables off

11.关闭selinux

sudo vi /etc/sysconfig/selinux