Centos7.3搭建samba服务器,和windows共享文件

Centos7.3搭建samba服务器,和windows共享文件
centos7.3的ip为192.168.11.129
1,安装samba服务
[root@localhost ~]# yum -y install samba*
Centos7.3搭建samba服务器,和windows共享文件
Centos7.3搭建samba服务器,和windows共享文件

2,创建共享目录并修改权限并编辑配置文件
[root@localhost ~]# mkdir -p /home/study
[root@localhost ~]# chmod u+x /home/study/
修改selinux限制
[root@localhost samba]# setsebool -P samba_export_all_rw=on
配置文件/etc//samba/smb.conf,习惯性对 配置文件 进行备份
[root@localhost samba]# cp smb.conf smb_back.conf
编辑配置文件
[root@localhost samba]# vim smb.conf
[study]
path = /study
browseable = yes
guest ok = no
writable = yes
Centos7.3搭建samba服务器,和windows共享文件

3,配置samba登录帐号
[root@localhost ~]# smbpasswd -a study
Centos7.3搭建samba服务器,和windows共享文件
4,配置防火墙
[root@localhost ~]# firewall-cmd --permanent --add-service=samba
[root@localhost ~]# firewall-cmd –reload
Centos7.3搭建samba服务器,和windows共享文件
5,设置samba服务重启并自启动
[root@localhost ~]# systemctl restart smb nmb
[root@localhost ~]# systemctl enable smb nmb
6,在windows测试
Centos7.3搭建samba服务器,和windows共享文件
Centos7.3搭建samba服务器,和windows共享文件
Centos7.3搭建samba服务器,和windows共享文件

配置成功

猜你喜欢

转载自blog.51cto.com/11293100/2401943
今日推荐