RedHat 安装和配置samba服务器

1、从系统ISO镜像中找到samba安装文件:

samba-client-3.0.33-3.28.el5.i386.rpm

samba-common-3.0.33-3.28.el5.i386.rpm

samba-3.0.33-3.28.el5.i386.rpm 

perl-Convert-ASN1-0.20-1.1.noarch.rpm  (安装samba的时候需要被引用到)


2、依次安装:

 rpm -ivh perl-Convert-ASN1-0.20-1.1.noarch.rpm

rpm -ivhsamba-common-3.0.33-3.28.el5.i386.rpm

rpm -ivh samba-3.0.33-3.28.el5.i386.rpm 

 rpm -ivh samba-client-3.0.33-3.28.el5.i386.rpm


3、查看是否已安装:

[root@localhost samba]# rpm -qa|grep samba
samba-3.0.33-3.28.el5
samba-common-3.0.33-3.28.el5
samba-client-3.0.33-3.28.el5
   (已经成功安装了)


4、修改samba配置文件:

vi /etc/samba/smb.conf

修改如下:

  workgroup = MYGROUP         server string = Samba Server Version %v ;       netbios name = MYSERVER ;       interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24 192.168.1.1/24 ;       hosts allow = 127. 192.168.12. 192.168.13. 192.168.1.

……

……

# ----------------------- Standalone Server Options ------------------------ # # Security can be set to user, share(deprecated) or server(deprecated) # # Backend to store user information in. New installations should # use either tdbsam or ldapsam. smbpasswd is available for backwards # compatibility. tdbsam requires no further configuration.         security = share         passdb backend = tdbsam

……

……

# A publicly accessible directory, but read only, except for people in # the "staff" group ;       [public] ;       comment = Public Stuff ;       path =  /usr/local/XXXXX ;       public = yes ;       writable = yes ;       printable = no ;       write list = +staff

最后新增("hxquan"就是windows下映射网络驱动器所需要的文件名):

# This is samba text  [hxquan]      comment = hxquan      path = /usr/local/hxquan     writable = yes      public = yes 

(也可以通过命令chcon -R -t samba_share_t /usr/local/XXXX共享一个文件夹)

5、重启samba服务:

[root@localhost samba]# service smb restart Shutting down SMB services:                                [FAILED] Shutting down NMB services:                                [FAILED] Starting SMB services:                                     [  OK  ] Starting NMB services:                                     [  OK  ]   (重启成功)

6、windows下映射网络驱动器:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值