日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

          歡迎訪問 生活随笔!

          生活随笔

          當前位置: 首頁 > 运维知识 > linux >内容正文

          linux

          [转] fedora linux下安装vmware tools的最好方法

          發布時間:2025/3/20 linux 58 豆豆
          生活随笔 收集整理的這篇文章主要介紹了 [转] fedora linux下安装vmware tools的最好方法 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
          作者:醉龍凌云
          時間:2007.5.13
          首發:中國虛擬化先鋒網
          說明:轉載請注明所有信息

          功夫不負有心人啊,經過長久的摸索,終于為fedora系統安裝vmware tools找到了一條最佳途徑。
          曾經,我找遍網絡,找到了最專業最實際也曾經是最簡單的辦法為fedora(fedora 6以前版本叫fedora corelinux,7.0后就叫fedora linux)系統安裝vmwaretools,具體如下:(如果大家已經了解這個方法或不想了解這個老方法可以跳過這節)
          ————————————————————————————————————————————————————————————————————
          1,安裝GCC開發工具?
          # Install?software?called by by VMware Tools
          yum install gcc?
          2,安裝內核文件
          # Install kernel header files
          yum install kernel-devel?
          3.檢查內核文件的版本是否匹配,如果不匹配需要進行升級
          # Check it matches the running kernel
          uname -r? ?? ?? ?? ? # running kernel
          rpm -q kernel-devel??# installed kernel headers
          4,第3不中如果不匹配,則需要升級內核文件,升級完后,重新啟動系統
          # It the two versions do not match, run
          yum -y upgrade kernel kernel-devel
          # then reboot (but only if they did not match).?
          5,查找內核文件的位置,安裝VMware-tool工具時候需要(我裝的時候,會自動查找到,不需要手工指定)
          # Find out where the kernel headers are
          ls -d /usr/src/kernels/$(uname -r)*/include
          # You may need this later.
          6,下載虛擬機工具安裝包,即:VMware-tool安裝包,并解壓(具體就是在虛擬機工具欄上,點擊"VM"->"Install VMware Tools",會出現安裝包,選擇*.gz的文件,解壓到一個目錄下就可以)
          以下是命令行中具體實現方法,我是在圖形界面下實現的
          # If you already have VMwareTools-5.5.2-29772.tar.gz
          on disk, SKIP THIS STEP!
          # Download VMware-workstation-5.5.2-29772.tar.gz from vmware.com
          # Extract the VMware Tools iso from it
          tar --strip-components=3 -zxvf VMware-workstation-5.5.2-29772.tar.gz \
          vmware-distrib/lib/isoimages/linux.iso
          # Create a temporary mount point
          mkdir /mnt/vmtools-temp
          # Mount the image
          mount -o loop linux.iso /mnt/vmtools-temp
          # Copy VMware Tools from the mount
          cp /mnt/vmtools-temp/VMwareTools-5.5.2-29772.tar.gz /tmp/
          # Unmount the image and tidy up
          umount /mnt/vmtools-temp
          rmdir /mnt/vmtools-temp
          rm linux.iso
          # Unpack VMware Tools to a temporary directory
          cd /tmp/
          tar zxvf VMwareTools-5.5.2-29772.tar.gz
          7.進入解壓目標目錄,執行以下代碼,一路回車按下來
          cd /tmp/vmware-tools-distrib/
          ./vmware-install.pl

          8.直到該步驟,拷貝粘貼第5步的路徑,然后一直按回車,直到選擇屏幕分辨率。?
          What is the location of the directory of C header files that match your running?
          kernel? [/usr/src/kernels/2.6.18-1.2849.fc6-i686/include]?
          提示信息顯示hgfs模塊安裝有問題,沒關系,下一篇文章中解決。?
          9.到了該步驟,問你是否改變X-window的設置,選y,就可以改變分辨率。?
          Do you want to change your guest X resolution? (yes/no) [no] y?
          Please choose one of the?following?display sizes (1 - 13):?
          [1] "640x480"?
          [2]< "800x600"?
          [3] "1024x768"?
          [4] "1152x864"?
          [5] "1280x800"?
          [6] "1152x900"?
          [7] "128024"?
          [8] "137632"?
          [9] "140050"?
          [10] "1680x1050"?
          [11] "1600x1200"?
          [12] "1920x1200"?
          [13] "2364x1773"?
          Please enter a number between 1 and 13:?
          [3]?
          還不行呢,再跟著下邊的走吧!?
          10,
          I keep several?Linux?distributions running on VMware Workstation due tomy work. Unfortunately, due to recent changes in the Linux kernel, youcannot properly compile the vmhgfs driver on Fedora Core 6.Fortunately, I have a workaround until VMware releases a proper fix.?
          First, go to /usr/lib/vmware-tools/modules/source and unpack vmhgfs.tar like this:?
          ******************ggggggggggg************************?
          tar -xf vmhgfs.tar?
          ********************************************************?
          Now you should have a new directory called vmhgfs-only. You need to get the following patch to make it work:?
          vmhgfs-i_node-fix.patch(http://home.sztoltzteixeira.com/vmhgfs-i_node-fix.patch)?
          To apply it, simply run:?
          patch -p1 < /wherever/you/saved/it/vmhgfs-i_node-fix.patch?
          This will patch vmhgfs-only/driver.c to conform with the kernelchanges. Now you will have to repack it and reconfigure the VMwareTools. Simply run the following two commands:?
          tar -cf vmhgfs.tar vmhgfs-only?
          ************************ggggggggggggggg*******************?
          run the command:?
          /usr/bin/vmware-config-tools.pl?
          **********************************************************?
          If all you want is to get the module compiled, you're all set. If youactually need to access a shared folder, then you should know that thisworkaround will not work while SELinux is enabled. If you want to usethe files, you will have to disable SELinux by going to System ->Administration -> Security Level and Firewall. You will have toreboot, but after that, everything should work fine.?
          One more thing. If your host is Windows, you may notice that the fileson the shared folders will appear as only accessible by root (they arein fact fully modifiable by everyone, but GNOME won't see it and thiscan be an annoyance.) If you want, the patch below will make all filesappear with proper permissions (all permissions for everyone.) Apply itusing the same steps used for the patch above.?
          vmhgfs-perm-fix.patch (http://home.sztoltzteixeira.com/vmhgfs-perm-fix.patch)?
          Now,all the ok.?

          下面是兩個patch文件的內容:?
          1?
          diff -Naur vmhgfs-only/driver.c vmhgfs-only-new/driver.c?
          --- vmhgfs-only/driver.c 2006-08-04 14:25:52.000000000 -0300?
          +++ vmhgfs-only-new/driver.c 2006-10-28 15:26:14.000000000 -0300?
          @@ -41,8 +41,8 @@?
          #define HGFS_SB_TO_COMMON(sb) ((HgfsSuperInfo *)(sb)->s_fs_info)?
          #endif?

          -#define INODE_SET_II_P(inode, info) do { (inode)->u.generic_ip = (info); } while (0)?
          -#define INODE_GET_II_P(inode) ((HgfsInodeInfo *)(inode)->u.generic_ip)?
          +#define INODE_SET_II_P(inode, info) do { (inode)->i_private = (info); } while (0)?
          +#define INODE_GET_II_P(inode) ((HgfsInodeInfo *)(inode)->i_private)?

          /*?
          * 2.5.x kernels support nanoseconds timestamps.?
          @@ -760,7 +760,6 @@?
          inode->i_uid = 0; /* This is bogus, should be the mount owner. */?
          inode->i_gid = 0; /* This is bogus, should be the mount owner. */?
          inode->i_rdev = 0; /* Device nodes are not supported */?
          - inode->i_blksize = HGFS_BLOCKSIZE;?
          inode->i_blocks = (attr->size + HGFS_BLOCKSIZE - 1) / HGFS_BLOCKSIZE;?
          inode->i_size = attr->size;?
          HGFS_SET_TIME(inode->i_atime, attr->accessTime);?

          2?
          --- vmhgfs-only/driver.c 2006-10-28 15:26:14.000000000 -0300?
          +++ vmhgfs-only/driver.c-new 2006-10-28 15:34:07.000000000 -0300?
          @@ -755,7 +755,7 @@?

          /* Set the access mode. */?
          inode->i_mode &= ~S_IRWXUGO;?
          - inode->i_mode |= (attr->permissions << 6); /* Only applies to owner. */?
          + inode->i_mode |= attr->permissions * 0111; /* Only applies to owner. */?
          inode->i_nlink = 1; /* Bogus? */?
          inode->i_uid = 0; /* This is bogus, should be the mount owner. */?
          inode->i_gid = 0; /* This is bogus, should be the mount owner. */?
          最后修改xorg config設置,不然重啟后會報X-WINDOWS出錯。?
          進入/etc/X11/,用文本打開xorg.conf,加上以下幾段:?
          1、Section "Monitor"?
          Identifier "vmware"?
          EndSection?
          Section "InputDevice"?
          Identifier "Mouse0"?
          Driver "vmmouse"?
          Option "Protocol" "Auto"?
          Option "Device" "/dev/input/mouse0"?
          EndSection?
          2、Section "Monitor"?
          Identifier "Monitor0"?
          ModelName "LCD Panel 1280x1024"?
          HorizSync 31.5 - 67.0?
          VertRefresh 50.0 - 75.0?
          Option "dpms"?
          EndSection?
          然后找到 含有"ServerLayout" 的section, 在Section跟EndSection之間加上以下一行。?
          InputDevice "Mouse0" "CorePointer"?
          ————————————————————————————————-——————————————————————
          呵呵,仔細算一下吧,一般安裝好系統的話,總是可以在網上找到更新包的,所以進行前面幾步更新的話,你需要一個可以聯網的fedora,由于是連接到外國的服務器,又由于沒有迅雷可以用,所以:gcc安裝更新的話,有16M之多,kernel-devel安裝的話有60M的文件要下載,這個在網絡好的情況下也大概要折騰整個白天吧。安裝完了,還要修改配置,才能正常使用!累啊。 我可受不了的哦。

          fedora這么優秀的系統就是為了方便我們的學習,方便我們的使用,方便我們的操作啊!為什么要這么復雜呢!

          現在在fedora下安裝vmware tools就改用下面的方法吧:?

          ********************************************************************************************************
          第一步為此客戶機(GUEST OS)選擇插入了此fedora系統的安裝光盤的光驅。

          第二步啟動此客戶機,在圖像模式下(圖形模式比較方便,如果你喜歡在文本模式下操作只能說明你是高手哦)掛載光盤,打開/Media/disk/Fedora/RPM,也就是光盤里的fedora文件夾下的rpm文件夾,里面有kenel-devel-(版本號)-i586.RPM和一個i686的RPM文件,根據你的系統選擇一個,安裝就可以了。然后彈出光盤。(i386、i586、i686指的是適用于intel i386、 i586、i686兼容指令集的微處理器。一般來說,等級愈高的機器可接受較低等級的rpm文件。你可以透過/proc/cpuinfo這個檔案查詢你的CPU等級。)
          這一步是核心,這一步就代替了老方法的前7部,就給你省了整個白天的時間。第三步選擇在虛擬機的菜單vm下選擇install vmware tools,在客戶機fedora里面掛載光盤。解壓VMwareTools-(版本號).tar.gz的文件到/tmp中。以上的步驟在圖像模式下很簡單,文本模式下的命令方式就不講了。

          第四步在fedora系統下按ctrl+alt+F1進入虛擬平臺1,以root帳戶登錄,運行一下命令:/tmp/vmware-tools-distrib/vmware-install.pl
          回車就開始安裝了,如果找不到這個文件則用cd和ls查看剛才解壓的目錄下的PL文件的文件名。

          第五步一路回車,選擇默認的即可。 特別說明:在
          What is the location of the directory of C header files that match your running?
          這一步時,系統會給你自動選擇正確的文件夾位置,不用改了,直接回車。一般是/lib/modules/(版本號)/build/include

          第六步在分辨率選擇界面按數字選擇分辨率。所以操作都是自動的,一直到安裝完成,回到$的輸入提示符下。

          第七步輸入reboot。成功?
          *********************************************************************************************************
          現在,你就可以自由的將鼠標移進移出虛擬機了,共享文件夾仍然在/mnt/hgfs下面,訪問windows的共享文件夾非常快。感覺真的很爽啊。
          然后可以把tmp下解壓出來的文件夾給刪了,給自己的硬盤省點空間嘛,本來fedora就夠大的了。
          在終端下使用?$vmware-toolbox?打開vmware tools配置對話框。
          光盤里的kernel-devel只有幾M,比你用迅雷下源碼40多M也小多了吧,一切都是那么的簡單,原理呢,也就省略 了。

          我也查看了solaris,debian等系統下vmware tools的安裝方法,我想應該跟這個差不多吧。也希望給使用其他linux系統的朋友做個參考。redhat的當然就更簡單了,直接安裝vmware tools就好了。希望linux越來越普及。

          總結

          以上是生活随笔為你收集整理的[转] fedora linux下安装vmware tools的最好方法的全部內容,希望文章能夠幫你解決所遇到的問題。

          如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。