1. 安装samba
yum -y install samba
2. 修改samba配置文件
vi /etc/samba/smb.conf
增加一下内容:
[global]
workgroup = WORKGROUP
server string = file Server
security = share
[share]
path = /opt/public
writable = yes
guest ok = yes
3. 修改共享目录的访问权限
chmod 777 /opt/public
4. 让selinux失去作用
setenforce 0
5. 关闭防火墙
service iptables stop
6. 重启samba服务
service smb restart
7. 从win7访问samba目录
win键+r,输入\\centos的ip地址即可