zoukankan      html  css  js  c++  java
  • Ubuntu 18.04 配置

    Ubuntu 18.04 配置IP-静态(UB与其他linux os不同)

    sudo netplan generate
    
    sudo vim /etc/netplan/50-cloud-init.yaml
    
    需修改以下参数:
    
    network:
    
      version: 2
    
      renderer: networkd
    
      ethernets:
    
            eno1:
    
                    dhcp4: no
    
                    dhcp6: no
    
                    addresses: [10.240.176.209/24]
    
                    gateway4: 10.240.176.129
    
                    nameservers:
    
                            addresses: [10.248.2.5,10.239.27.36]
    
     sudo netplan apply 开机自动配置ip(与其他OS不同)

    1、开机自动配置IP

    $ sudo vim /etc/network/interfaces

    auto eth39
    
    iface eth39 inet manual
    
    auto br0
    
    iface br0 inet static
    
    address 10.240.176.207
    
    netmask 255.255.255.128
    
    gateway 10.240.176.129
    
    dns-nameserver 10.248.2.5
    
    dns-nameserver 10.239.27.36
    
    dns-nameserver 172.17.6.9
    
    bridge_ports eth39

    2、重启网络服务生效

    service systemd-networkd restart

     设置镜像源 问题:下载包的时候可能会有以下error log,需重新设置镜像源

    Err 1http://cn.archive.ubuntu.com trusty Release.gpg
    
    W: Failed to fetch 1http://cn.archive.ubuntu.com/ubuntu/dists/trusty/InRelease

    解决方法:

    1、修改源 vim /etc/apt/source.list
    
    2、设置DNS,要不然不能通过域名访问地址
    
    $ sudo vim /etc/resolv.conf
    
    需修改以下参数:
    
    "nameserver 10.248.2.5
    
    nameserver 10.239.27.36
    
    nameserver 172.17.6.9"

     下载DPDK & DTS前需要设置代理

    方法一 终端运行exporthttp_proxy="http://用户名:密码@代理IP:代理端口"也可
    
    方法二 sudo vim /etc/apt/apt.conf    需将
    
    “ Acquire::http::proxy "http://proxy-prc.intel.com:911/";
    
    Acquire::https::proxy "https://proxy-prc.intel.com:911/";
    
    Acquire::ftp::proxy "ftp://proxy-prc.intel.com:911/; ”
    
    添加到以下路径文件中: :/C:Userswuchan4xDocumentsOS issueubuntu-infoapt.conf
  • 相关阅读:
    js 数组分解 解构
    js math 对数和指数处理 expm1 log1p
    highcharts 坐标轴 数值 格式化
    libvirt-qemu-虚拟机设备热插拔
    Linux设备驱动程序加载/卸载方法 insmod和modprobe命令
    mount、umount、fuser命令使用小结
    Linux安全策略配置-pam_tally2身份验证模块
    python处理时间相关的方法
    python中命令行参数
    linux---(6/27)tr命令和sed命令详解
  • 原文地址:https://www.cnblogs.com/eilinge/p/9238953.html
Copyright © 2011-2022 走看看