samba server的架設,小弟是參考鳥哥網站裡面的設定(http://linux.vbird.org/linux_server/0370samba.php)

前言:
這一篇主要主要就是讓 Linux 與 Windows 主機之間能彼此透過『網路上的芳鄰』這個方式來分享檔案。

為何叫samba(森巴)呢?! (節自鳥哥內的samba server的段落)
既然寫成了軟體,想一想,總是需要註冊一下商標吧!因此 Tridgwell 就去申請了 SMBServer (Server Message Block 的簡寫) 這個名字來做為他撰寫的這個軟體的商標,可惜的是,因為 SMB 是沒有意義的文字,因此沒有辦法達成註冊。既然如此的話,那麼能不能在字典裡面找到相關的字詞可以做為商標來註冊呢? 翻了老半天,呵呵!這個 SAMBA 剛好含有 SMB , 又是熱情有勁的拉丁舞蹈的名稱,不然就用這個名字來做為商標好了! 這成為我們今天所使用的 SAMBA 的名稱由來啦! ^_^


我只有架起來,測試幾個功能而已,沒有像鳥哥的網站裡面,那麼的詳細.(也一併附上smb.conf檔給各位參考)
(1) yum install smb
(2) 套件裝好之後,接著就要去config這個檔smb.conf
   gedit /etc/samba/smb.conf
在這裡,我是參考鳥哥網站裡面的設定,只是修改一下小地方
(3)用 testparm 查閱 smb.conf 的語法設定正確性
直接在終端機下 # testparm
(4)沒問題之後,將samba啟動
   /etc/init.d/smb start

(5)記得要將防火牆裡面的samba打勾勾喲,不然的話,你從client端再怎麼弄,都看不到samba server哦

---------------------------------------------------------附上smb.conf----------------------------------------------------------------------
[global]
        workgroup     = workgroup
        netbios name  = FC5-Samba
        server string = This is shlin's samba server!
        unix charset    = utf8
        display charset = utf8
        dos charset     = cp950
        log file = /var/log/samba/%m.log
        max log size = 50
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        dns proxy = no
        template shell = /bin/false
        winbind use default domain = no
 
        #與安全性有關
         hosts allow = 140.96.36.27
         smb ports = 139

        # 與密碼有關的設定項目,包括密碼檔案所在與加密與否喔!
        security = user
        encrypt passwords = yes
        smb passwd file = /etc/samba/smbpasswd

        # 與 NetBIOS name 名稱解析有關的設定
        name resolve order = lmhosts bcast host

#[printers]
#     comment = This is printer
#     printable = yes
#        browsable = yes
#         public = yes
#         valid users = @users administrator
#         path = /var/spool/samba
#         printer admin = administrator

# 新增的每個使用者家目錄及群組用戶哩!
[homes]
        comment = Home directories
        browseable = no
        writable = yes
        valid users = %S
        create mode = 0664
        directory mode = 0775
[public]
        comment = the user groups work directory
        path = /home/public
        public = yes
        writable = yes
        read only = no      
[temp]
        comment   = Temporary file space
        path      = /tmp
        read only = yes
        public    = yes

創作者介紹
創作者 shlin的部落格 的頭像
shlin

shlin的部落格

shlin 發表在 痞客邦 留言(0) 人氣( 10 )