1、安装
yum install samba samba-client samba-common -y
2、配置
备份已有配置mv /etc/samba/smb.conf /etc/samba/smb.conf.bkp添加新的配置vim /etc/samba/smb.conf输入以下内容[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = centos
security = user
map to guest = bad user
dns proxy = no
#============================ Share Definitions ==============================
[Public]
path = /data/share/
writable = yes
browsable = yes
guest ok = yes
guest only = yes
create mode = 0777
directory mode = 0777
配置启动服务mkdir -p /data/share/publicsystemctl enable smb.servicesystemctl enable nmb.servicesystemctl restart smb.servicesystemctl restart nmb.service设置防火墙firewall-cmd --permanent --zone=public --add-service=sambafirewall-cmd --reload修改目录访问权限 chmod -R 0755 publicchown -R nobody:nobody public关闭selinux,这里不做描述了 3、试用
windows里在运行里输入:\\ip address
即可访问