在挂载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.178linux.com/24784