1.7、samba 部署搭建时时彩源码出售联系方式:QQ:2747044651【征途源码论坛http://t.cn/Eyb4XkK】 和优化 -1
1、samba:可以将linux 目录共享出来,供windows系统访问;类似windows系统共享目录
2、安装 samba 服务:
yum install -y samba samba-client
3、查看samba配置文件
cp /etc/samba/smb.conf /root/smb.conf.bak
sed -i ‘/^#/d’ /etc/samba/smb.conf
sed -i ‘/^$/d’ /etc/samba/smb.conf
sed -i ‘/^;/d’ /etc/samba/smb.conf
vim /etc/samba/smb.conf
[global] ##定义全局的配置
workgroup = MYGROUP
server string = Samba Server Version %v
log file = /var/log/samba/log.%m
max log size = 50
security = user
passdb backend = tdbsam
load printers = yes
cups options = raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[homes]
comment = Home Directories
browseable = no
writable = yes
1
2
3
4
5
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes
1
2
3
4
5
6
7
8
9
10
11
1.8 samba 部署和优化-2
1、需求:共享一个目录,任何人都可以访问,不需要输入用户名和密码,但共享目录只能读取不能写入
2、修改 samba 配置文件
vim /etc/samba/smb.conf
修改:
security = share
添加:
[cjhshare]
comment = share all
path = /data/samba
browseable = yes
public = yes
writable = no
1
2
3
4
5
6
7
8
9
保存退出
3、测试
/etc/init.d/smb start
windows 测试:
\IP \192.168.230.130 //IP
客户端 Linux 系统测试登录samba 共享
yum install -y samba-client
smbclient //IP /模块名
smbclient //192.168.230.130/cjhshare
4、客户端 linux 系统挂载 Samba
yum install -y cifs-utils
mount -t cifs //IP /模块名 /samba/
mount -t cifs //192.168.230.130/cjhshare /samba/
1.9、samba 部署和优化-3