您的位置:首页 > 理论基础 > 计算机网络

网络共享文件系统客户端配置

2016-09-07 17:04 267 查看


1.cifs

如何访问1

1)yum install samba-client

2)smbclient -L //ip

3)smbclient //ip/sharename

如何访问2

mount //ip/sharename /mountpoint -o username=guest

vim /etc/fstab

//ip/sharename /mountpoint cifsdefaults,username=guest 0 0

mount -a

 

2.nfs

手动挂载方式

1)yum install nfs-utils

2)showmount -e ip

3)mount ip:/sharedir /mountpoint

自动挂载方式

1)yum install autofs

2)systemctl start autofs

3)cd /net/ip/

4)vim /etc/syscofig/autofs

TIMEOUT=5

 

5).自定义挂载方式

vim /etc/auto.master

最终挂载点的上层目录自策略文件

/nfs/etc/auto.nfs

vim 自策略文件(vim /etc/auto.nfs)

最终挂载点网络挂载资源

nfs1172.25.254.250:/nfsshare/nfs1

*172.25.254.250:/nfsshare/&


systemctl restart autofs

 

cd /nfs/nfs1

[root@westos nfs1]# df

Filesystem                    1K-blocks     Used Available Use% Mounted on

/dev/vda1                      10473900  3262308   7211592  32% /

devtmpfs                         927072        0    927072   0% /dev

tmpfs                            942660        0    942660   0% /dev/shm

tmpfs                            942660    16968    925692   2% /run

tmpfs                            942660        0    942660   0% /sys/fs/cgroup

/dev/vdb1                       1038336   749744    288592  73% /pub

172.25.254.250:/nfsshare/nfs1 100221952 57231360  42990592  58% /nfs/nfs1



内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  共享 客户端