在掛載glusterFS的客戶機的目錄下,使用samba分享給windows機器使用
1、samba服務的安裝
[root@client01 ~]# yum -y install samba [root@client01 ~]# /etc/init.d/smb restart Shutting down SMB services: [ OK ] Starting SMB services: [ OK ] [root@client01 ~]# /etc/init.d/nmb restart Shutting down NMB services: [ OK ] Starting NMB services: [ OK ] [root@client01 ~]# chkconfig smb on [root@client01 ~]# chkconfig nmb on [root@client01 ~]# vim /etc/samba/smb.conf 配置文件如下: workgroup = WORKGROUP(工作組) server string = Samba Server Version %v(顯示版本) hosts allow = 127. 192.168.1. 10.10.10.(允許登陸的主機) log file = /var/log/samba/log.%m(日志存放的地方) max log size = 50(最大的日志數量) security = user(samba驗證的級別) passdb backend = tdbsam [云盤測試平臺] comment = yunpan browseable = yes writable = yes public = yes path = /glusterFS-mount valid users = wanlong [root@client01 ~]# /etc/init.d/smb restart Shutting down SMB services: [ OK ] Starting SMB services: [ OK ] [root@client01 ~]# /etc/init.d/nmb restart Shutting down NMB services: [ OK ] Starting NMB services: [ OK ]
2、samba用戶的配置
[root@client01 ~]# adduser jifang01 -s /sbin/nologin [root@client01 ~]# id jifang01 uid=501(jifang01) gid=501(jifang01) groups=501(jifang01) [root@client01 ~]# smbpasswd -a jifang01 New SMB password: Retype new SMB password: Added user jifang01.
3、設置本地文件夾權限
[root@client01 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 193G 7.6G 176G 5% / tmpfs 932M 72K 932M 1% /dev/shm /dev/sda1 190M 41M 139M 23% /boot server01:/dht-volume01 79G 1.8G 73G 3% /glusterFS-mount [root@client01 ~]# chmod 777 /glusterFS-mount/ -R
4、在windows服務端映射網絡驅動器后,進行驗證(略)
原創文章,作者:Net21-冰凍vs西瓜,如若轉載,請注明出處:http://www.www58058.com/24784