1:安装samba
(1)配置yum升级安装samba
首先推荐几个教育网和国内的fc镜像:
(1)配置yum升级安装samba
首先推荐几个教育网和国内的fc镜像:
[url]http://mirror.vmmatrix.net/[/url] CDN Auto Select
[url]http://dxmirror.vmmatrix.net/[/url] China Telecom
[url]http://cncmirror.vmmatrix.net/[/url] China Netcom
[url]http://dxmirror.vmmatrix.net/[/url] China Telecom
[url]http://cncmirror.vmmatrix.net/[/url] China Netcom
配置下面是fc的源的配置文件
/etc/yum.repos.d/
fedora-core.repo
fedora-extras.repo
fedora-updates.repo
/etc/yum.repos.d/
fedora-core.repo
fedora-extras.repo
fedora-updates.repo
配置fedora-core.repo
[core]
name=Fedora Core $releasever - $basearch
baseurl=http://mirror.vmmatrix.net/Fedora/core/5/i386/os/
mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-$releasever
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
配置fedora-extras.repo
[extras]
name=Fedora Extras $releasever - $basearch
baseurl=http://mirror.vmmatrix.net/Fedora/extras/5/i386/
mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-$releasever
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=1
[core]
name=Fedora Core $releasever - $basearch
baseurl=http://mirror.vmmatrix.net/Fedora/core/5/i386/os/
mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-$releasever
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
配置fedora-extras.repo
[extras]
name=Fedora Extras $releasever - $basearch
baseurl=http://mirror.vmmatrix.net/Fedora/extras/5/i386/
mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-$releasever
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=1
[extras-debuginfo]
name=Fedora Extras $releasever - $basearch - Debug
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/debug/
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=1
name=Fedora Extras $releasever - $basearch - Debug
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/debug/
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=1
[extras-source]
name=Fedora Extras $releasever - Source
baseurl=http://mirror.vmmatrix.net/Fedora/extras/5/SRPMS/
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=1
name=Fedora Extras $releasever - Source
baseurl=http://mirror.vmmatrix.net/Fedora/extras/5/SRPMS/
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=1
配置fedora-updates.repo
[updates]
name=Fedora Core $releasever - $basearch - Updates
baseurl=http://mirror.vmmatrix.net/Fedora/core/updates/5/i386/
mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc$releasever
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
(2)先运行 yum update
然后 yum install samba
2 samba使用
smbtree [-b] [-D] [-U] 查看局域网共享
nmblookup cpname 知道主机名查看cpnmame的ip地址
nmblookup \* 显示活动主机
smbclient -L 219.224.14.222 -U administrator 查看共享内容
smbclient //219.224.14.222/共享名 -U administrator 访问共享内容
mount -t cifs -o username=administrator%icandoq1 添加网络资源 //219.224.14.222/linux /mnt/xp
nmblookup cpname 知道主机名查看cpnmame的ip地址
nmblookup \* 显示活动主机
smbclient -L 219.224.14.222 -U administrator 查看共享内容
smbclient //219.224.14.222/共享名 -U administrator 访问共享内容
mount -t cifs -o username=administrator%icandoq1 添加网络资源 //219.224.14.222/linux /mnt/xp
useradd username 添加samba访问帐户
smbpasswd -a username
smbpasswd -a username
3 samba服务器配置
配置文件 /etc/samba/smb.conf
workgroup=workgroup
security=share
[etc]
path=/etc
comment=share etc
public=yes
配置文件 /etc/samba/smb.conf
workgroup=workgroup
security=share
[etc]
path=/etc
comment=share etc
public=yes
4 重新启动samb服务器
service smb restart
chkconfig smb on
service smb restart
chkconfig smb on
本文转自 abner110 51CTO博客,原文链接http://blog.51cto.com/abner/147038,如需转载请自行联系原作者