redhat 5.5 x86_x64搭建samba服务器

1、搭建之前检查环境

[root@sergs14 ~]# rpm -qa | grep samba
samba-client-3.0.33-3.28.el5
samba-common-3.0.33-3.28.el5
[root@sergs14 ~]# 

 

一般情况下,如果在安装操作系统时没有具体指定 ,系统会默认只安装上面两个包;

2、通过yum安装samba服务器所需包

[root@gaosheng Server]# yum install samba-3.0.33-3.28.el5.x86_64.rpm 
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
base                                                                                                                   | 1.3 kB     00:00     
Setting up Install Process
Examining samba-3.0.33-3.28.el5.x86_64.rpm: samba-3.0.33-3.28.el5.x86_64
Marking samba-3.0.33-3.28.el5.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package samba.x86_64 0:3.0.33-3.28.el5 set to be updated
--> 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
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================
 Package                           Arch                   Version                         Repository                                     Size
==============================================================================================================================================
Installing:
 samba                             x86_64                 3.0.33-3.28.el5                 /samba-3.0.33-3.28.el5.x86_64                  30 M
Installing for dependencies:
 perl-Convert-ASN1                 noarch                 0.20-1.1                        base                                           41 k

Transaction Summary
==============================================================================================================================================
Install       2 Package(s)
Upgrade       0 Package(s)

Total size: 30 M
Total download size: 41 k
Is this ok [y/N]: y
Downloading Packages:
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 37017186


Public key for samba-3.0.33-3.28.el5.x86_64.rpm is not installed

 

如果报上述错误,说明yum安装了旧版本的GPG keys造成的,解决办法是可以运行下面命令:

[root@gaosheng Server]# rpm --import /etc/pki/rpm-gpg/RPM*

 

3、再次执行安装,成功

[root@gaosheng Server]# yum install samba-3.0.33-3.28.el5.x86_64.rpm 
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Examining samba-3.0.33-3.28.el5.x86_64.rpm: samba-3.0.33-3.28.el5.x86_64
Marking samba-3.0.33-3.28.el5.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package samba.x86_64 0:3.0.33-3.28.el5 set to be updated
--> 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
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================
 Package                       Arch               Version                     Repository                                 Size
==============================================================================================================================
Installing:
 samba                         x86_64             3.0.33-3.28.el5             /samba-3.0.33-3.28.el5.x86_64              30 M
Installing for dependencies:
 perl-Convert-ASN1             noarch             0.20-1.1                    base                                       41 k

Transaction Summary
==============================================================================================================================
Install       2 Package(s)
Upgrade       0 Package(s)

Total size: 30 M
Total download size: 41 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : perl-Convert-ASN1                                                                                                      1/2 
error: failed to stat /media/RHEL_5.5 x86_64 DVD: No such file or directory
  Installing     : samba                                                                                                                  2/2 

Installed:
  samba.x86_64 0:3.0.33-3.28.el5                                                                                                              

Dependency Installed:
  perl-Convert-ASN1.noarch 0:0.20-1.1                                                                                                         

Complete!
[root@gaosheng Server]# 

 

4、检查samba所需包是否存在

[root@gaosheng Server]# rpm -qa | grep samba
samba-common-3.0.33-3.28.el5
samba-client-3.0.33-3.28.el5
samba-3.0.33-3.28.el5
[root@gaosheng Server]# 

 

5、重新启动sam服务

--第一次重启,会报[FAILED],那是因为之前从来没有开启过
[root@gaosheng ~]# service smb restart Shutting down SMB services: [FAILED] Shutting down NMB services: [FAILED] Starting SMB services: [ OK ] Starting NMB services: [ OK ]
--再次重启没有[FAILED] [root@gaosheng
~]# service smb restart Shutting down SMB services: [ OK ] Shutting down NMB services: [ OK ] Starting SMB services: [ OK ] Starting NMB services: [ OK ]

 

 

命令行查看

C:\Users\qj.zhang>net use
会记录新的网络连接。


状态       本地        远程                      网络

-------------------------------------------------------------------------------
已断开       Z:        \\192.168.70.243\gs\网络部\
                                                Microsoft Windows Network
已断开                 \\192.168.9.8\linuxserA   Microsoft Windows Network
已断开                 \\192.168.9.8\funddir     Microsoft Windows Network
OK                     \\192.168.9.10\IPC$       Microsoft Windows Network
命令成功完成。

 

 

 

 

 

 

 

 

参考文章

如何清除Windows共享登录的用户名密码

smb相关命令

posted @ 2014-03-26 11:37  ArcerZhang  阅读(532)  评论(0编辑  收藏  举报