CentOS

  • U 盘里安装 CentOS 镜像

  • 选择 U 盘 UEFI 启动安装。

  • 使用最小化安装(英文可能是 minimum ) 需要配置网络。

  • 启动后需要配置静态 IP

配置网络

启动 DHCP 设置

  1. 查看 网卡设置

CentOS 使用 ip 代替 ifconfig

  1. ip add
  2. #查看网卡配置信息

image.png

  1. 更改配置文件

    1. su
    2. #进入 root 权限
    3. vi /etc/sysconfig/network-scripts/ifcfg-em0
    4. #最后的文件是 ifcfg-网卡名

    修改 ONBOOT = yes
    重新启动网络服务

    1. service network restart
  2. 记录 IP 地址,子网掩码,默认网关,DNS 服务器 ```bash IP ip add

netmask ip add

gateway ip route show

184.82.152.96/29 dev eth0 proto kernel scope link src 184.82.152.98 169.254.0.0/16 dev eth0 scope link default via 184.82.152.97 dev eth0

DNS cat /etc/resolv.conf

  1. <a name="zkUWb"></a>
  2. ### 改为静态设置
  3. ```bash
  4. vim /etc/sysconfig/network-scripts/ifcfg-eth

修改如下内容

  1. BOOTPROTO="static" #dhcp改为static
  2. ONBOOT="yes" #开机启用本配置
  3. IPADDR= IP
  4. GATEWAY=默认网关
  5. NETMASK=子网掩码
  6. DNS1=DNS IP

关闭 CentOS 防火墙

  1. # 关闭 firewall 防火墙
  2. systemctl stop firewalld.service
  3. # 禁止 firewall 开机自启动
  4. systemctl disable firewalld.service

在个人电脑上,使用 ssh 进行远程登录

192.168.0.124
192.168.0.103
192.168.0.102
192.168.0.116