简单快速搭建samba服务器

来源:互联网 发布:文本聚类算法 编辑:程序博客网 时间:2024/06/06 09:29

平台系统 CentOS6.4  64位。最小化安装。vmware上搭建


1. 安装samba

yum install samba


  2. 建立共享目录。

  这里在/data/

修改权限

[root@localhost /]# chmod -R 777 data
[root@localhost /]# chown -R nobody.nobody data


3. 修改配置 文件 

vim  /etc/samba/smb.conf



下边是修改的东东

在GLOBAL区域添加以下内容

[global]
dos charset = GB2312
unix charset = GB2312
display charset = GB2312
directory mask = 0777
force directory mode = 0777
directory security mask = 0777
force directory security mode = 0777
cretae mask = 0777
force create mask = 0777
security mask = 0777
force security mode = 0777



        security = share
#       passdb backend = tdbsam



[data]
comment=Public Stuff
path=/data
public=yes
writable=yes


保存

4. 启动samba服务

service smb start


5. 设置自启动

chkconfig --level 35 smb on



6.   关闭iptables 

 service iptables stop
iptables:清除防火墙规则:                                 [确定]
iptables:将链设置为政策 ACCEPT:filter                    [确定]
iptables:正在卸载模块:                                   [确定]
[root@localhost ~]# chkconfig --level 3 iptables off


6. window连接 \\服务器IP\共享目录名这里是data

成功后,验证是否可以建立文件。

建立映射驱动器

 如果不可以尝试重启动一下 linux

原创粉丝点击