1 NFS
Yum install nfs-utils-y
/Etc/init. d/rpcbind start
/Etc/init. d/nfs start
Showmout-e
VI/etc/exports
/Mnt 192.168.0.0/24 (RO)
Exportfs-RV
Exportfs-V
Mount 192.168.0.250:/mnt/
2 CIFS
Yum install samba-client samba-common-y
/Etc/init. d/SMB start
Smbclient-l // 192.168.0.250
Smbpasswd-A Admin
Smbpasswd-a hello
Pdbedit-l
Smbclient-l // 192.168.0.250-u hello
CD/etc/samba/
Ls
Change VI smb. conf as follows:
Workgroup = westos
Server String = Samba server version % v
Security = shared
Passdb backend = tdbsam
[Test]
Comment = LocalSystem-MNT
Path =/mnt
Public = Yes
Writable = Yes
/Etc/init. d/SMB reload
If smbclinet-l // 192.168.0.250/test is configured as share, do not enter the password when prompted. Remember. Do not report the following error:
Server not using user level security and nopassword supplied.
Server requested LANMAN password (share-level security) But 'client LANMAN auth = no' or 'client NTLMv2 auth = yes'
Tree connect failed: nt_status_access_denied
Chmod 755/mnt/
Getsebool-A | grep samba
Setsebool-P samba_export_all_ro on
Setenforce 0
In the main configuration file of Samba
Hosts allow = 192.168.0.254 127. Accessible IP Address
1. Install the samba service Yum installsamba-client-y Yum install samba-common-y
View Samba shares
Smbclient-l // 192.168.0.254 view the samba folder shared by 254.
Mount // 192.168.0.254/pub/root/desktop/pub-O username = guest
2 automatic mounting upon startup: VI/etc/fstab is as follows:
// 192.168.0.254/pub/root/desktop/pub CIFS ults, uername = guest 0 0
3. automatic mounting
Yum install autofs-y
/Etc/init. d/autofs start service
CD 192.168.0.254 automatically mounts the 254 shared directory pub to the local machine.
Change VI/etc/auto. Master as follows:
/Mnt/etc/auto. Pub
Change VI/etc/auto. Pub as follows:
Pub 192.168.0.254:/var/FTP/pub
/Etc/init. d/autofs restart the service
Samba, NFS