实验01:Samba服务器配置
实验目标:
掌握samba服务器的配置
实验步骤:
Samba服务端:
[root@svr5~]# rpm -q samba
package samba isnot installed
[root@svr5~]# yum list samba
..................
Complete!
Samba客户端:
[root@pc205~]# yum list samba*
Loaded plugins:product-id, refresh-packagekit, security, subscription-manager
This system isnot registered to Red Hat Subscription Management. You can usesubscription-manager to register.
Repositoryrhel-source-beta is listed more than once in the configuration
InstalledPackages
samba-client.x86_64 3.6.9-164.el6
............................
[root@pc205~]# yum -y install samba
..................
Complete!
练习七:配置简单共享
设置并启用tools共享
[root@svr5~]# cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
[root@svr5~]# vim /etc/samba/smb.conf
[global]
74 workgroup = TARENA//工作组名
security= share//允许匿名访问共享
289[tools]
290 comment = Test Share Direstory//共享目录的描述
291 path = /usr/src//指定共享路径
292 public = yes//所有人都可访问
293 read only = yes//默认的权限为只读
重启samba服务
[root@svr5~]# service smb restart
\关闭 SMB 服务: [确定]
启动 SMB 服务: [确定]
练习八:Linux客户机访问共享目录
查询共享列表:smbclient -L //服务器IP地址
访问共享目录:smbclient //服务器IP地址/共享名
mount挂载: mount //服务器IP地址/共享名 挂载点目录
查询共享列表
[root@pc205~]# smbclient -L 192.168.4.5
......................
tools Disk Test Share Direstory
IPC$ IPC IPC Service (Samba Server Version3.6.9-164.el6)
.......................
[root@pc205~]# smbclient -L 192.168.4.5/tools
.................
tools Disk Test Share Direstory
IPC$ IPC IPC Service (Samba Server Version3.6.9-164.el6)
.....................
访问共享目录(直接挂载)
[root@pc205~]# mkdir /mnt/smbdir
[root@pc205~]# mount -t cifs //192.168.4.5/tools /mnt/smbdir/
Password:
[root@pc205~]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda2 ext3 39G 3.6G 33G 10% /
tmpfs tmpfs 495M 224K 495M 1% /dev/shm
/dev/sda1 ext3 194M 30M 155M 17% /boot
/dev/sr0 iso9660 3.6G 3.6G 0 100% /media/RHEL_6.5x86_64 Disc 1
//192.168.4.5/toolscifs 39G 3.5G 34G 10% /mnt/smbdir
问题和经验总结
故障现象:
samba-client软件包无法安装
解决办法:
查看软件包是否有依赖的软件包,如果有的话,先安装依赖的软件包,再安装此软件包
本文出自 “IT” 博客,请务必保留此出处http://9265605.blog.51cto.com/9255605/1552625