码迷,mamicode.com
首页 > 系统相关 > 详细

ubuntu 16.04环境配置

时间:2016-10-08 20:29:29      阅读:215      评论:0      收藏:0      [点我收藏+]

标签:

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/rootfs

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

showmount -e
mount -t nfs localhost:/work/rootfs /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



ubuntu 16.04环境配置

标签:

原文地址:http://www.cnblogs.com/mylinux/p/5939721.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!