zoukankan      html  css  js  c++  java
  • ubuntu环境配置

    网络配置

    主要文件:/etc/network/interfaces,这里是IP、网关、掩码等的一些配置;

    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    auto eth0
    iface eth0 inet static
    address 192.168.1.11
    netmask 255.255.255.0
    gateway 192.168.1.1

    /etc/resolv.conf这个文件保存DNS的有关信息

    domain localdomain
    search localdomain
    nameserver 114.114.114.114
    nameserver 8.8.8.8

    时间配置

    安装ntp服务

    sudo apt-get install ntp  #服务端程序

    sudo apt-get install ntpdate  #客户端程序

    主配置文件:/etc/ntp.conf

    server ntp.ubuntu.com

    server 0.ubuntu.pool.ntp.org

    server 1.ubuntu.pool.ntp.org

    server 2.ubuntu.pool.ntp.org

    server 3.ubuntu.pool.ntp.org

    配置时区的命令是:
    $sudo dpkg-reconfigure tzdata 
    它会改这两个文件:
    1. /etc/timezone
    2. /etc/localtime
    第一个文件写的是系统的时区, 我的是: Asia/Shanghai
    第二个文件还可以这样改:
    ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

  • 相关阅读:
    【Android
    【数据结构】之链表(C语言描述)
    【数据结构】之顺序表(C语言描述)
    【Android
    【Android
    【Android
    【Android
    【Android
    在线HTTP速度测试(响应时间测试)及浏览器兼容测试
    阿里云 腾讯云 服务器挂载数据盘
  • 原文地址:https://www.cnblogs.com/timlong/p/3690356.html
Copyright © 2011-2022 走看看