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

  • 相关阅读:
    django-orm基础字段及选项1
    django-模型层
    django-应用及分布式路由
    django-static配置静态文件
    django-url反向解析
    django-url路径书写规范
    django-模板继承 block、endblock、 extend
    详解HTML中的表单元素
    详解HTML中的表格标签
    jQuery和AJAX基础
  • 原文地址:https://www.cnblogs.com/timlong/p/3690356.html
Copyright © 2011-2022 走看看