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

    ubuntu 16:

    1.源
    cp /etc/apt/sources.list /etc/apt/sources.list.bkp
    vi /etc/apt/sources.list
    -+{
        deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
        deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
        deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
        deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
        ##测试版源
        deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
        # 源码
        deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
        deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
        deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
        deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
        ##测试版源
        deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
        # Canonical 合作伙伴和附加
        deb http://archive.canonical.com/ubuntu/ xenial partner
        deb http://extras.ubuntu.com/ubuntu/ xenial main
    }
    apt-get update

    2.
    apt-get install tftpd-hpa tftp-hpa
    apt-get install openssh-server
    apt-get install nfs-kernel-server nfs-common
    apt-get install samba smbclient
    apt install ntpdate

    3. account and sshd
    passwd root
    {
        设置root密码
    }

    vi /etc/ssh/sshd_config
    -+{
        PermitRootLogin yes
    }
    /etc/init.d/ssh restart
    reboot


    4. tftp
    mkdir -p /work/tftpboot

    vi /etc/default/tftpd-hpa
    -+ {
        TFTP_DIRECTORY="/work/tftpboot"
    }
    service tftpd-hpa restart

    5. nfs
    mkdir -p /mnt/nfs
    mkdir -p /work/nfs

    vi /etc/exports
    -+{
        /work/nfs *(rw,sync,no_root_squash)
    }
    service portmap restart
    service nfs-kernel-server restart

    showmount -e
    mount -t nfs localhost:/work/nfs /mnt/nfs
    umount /mnt/nfs

    6. samba
    mkdir -p /work/share
    /etc/init.d/samba status
    cp /etc/samba/smb.conf  /etc/samba/smb.conf.bkp
    smbpasswd -a root

    vi /etc/samba/smb.conf
    {
    [global]
            workgroup = WORKGROUP
            netbios name = Ubuntu 16
            server string = Samba Server
            security = user
            encrypt passwords = yes
            max connections = 0
            security = user
            smb passwd file = /etc/samba/smbpasswd
            username map = /etc/samba/smbusers
    [share]
            path = /work/share
            writable = yes
            guest ok = yes
            write list = @root
            validusers = @root
            display charset = UTF-8
            unix charset = UTF-8
            dos charset = cp936
    }

    /etc/init.d/samba restart
    testparm
    smbclient //127.0.0.1/share



  • 相关阅读:
    IoT(Internet of things)物联网入门介绍
    SIP协议解析
    nginx内核优化参考
    下线注册中心微服务
    vscode配置vue+eslint自动保存去除分号,方法与括号间加空格,使用单引号
    linux常见故障整理
    部署Glusterfs
    解决 eslint 与 webstrom 关于 script 标签的缩进问题
    单个maven项目使用阿里云镜像方法
    idea启动tomcat日志乱码解决办法
  • 原文地址:https://www.cnblogs.com/mylinux/p/5939721.html
Copyright © 2011-2022 走看看