linux 初始化 Posted on 2017-09-14 | ESXI 安装 linux 虚拟机配置 IP配置静态IP 12# 编辑这个文件vim /etc/sysconfig/network-scripts/ifcfg-enp0s5 配置DNS1234# 修改DNS~ vim /etc/resolv.conf# Generated by NetworkManagernameserver 114.114.114.114 123456789101112131415161718192021TYPE=Ethernet # 协议BOOTPROTO=static #! dhcp(动态获取) 静态ipIPADDR=192.168.16.57 #! IP地址NETMASK=255.255.255.0 #! 子网掩码GATEWAY=192.168.16.254 #! 网关DNS1=192.168.16.254 #! DNSDEFROUTE=yesPEERDNS=yesPEERROUTES=yesIPV4_FAILURE_FATAL=noIPV6INIT=yesIPV6_AUTOCONF=yesIPV6_DEFROUTE=yesIPV6_PEERDNS=yesIPV6_PEERROUTES=yesIPV6_FAILURE_FATAL=noIPV6_ADDR_GEN_MODE=stable-privacyNAME=enp0s5UUID=151b7ea3-6585-49b4-8442-e25a9acfbeb6DEVICE=enp0s5 # 设备名称ONBOOT=yes # ! 开机自启动 SSH修改ssh服务配置文件1sudo vi /etc/ssh/sshd_config 12# 远程登录PermitRootLogin yes ifconfig1yum install -y net-tools