參考此處的安裝方法,如果沒網路的話 .
http://blog.chinaunix.net/space.php?uid=20715874&do=blog&cuid=733101
通常是有網路的, 所以沒必要那麼麻煩 。隨後就來 ^_^
--------------------------------------------------------------------
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
剛入門網路, 很水, 希望備忘和能幫到需要的人 ^_^