zoukankan      html  css  js  c++  java
  • debian最小化安装后网络问题

    vi /etc/network/interfaces
    
    
    vi /etc/resolv.conf
    
    apt-get -y install net-tools
    
    

    content

    cat /etc/resolv.conf

    nameserver 180.76.76.76
    nameserver 8.8.8.8
    

    cat /etc/network/interfaces

    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    source /etc/network/interfaces.d/*
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    allow-hotplug ens33
    iface ens33 inet static #dhcp
    address 192.168.1.130
    netmask 255.255.255.0
    gateway 192.168.1.1
    
    
    
    /etc/init.d/networking restart
    systemctl restart networking.service
    
    

    更换阿里源

    mv /etc/apt/sources.list{,bak}
    cat > /etc/apt/sources.list << EOF
     deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib
        deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib
        deb http://mirrors.aliyun.com/debian-security stretch/updates main
        deb-src http://mirrors.aliyun.com/debian-security stretch/updates main
       deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
        deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
         deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
        deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
        EOF
        apt update
    apt-get -y install net-tools
     apt-get -y install openssh-server
          vi /etc/ssh/sshd_config
          service sshd restart
    
  • 相关阅读:
    一个C# usb与mcu通信的程序,附代码
    基于C#音乐播放器(附代码)
    基于C#俄罗斯方块
    FTP方式部署Azure Web App
    微信接口小例
    基于来信码的短信通知平台
    基于Windows服务的WCF
    基于IIS的WCF
    基于.NET的Excel开发:单元格区域的操作(读取、赋值、边框和格式)
    .NET通过RFC读取SAP数据
  • 原文地址:https://www.cnblogs.com/wobushimashen/p/11602944.html
Copyright © 2011-2022 走看看