samba服务器架设

#samba服务器架设
方便线上linux服务器和windows服务器之间共享

1.关闭防火墙
service iptables stop

2.关闭SELinux
setenforce 0

3.安装samba和samba-client
yum install -y samba samba-client

4.添加用户
useradd test
pdbedit -a test

5.启动samba服务
添加开机启动: chkconfig smb on
立即启动samba:service smb start

6.测试
1)在windows打开我的电脑
2)地址栏输入\\IP

7.自定义共享目录
1)创建共享目录 修改权限
mkdir -p /var/www/html
chmod -R 777 /var/www/html
2)修改配置文件: /etc/samba/smb.conf
添加如下内容
[html] #共享目录名称
path = /var/www/html #共享目录位置
browseable = yes #是否可以浏览
writable = yes #是否可以写入
public = no #是否公开或者公共
[html]
path = /var/www/html
browseable = yes
writable = yes
public = no

猜你喜欢

转载自www.cnblogs.com/weizaiyes/p/9146088.html