歡迎您光臨本站 註冊首頁

在linux host 上安裝vmware-se rver並配置samba server的痛苦經歷

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

在linux host 上安裝vmware-se rver並配置samba server的痛苦經歷

目的:使用linux host+windows guest的方式,逐步過渡到 完全使用linux 工作
效果:方式做到,但是意識到不可能完全使用linux
過程:
try A:
安裝vmware-workstation-exp-xxxx的一個版本,經歷了九死一生后安裝成功,但是發現是expired,大概是過期的意思吧。failed
try B:
install VMware-server-1.0.2-39867 on fc7,and met a "strange" problem:
[email protected] ~]# /home/software/virtualMachine/vmware-server-distrib/vmware-install.pl
it stop at the following stage:
What is the directory that contains the init scripts?

Unable to copy the source file ./installer/services.sh to the destination fil
/etc/rc.d/init.d/vmware.
Execution aborted.
i searched every corner on internat,even post a thread to linuxquestion.org with my cripled English.but nobody sovled.
at last i guess maybe it caused by not running vmware-install.pl at his own dir,and i tried,GOD!!! just because of it.

after installed vmware in my fc6 host,i installed Windows 2000 as the guest os. it succeeded.
then 我開始配置vmware-server 下的虛擬系統與 linux 主機的文件共享。但是沒有發現與vmware-workstation類似的共享文件夾之類的東西。於是到網路上去找,找到如下這篇文章:
http://hi.baidu.com/rongjch/blog/item/2cb5ba16c154fb53f2de323b.html
裡邊說可以在linux host下配置samba 伺服器,然後共享文件給guest os.還在裡邊提供了一個樣板的smb.conf文件給廣大無辜可憐可悲的網民們。但是如果按照他的那個來配置就錯了。因為這篇看起來技術含量很高的文章害的我自己面壁思過三天。
百般無奈下我想到了vmware-server總應該有個手冊之類的東西吧。果然發現在vmware的網站上提供下載,文件名為:server_vm_manual.pdf
找下來發現是english文。搜到samba關鍵字后,硬著頭皮讀了10頁,便豁然開朗了。
現在把我的閱讀要點介紹如下,希望後來者不要走彎路了,同時也為中國沒有一個翻譯vm手冊的組織而感到悲哀。
1、vmware-server中本來有自帶的、經過修改的、輕量級的samba server,這個可以用來配置linux host與 guest os的共享,但是在vmware-server-1.0
.2的安裝中我沒有發現,估計被閹割了。
2、可以使用linux系統自己的samba-server
3、host 與guest的三種網路關係:橋接、NAT、hostonly都可以配置samba server的,但是手冊里只有hostonly、橋接、同時使用(hostonly、橋接)方式的例子smb.conf,沒有NAT的例子。但是這個已經足夠,下面是我測試成功的smb.conf
host:fc6 guest:windows 2000 pro
# This is the VMware(TM) Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options
# most of which are not shown in this example
#
# Any line that starts with a ; (semicolon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentary and a ; for parts of the config file that you
# may wish to enable
#
#
# Configuration file for Samba 2.0.6 vmware-mbd operating on
# vmnet1.
#
# This file was generated by the VMware configuration
# program and modified for this document.
#
# If you modify it, it will be backed up the next time you run the
# configuration program.
# Global settings

# This should be polled at install time from the private subnet created by
# vmware-config.pl
#By default Samba will accept connections on any address.
;socket address = 192.168.183.1
interfaces = vmnet8
bind interfaces only = yes
workgroup = WORKGROUP
netbios name = Fedora Core 6
server string = Samba-3.0.24-7.fc6
security = user
encrypt passwords = yes
# Note: Printers not loaded in this example. Resource definitions commented
# below.
; load printers = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
# VMware extension to use a different shared memory access key on each
# Samba server running on this host
#sysv shm key = /dev/vmnet1
; log file = /etc/vmware/vmnet1/smb/var/log.smb
; log level = 1
; max log size in KB
; max log size = 50
;lock directory = /etc/vmware/vmnet1/smb/var/locks
smb passwd file = /etc/samba/smbpasswd
;codepage dir = /usr/lib/vmware/smb/codepages
;dns proxy = no
# Shared resources
# Home directories
;
;comment = Home directories
;browseable = yes
;writable = yes
# Printers
;
; comment = All printers
; path = /var/lpd
; browseable = no
; guest ok = no
; writable = no
; printable = yes

comment = Windows D:/
path = /media/d
browseable = yes
writeable = yes


comment = Windows E:/
path = /media/e
browseable = yes
writeable = yes

其實配置過一般目的samba的人都知道大部分選項。
為vmware-server配置關鍵的一點就是
interfaces = vmnet8#這個是為nat的網路介面配置的
如果是橋接把他換成interfaces = vmnet1就可以了
這樣就可以在guest os 比如win2000的網上鄰居里看到host的共享文件了,當然要輸入用戶名和密碼,注意為samba共享添加用戶的命令是smbpasswd -a user.如果有人圖省事可以在win中使用映射網路驅動器。
4、手冊中還對host和guest的密碼保存方式做了要求,即如果host 中samba的密碼是clear text的,那麼guest里的也應該是這樣的,反之同理。
5、在閱讀vmware-server英文手冊的過程中我還在networking 一章看到了圖解的三種網路關係,想到我們自己在網上討論三種網路關係,有人還根據自己的理解畫了圖出來,真是智力的嚴重浪費。希望研究vmware的同仁們能夠引以為戒,畢竟精力是有限的,生命也是有限的,方法是最重要的。
初學linux 和 vmware,請多指教!!
《解決方案》

目的:使用linux host+windows guest的方式,逐步過渡到 完全使用linux 工作
效果:方式做到,但是意識到不可能完全使用linux

我現在的工作方式就是你的目的中描述的,使用linux做為host,在之上使用基於vmware 的winxp,安裝office 等軟體,並且在linux上使用samba,把必需的文件共享給虛擬winxp使用,效果非常。當然,如果系統內存只有512M話,虛擬winxp運行得比較慢,好在我有1G內存,分給winxp約有340M內存,運行速度在非常好。

[火星人 ] 在linux host 上安裝vmware-se rver並配置samba server的痛苦經歷已經有716次圍觀

http://coctec.com/docs/service/show-post-8069.html