VirtualBox安装CentOS-7-x86_64-Minima

  1. 新建虚拟机->设置->网卡1(NAT网络)->网卡2(Host-Only网络)

  2. 启动->选择镜像->选择硬盘->选择时区->设置root密码

  3. 开启网卡


# vi /etc/sysconfig/network-scripts/ifcfg-enp0s3

...

ONBOOT=yes #修改

...
# vi /etc/sysconfig/network-scripts/ifcfg-enp0s8

...

BOOTPROTO=static #修改
ONBOOT=yes #修改
IPADDR=192.168.59.222 #增加
GATEWAY=192.168.59.1 #增加
NETMASK=255.255.255.0 #增加

...

# systemctl restart network

  1. yum install -y openssh-server
  2. 设置sshd
# vi /etc/ssh/sshd_config

Port 22
ListenAddress 0.0.0.0
ListenAddress ::


PermitRootLogin yes

# systemctl restart sshd

你可能感兴趣的:(VirtualBox安装CentOS-7-x86_64-Minima)