centos7 挂载目录至MAC

MAC本用连接CENTOS7 做开发:

CENTOS端:

yum install samba samba-client -y

/etc/samba/smb.conf # 配置

[global]
        workgroup = SAMBA
        security = user
        netbios name = YTKQFD
        server string=Samba Server
        security = user
        map to guest = Bad User

[public]
        path=/home
        public=yes
        writable=yes
        write list=@root

 

复制代码
# 安装nfs
yum install nfs-utils -y

#CentOS 5.x还需要装yum install portmap -y

# vi /etc/exports 填写共享信息 依次是文件夹 允许的ip 权限
/home/wwwroot 192.168.1.*(rw,sync,no_root_squash,no_all_squash,insecure)

#启动
service rpcbind start
service nfs start
复制代码

MAC挂载Centos. 目录:

#若服务端的ip为192.168.44.146(centos)的IP, 依次为共享目录 要挂在的目录

  mount -t nfs 192.168.44.146:/home/ /Users/tony/Desktop/developer

 


posted @ 2017-07-30 12:09  tonycloud  阅读(779)  评论(0)    收藏  举报