Centos6.5 安装 samba

每次重装系统,都需要装 samba,这里记录下。

一般新装的系统都会自带samba相关包,如下:

rpm -qa | grep -i samba

samba-common-3.6.9-164.el6.x86_64 //配置文件及语法校验
samba-winbind-clients-3.6.9-164.el6.x86_64 //windows 域client
samba-winbind-3.6.9-164.el6.x86_64 //windows 域

但是缺少 samba 的可执行包。

直接 yum install samba, 会更新并安装相关的包, 如下:

Running Transaction
Updating : samba-common-3.6.23-20.el6.x86_64 1/9
Updating : samba-winbind-clients-3.6.23-20.el6.x86_64 2/9
Updating : samba-winbind-3.6.23-20.el6.x86_64 3/9
Installing : samba-3.6.23-20.el6.x86_64 4/9
Updating : libsmbclient-3.6.23-20.el6.x86_64 5/9
Cleanup : libsmbclient-3.6.9-164.el6.x86_64 6/9
Cleanup : samba-common-3.6.9-164.el6.x86_64 7/9
Cleanup : samba-winbind-clients-3.6.9-164.el6.x86_64 8/9
Cleanup : samba-winbind-3.6.9-164.el6.x86_64 9/9
Verifying : samba-winbind-3.6.23-20.el6.x86_64 1/9
Verifying : samba-common-3.6.23-20.el6.x86_64 2/9
Verifying : samba-winbind-clients-3.6.23-20.el6.x86_64 3/9
Verifying : samba-3.6.23-20.el6.x86_64 4/9
Verifying : libsmbclient-3.6.23-20.el6.x86_64 5/9
Verifying : samba-winbind-clients-3.6.9-164.el6.x86_64 6/9
Verifying : libsmbclient-3.6.9-164.el6.x86_64 7/9
Verifying : samba-winbind-3.6.9-164.el6.x86_64 8/9
Verifying : samba-common-3.6.9-164.el6.x86_64

安装完成配置 一个帐号:

smbpasswd root -a

添加一个共享目录

cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
vi /etc/samba/smb.conf

添加:

[share]
comment = Public Stuff
path = /home/share
public = yes
writable = yes
browseable = yes

关闭 selinux

setenforce 0

启动 smb 服务器

service smb start
service iptables stop //虚拟机调试
touch test.txt //测试

windows上访问:
\{ip}\share

看到 test.txt

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值