Centos7.3搭建samba服务器,和windows共享文件
centos7.3的ip为192.168.11.129
1,安装samba服务
[[email protected] ~]# yum -y install samba*
2,创建共享目录并修改权限并编辑配置文件
[[email protected] ~]# mkdir -p /home/study
[[email protected] ~]# chmod u+x /home/study/
修改selinux限制
[[email protected] samba]# setsebool -P samba_export_all_rw=on
配置文件/etc//samba/smb.conf,习惯性对 配置文件 进行备份
[[email protected] samba]# cp smb.conf smb_back.conf
编辑配置文件
[[email protected] samba]# vim smb.conf
[study]
path = /study
browseable = yes
guest ok = no
writable = yes
3,配置samba登录帐号
[[email protected] ~]# smbpasswd -a study
4,配置防火墙
[[email protected] ~]# firewall-cmd --permanent --add-service=samba
[[email protected] ~]# firewall-cmd –reload
5,设置samba服务重启并自启动
[[email protected] ~]# systemctl restart smb nmb
[[email protected] ~]# systemctl enable smb nmb
6,在windows测试
配置成功
原文地址:https://blog.51cto.com/11293100/2401943