共计 8521 个字符,预计需要花费 22 分钟才能阅读完成。
首先配置本地 yum 源,需要在本机拥有操作系统的 iso 安装文件,以下以 Oracle linux 为例
# cd /etc/yum.repos.d
– 将其他 repo 文件重命名
# ls
public-yum-el5.repo.1 public-yum-el5.repo.2 public-yum-el5.repo.bk
– 创建新 repo 文件,Server 文件夹为 rpm 软件包的路径
# vi local_yum_el5.repo
[oelr5u8]
name=oelr5u8
baseurl=file:///mnt/Server
gpgcheck=0
enabled=1
# yum clean all
# yum list
# yum install oracle-validated
[root@rh56 dev]# yum install samba
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
oelr5u8 | 1.1 kB 00:00
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package samba.x86_64 0:3.0.33-3.37.el5 set to be updated
–> Processing Dependency: samba-common = 3.0.33-3.37.el5 for package: samba
–> Processing Dependency: perl(Convert::ASN1) for package: samba
–> Running transaction check
—> Package perl-Convert-ASN1.noarch 0:0.20-1.1 set to be updated
—> Package samba-common.x86_64 0:3.0.33-3.37.el5 set to be updated
–> Processing Dependency: libsmbclient = 3.0.33-3.37.el5 for package: samba-common
–> Running transaction check
—> Package libsmbclient.i386 0:3.0.33-3.37.el5 set to be updated
—> Package libsmbclient.x86_64 0:3.0.33-3.37.el5 set to be updated
–> Finished Dependency Resolution
Dependencies Resolved
==========================================================================================================================
Package Arch Version Repository Size
==========================================================================================================================
Installing:
samba x86_64 3.0.33-3.37.el5 oelr5u8 16 M
Installing for dependencies:
perl-Convert-ASN1 noarch 0.20-1.1 oelr5u8 42 k
samba-common x86_64 3.0.33-3.37.el5 oelr5u8 6.8 M
Updating for dependencies:
libsmbclient i386 3.0.33-3.37.el5 oelr5u8 908 k
libsmbclient x86_64 3.0.33-3.37.el5 oelr5u8 917 k
Transaction Summary
==========================================================================================================================
Install 3 Package(s)
Upgrade 2 Package(s)
Total download size: 25 M
Is this ok [y/N]: y
Downloading Packages:
————————————————————————————————————————–
Total 643 MB/s | 25 MB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : libsmbclient 1/7
Installing : samba-common 2/7
Updating : libsmbclient 3/7
Installing : perl-Convert-ASN1 4/7
Installing : samba 5/7
Cleanup : libsmbclient 6/7
Cleanup : libsmbclient 7/7
Installed:
samba.x86_64 0:3.0.33-3.37.el5
Dependency Installed:
perl-Convert-ASN1.noarch 0:0.20-1.1 samba-common.x86_64 0:3.0.33-3.37.el5
Dependency Updated:
libsmbclient.i386 0:3.0.33-3.37.el5 libsmbclient.x86_64 0:3.0.33-3.37.el5
Complete!
Samba 的详细介绍:请点这里
Samba 的下载地址:请点这里
相关阅读:
Samba 文件共享 - 实现异构通信 http://www.linuxidc.com/Linux/2013-03/81152.htm
VMWare 虚拟机 Ubuntu 双网卡 访问 samba 速度 翻倍 http://www.linuxidc.com/Linux/2013-06/85445.htm
Samba 文件共享服务器加入 Windows Server 2003 域 http://www.linuxidc.com/Linux/2013-06/86391.htm
Samba 安装配置 http://www.linuxidc.com/Linux/2013-06/86101.htm
CentOS 6.2 下 Samba 服务的配置 http://www.linuxidc.com/Linux/2013-01/78390.htm
Win7+VMware+Fedora18 Samba 服务器的搭建图解 http://www.linuxidc.com/Linux/2013-01/78234.htm
然后配置 samba 服务
[global]
workgroup = LinuxSir
netbios name = LinuxSir05
server string = Linux Samba Server TestServer
security = share
[Youthsoft]
path = /u01/test01
writeable = yes
browseable = yes
guest ok = yes
创建 linux 下的共享目录 /u01/test01
[root@rh56 samba]# mkdir /u01/test01
要确保远程用户拥有全部的权限,需要在 linux 操作系统下拥有 nobody 用户
[root@rh56 samba]# chown -R nobody:nobody /u01/test01
[root@rh56 samba]# id -a nobody
uid=99(nobody) gid=99(nobody) groups=99(nobody)
[root@rh56 samba]# smbd
[root@rh56 samba]# nmbd
[root@rh56 samba]# ls /u01/test01
重启服务
[root@rh56 samba]# service smb restart
Shutting down SMB services: [OK]
Shutting down NMB services: [OK]
Starting SMB services: [OK]
Starting NMB services: [OK]
然后在 windows 下输入网络地址即可看到相应的共享目录
例如本例中 ip 地址为 192.168.1.54
则在 windows 下运行
\\192.168.1.54
即可看到已经共享的目录,并且拥有全部的权限操作这个目录
进阶设定 – 设置权限
smb.conf 添加配置
[file1]
path = /u01
read only = no
public = no
valid users = @Oracle
write list = oracle
添加 smb 用户,用户名为 oracle
pdbedit -a -u oracle
为 smb 用户设置密码
smbpasswd oracle
接下来使用
\\192.168.100.54\file1
将会要求输入密码,输入刚才创建的 smb 用户 oracle 以及相应的密码即可进入 linux 共享的文件夹下面。
Windows 下写入的文件属性以操作系统上的 oracle 用户默认属性为准。
首先配置本地 yum 源,需要在本机拥有操作系统的 iso 安装文件,以下以 Oracle linux 为例
# cd /etc/yum.repos.d
– 将其他 repo 文件重命名
# ls
public-yum-el5.repo.1 public-yum-el5.repo.2 public-yum-el5.repo.bk
– 创建新 repo 文件,Server 文件夹为 rpm 软件包的路径
# vi local_yum_el5.repo
[oelr5u8]
name=oelr5u8
baseurl=file:///mnt/Server
gpgcheck=0
enabled=1
# yum clean all
# yum list
# yum install oracle-validated
[root@rh56 dev]# yum install samba
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
oelr5u8 | 1.1 kB 00:00
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package samba.x86_64 0:3.0.33-3.37.el5 set to be updated
–> Processing Dependency: samba-common = 3.0.33-3.37.el5 for package: samba
–> Processing Dependency: perl(Convert::ASN1) for package: samba
–> Running transaction check
—> Package perl-Convert-ASN1.noarch 0:0.20-1.1 set to be updated
—> Package samba-common.x86_64 0:3.0.33-3.37.el5 set to be updated
–> Processing Dependency: libsmbclient = 3.0.33-3.37.el5 for package: samba-common
–> Running transaction check
—> Package libsmbclient.i386 0:3.0.33-3.37.el5 set to be updated
—> Package libsmbclient.x86_64 0:3.0.33-3.37.el5 set to be updated
–> Finished Dependency Resolution
Dependencies Resolved
==========================================================================================================================
Package Arch Version Repository Size
==========================================================================================================================
Installing:
samba x86_64 3.0.33-3.37.el5 oelr5u8 16 M
Installing for dependencies:
perl-Convert-ASN1 noarch 0.20-1.1 oelr5u8 42 k
samba-common x86_64 3.0.33-3.37.el5 oelr5u8 6.8 M
Updating for dependencies:
libsmbclient i386 3.0.33-3.37.el5 oelr5u8 908 k
libsmbclient x86_64 3.0.33-3.37.el5 oelr5u8 917 k
Transaction Summary
==========================================================================================================================
Install 3 Package(s)
Upgrade 2 Package(s)
Total download size: 25 M
Is this ok [y/N]: y
Downloading Packages:
————————————————————————————————————————–
Total 643 MB/s | 25 MB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : libsmbclient 1/7
Installing : samba-common 2/7
Updating : libsmbclient 3/7
Installing : perl-Convert-ASN1 4/7
Installing : samba 5/7
Cleanup : libsmbclient 6/7
Cleanup : libsmbclient 7/7
Installed:
samba.x86_64 0:3.0.33-3.37.el5
Dependency Installed:
perl-Convert-ASN1.noarch 0:0.20-1.1 samba-common.x86_64 0:3.0.33-3.37.el5
Dependency Updated:
libsmbclient.i386 0:3.0.33-3.37.el5 libsmbclient.x86_64 0:3.0.33-3.37.el5
Complete!
Samba 的详细介绍:请点这里
Samba 的下载地址:请点这里
相关阅读:
Samba 文件共享 - 实现异构通信 http://www.linuxidc.com/Linux/2013-03/81152.htm
VMWare 虚拟机 Ubuntu 双网卡 访问 samba 速度 翻倍 http://www.linuxidc.com/Linux/2013-06/85445.htm
Samba 文件共享服务器加入 Windows Server 2003 域 http://www.linuxidc.com/Linux/2013-06/86391.htm
Samba 安装配置 http://www.linuxidc.com/Linux/2013-06/86101.htm
CentOS 6.2 下 Samba 服务的配置 http://www.linuxidc.com/Linux/2013-01/78390.htm
Win7+VMware+Fedora18 Samba 服务器的搭建图解 http://www.linuxidc.com/Linux/2013-01/78234.htm