配置samba的配置文件 cp /etc/samba/smb.conf /etc/samba/smb.conf.bak vim /etc/samba/smb.conf //改削配置文件smb.conf的内容为下述内容 [global] log file = /var/log/samba/log.%m max log size = 50 security = user map to guest = Bad User [sambadir] path=http://www.mamicode.com/home/ readonly=yes browseable=yes writable = yes guest ok=yes
配置系统文件打开数目上限(因为后续会通过samba文件打开大量文件,所以需要改削此参数) vim /etc/security/limits.conf //文件末尾需要添加如下内容 * soft nofile 65535 * hard nofile 65535 //改削该文件后,,需要reboot,这里暂不reboot,后面*防火墙后也需要reboot
*防火墙 vim /etc/selinux/config #永久*selinux set SELINUX=disabled #SELINUX=enforcing改为SELINUX=disabled //*firewall systemctl stop firewalld systemctl disable firewalld //这里需要reboot才华生效
reboot
启动SAMBA systemctl restart smb #重启 systemctl enable smb #改削为开机启动 systemctl status smb #检察状态
在window文件浏览器里输入\your samba server ip
win10 下开启网络发明。
https://jingyan.baidu.com/article/c275f6ba3ef050e33d756702.html
win10下可能无法访谒共享文件夹解决 //打点员权限进入cmd //开启SMBv1 sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi sc.exe config mrxsmb10 start= auto //*SMBv2 and SMBv3 sc.exe config lanmanworkstation depend= bowser/mrxsmb10/nsi sc.exe config mrxsmb20 start= disabled (需要重启win10)
完毕
centos7 搭建 samba,win10访谒centos7共享的文件路径
标签:samba win10