• Ubuntu14.04 下安装Samba服务


    1.更改linux镜像源:

    # vim /etc/apt/sources.list
    
    deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
    deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
    deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
    deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
    deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
    deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
    deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
    deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
    deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
    deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse

    2.更新源列表

    apt-get update
    apt-get upgrade

    3.安装samba

    apt-get install samba samba-common

    4.新建共享目录并设置权限

    mkdir /webser/www/
    chmod 777 /webser/www/

    5.配置文件smb.conf

    vim /etc/samba/smb.conf
    
    在末尾添加:

    security = user

    
    

    [share]
    comment = share directory
    path = /var/www/html
    browsealbe = yes
    writable = yes

     

    6.添加共享用户

    useradd smbuser
    
    smbpasswd -a smbuser

    7.重启smb服务

    service smbd restart

    8.在windows下 访问共享目录: 在"运行"窗口中输入"\192.168.38.128"【ubuntu ip】-->回车-->双击打开share-->回车-->输入用户名和密码-->回车-->访问成功。

    linux下目录对应是:

  • 相关阅读:
    【C# 代码小技巧】巧用 linq select 实现遍历集合返回元素 index
    [转载] redis 学习
    Html5 Canvas斗地主游戏
    K-近邻算法(KNN)
    Sql 把Xml字符串转换成一张表
    Asp.Net Mvc4分页,扩展HtmlHelper类
    SQL 分割字符串
    http://q.cnblogs.com/q/54251/
    读强化学习论文之MADDPG
    【回归】记Paddle强化学习训练营
  • 原文地址:https://www.cnblogs.com/justphp/p/6511600.html
Copyright © 2020-2023  润新知