參考此處的安裝方法,如果沒網絡的話,http://www.linuxidc.com/Linux/2012-02/53986.htm
通常是有網絡的, 所以沒必要那麼麻煩 。隨後就來 ^_^
--------------------------------------------------------------------
Host OS : Windows 7.
Guest OS : CentOS 5.7
Virtual Machine : Vmware Player 4 build.
Connection Type: Nat
--------------------------------------------------------------------
打開 Terminal :
#yum install samba
#yum install system-config-samba
#setup disabled SELinux // 此處是為了讓外部訪問CentOS 別被 SELinux 擋住啦
|—Security Level Enabled // 修改
|—Customize –> Allow inconing –> Samba 修改
#system-config-sabma
|—Preference -> Samba Users -> Add User -> 如下圖:
|- Preference -> Server Settings ->Basic -> workgroup : workgroup
|- Preference -> Server Settings ->Basic -> Security : Encrypt Passwards: Yes
|- Add Share -> Access -> Only Allow access to specific users : ***(username)
|- Basic :
#/etc/init.d/smb start 啟動 samba
好了 , 至此可以訪問了 。
#/sbin/ifconfig (此步為了得到現在虛擬機動態分配的地址,你可以給虛擬機設置靜態的ip)
看一下 inet addr:192.168.72.128
回來Winodws OS , 在文件管理器器輸入
\\192.168.72.128
OK , 成功訪問如下 :
PS :
擴展一 :文件夾權限問題 <- 可以用chmod 777 *** 來修改 !
擴展二 : samba 文件配置問題 <- # vi /etc/samba/smb.conf
擴展三 : samba 加入自啟動 <- #vi /etc/gdm/custom.conf
剛入門網絡, 很水, 希望備忘和能幫到需要的人 ^_^