歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> CentOS 5.5 安裝 Wine 方法

CentOS 5.5 安裝 Wine 方法

日期:2017/2/28 16:24:27   编辑:Linux教程

Wine 是一個在 Linux 下運行 Windows 應用程序的軟件環境,其核心是一個 Windows 應用程序接口(API)庫,作為 Linux 和 Windows 程序之間的橋梁。Wine 的官網是:http://www.winehq.org/。

Wine 安裝包裡的描述:

Description:
While Wine is usually thought of as a Windows(TM) emulator, the Wine
: developers would prefer that users thought of Wine as a Windows
: compatibility layer for UNIX. This package includes a program loader,
: which allows unmodified Windows 3.x/9x/NT binaries to run on x86 and x86_64
: Unixes. Wine does not require MS Windows, but it can use native system
: .dll files if they are available.
:
: The wine package is actually a meta-package which will install everything
: you need for wine to work smoothly. If you don't want to install everything
: take a look at the wine-* packages.

Wine 在 CentOS5.5 裡並不是預裝的軟件包,所以需要先配置 CentOS 的非官方軟件源 RPMForge,參見(http://www.linuxidc.com/Linux/2011-01/31505.htm),然後通過 RPMForge 來安裝 Wine。

運行命令:

yum install wine -y

來安裝 wine。Wine-1.2-1 安裝包大概有 50M 容量。

安裝包會自動安裝依賴的軟件包,安裝一般不會有什麼問題。完整完畢,接著就是配置了。

首先把 Windows/system32 下的 MFC42.dll、msxml.dll、msvcp60.dll、riched20.dll、riched32.dll 等 .dll 文件復制到 ~/.wine/drive_c/windows/system32 裡,再輸入命令 winecfg 運行 wine 配置命令。

其實一般不需要再做特別的配置,wine 就能工作了。

還有一點得注意,做完這些以後運行 Windows 程序時,SELinux 可能會彈出阻止窗口。我們用下面的方法禁用 SELinux:

用文本編輯器編輯 /etc/sysconfig/selinux 文件,把 SELINUX=enforcing 變為 SELINUX=disabled,關閉 SELinux,存盤退出,重啟系統。

運行 Windows 程序的方法:

拷貝 Windows 程序(例如 Ueit32.exe)到 ContOS 下的某文件夾下,運行命令:

wine Ueit32.exe

Copyright © Linux教程網 All Rights Reserved