zoukankan      html  css  js  c++  java
  • centos 共享文件目录

    # yum install nfs-utils
    
    # mkdir /storage
    
    # cat /etc/exports
    /storage        *(fsid=0,rw,sync,no_root_squash,no_subtree_check,crossmnt)
    
    # service nfs start
    ______________________________________________

    samba 共享目录无法访问 解决方法总结

    https://blog.csdn.net/runningsword/article/details/6890159?utm_medium=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.control&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.control







    配置完成后使用命令
    showmount -e *.*.3.1 查看共享目录

    ————————————————————————————————————————————————————————————————————
    centos7设置共享文件夹(samba)
    https://blog.csdn.net/plychoz/article/details/80737736
    (三大共享文件的方法)
    https://www.cnblogs.com/andriod-html5/archive/2012/05/07/2539224.html

    https://blog.csdn.net/weixin_46545446/article/details/108566730 (smb共享,比较好)

    安装并启动samba

    [root@Kling ~]# yum -y install samba  #使用yum安装samba
    [root@Kling ~]# systemctl start smb nmb #启动 
    [root@Kling ~]# systemctl enable smb  #开机自启
    [root@Kling ~]# systemctl enable nmb  #开机自启

    防火墙放行samba

    [root@Kling ~]# firewall-cmd --permanent --add-service=samba #放行samba服务
    success
    [root@Kling ~]# firewall-cmd --reload #重新加载防火墙
    success

    4,创建共享目录和用户

    [root@Kling /]# mkdir /common  
    [root@Kling /]# useradd kouling
    [root@Kling /]# smbpasswd -a kouling 
    
    [root@Kling /]# pdbedit -L  #查看samba用户
    kouling:1002:
    

    修改配置文件

    [common]
            comment = ziliao
            path = /common
            allow hosts =10.1.100.0/24
            writable = yes
    
    

    语法检查

    [root@Kling /]# testparm 
    Load smb config files from /etc/samba/smb.conf
    Loaded services file OK.
    Server role: ROLE_STANDALONE
    
    Press enter to see a dump of your service definitions
    
    

    设置权限

    [root@Kling /]# chown -R 755 /common/
    
    

    重启服务

    [root@Kling common]# systemctl restart smb
    [root@Kling common]# systemctl restart nmb
     
  • 相关阅读:
    Pycharm 2016 注册码
    在mac上搭建python环境
    Carthage 的使用
    生成唯一的随机字符串
    utf-8 转码--网址转码
    让自己的项目支持 Carthage
    系统自带的语音合成
    个性化 UIAlertController
    cocoaPods 创建自己的依赖库
    appleDoc 使用
  • 原文地址:https://www.cnblogs.com/yaok430/p/9767747.html
Copyright © 2011-2022 走看看